Here is the new version: https://pastebin.com/BSUGtxfb
It seems to be performing better! It played 2 games without mistakes, and was able to evaluate diagonals correctly. I just hit my usage limit for GPT-4, I'll do more testing later.
I'm still blown away that this is possible.
Let's play tic tac toe. After every move please check the game state to see if anyone has won. You go first.It didn’t realize that it had won.
The fact that it can’t even do that tells us that it doesn’t have an internal board representation to reference.
> Let's play tic tac toe! We will take turns naming our moves and each time you move please list all moves so far. If either of us wins the game just acknowledge it and print the state of the game. If I win just acknowledge that and end the game.
> I start with the center spot.
It wasn’t particularly good at the game (missed opportunity to block me from winning) but it played valid moves and detected when I won: https://ibb.co/L83JHxP
(It leaves out the first row of the game in its first response, but I was able to interpret the board state since it played on the second row. When I gave it the full board again in my answer it picked it right up.)
However, I've been trying for the life of me to get GPT to play tic-tac-toe properly for the past few days.
This is the current prompt I've been using: https://pastebin.com/pSPkigNP
I've tried many prompts. Most of them were a lot simpler than the one in the pastebin link. I thought providing multiple examples of how to check all of the win conditions might help. It struggles most severely with the diagonals. Sigh...
Anyone have tips for me? Or success on a similar task?