Welcome to Chess-GPT! This is a not-so-powerful chess bot that utilizes OpenAI's GPT-3.5-turbo API to provide you with an interesting chess playing ex

GitHub - notnil/chess-gpt: A Chess Bot powered by OpenAI's ChatGPT

submited by
Style Pass
2023-03-17 14:00:08

Welcome to Chess-GPT! This is a not-so-powerful chess bot that utilizes OpenAI's GPT-3.5-turbo API to provide you with an interesting chess playing experience. Watch it generate extremely confident explanations for moves while it blunders like a sub 500 ELO noob!

This will start a command-line interface where you can interact with the Chess-GPT bot. The player is always white and Chess-GPT is always black.

Only a few iterations were required to create a prompt that would reliably make ChatGPT play chess. The most important realization was that I could give ChatGPT a list of moves and instruct it to choose one regardless of the situation. This ensured that any move it made would be valid. Additionally, ChatGPT needed both the PGN (game history) and FEN (current board state) for context to pick non-random moves. The most interesting part of the prompt was the required addition of the phrase, "Even if you think you can't win, still pick a valid move," or ChatGPT would effectively give up. ChatGPT apparently interpreted the prompt very pessimistically and didn't see a path to maximizing its winning chances.

Leave a Comment