ChatGPT Chess

ChatGPT has really taken the world by storm. Even my parents have been telling me about how they’ve been chatting with it and what they think of AI. But the real question is can it play chess. I tried to play a game with it a few times as did some other folks. The result isn’t all that surprising. ChatGPT can’t play chess at all.

But what if ChatGPT can play chess and we just don’t know the rules. So I created a ChatGPT chess bot that plays by ChatGPT rules. Those rules are a little iffy since ChatGPT plays crazy moves and I only spent a few hours creating this. But the basic rules are:

  1. If ChatGPT plays a valid move, that’s ideal. We use that move.

  2. If the move is invalid search for the piece that it moved and move it to the square that ChatGPT says. Doesn’t matter if a bishop is hopping over pawns or a rook is moving diagonally.

  3. If the piece doesn’t exist (ex. ChatGPT plays fxg4 and there’s no f pawn), we just give ChatGPT the piece and move it to the square it says. Make sure you don’t tell ChatGPT that it can just create queens out of thin air.

Games quickly devolve into chaos and I think it’s probably impossible to beat the bot since it can always spawn a new queen or jump its king across the board to get out of danger. Here’s the app I set up to play the bot. I might write more about the service that generates the moves later. But it’s a little odd and different from how you’d want to make a chess bot service since it allows making illegal moves. At the moment I just implemented a random move bot and the ChatGPT bot. It would be fun to extend it and create more bots in the future but chess.com has some pretty nice AI bots, so check those out.