Custom GPTs - ChessGPT code interpreter plays PyChess on a board with you

Here’s a custom GPT [GPT4 + code interpreter] that’s a ChessGPT!

But beware - the AI is Magnus C·AI·rlsen… :robot::chess_pawn::nerd_face:

Simply say “Let’s start!” (or something along the lines) and it will prepare its chess environment. Use algebraic notation to play.

I already mitigated the most common bloopers via explicit instructions, e.g. to “import io” and enforcing it to say “I am white. My move: ” so as to prevent it from forgetting who-is-who and trying to just move one of your pieces (which will result in PyChess throwing an error [can’t move black twice without moving white], and subsequently, the AI correcting its mistake - but such things still lead to confusion down the line → see image for details).

That’s also why - for now - the AI will always be white and make the first move. Otherwise, it’d be confusion, confusion everywhere! /o\

As-is, it seems pretty coherent and stable - however, in 1 out of 5 attempts, the AI randomly messed up displaying the initial board, but immediately corrected the error and everything worked fine. It’s random + rare, though, i.e. wasn’t reproducible for me. If you encounter any semi-reproducible problems that lead to non-recoverable errors down the line, I’d be delighted to receive your feedback!

Enjoy! :nerd_face: