3 ms·
You (or running software you interface with ChatGPT) needs to maintain the state of the game between moves. LLMs aren’t computers but they can interact with com
by williamcotton 4y ago
You (or running software you interface with ChatGPT) needs to maintain the state of the game between moves. LLMs aren’t computers but they can interact with computers.
LLM(InitialInstructions)->Computer(CodeWrittenByLLM)->LLM(InstructionsOutputByComputer)->LoopUntilWin
- janalsncm 4y agoIn my experiments that doesn’t help. ChatGPT failed to play any valid move given a position, let alone a good one. The point is that language is probably too “linear” to represent what’s going on during a game. Pieces on the board have complex relationships (consider a pinned piece, for example) so autoregressive decoding is simply not enough.
- williamcotton 4y agoTry something like: The current board state is: board = [['', '', ''], ['', '', ''], ['', '', '']]; write a javascript function called bestMove(board) that predicts the best tic-tac-toe move to make given a board. use that function to update the board state and return the board state in JSON form. The response will have a bunch of functions like function bestMove(board) { function getEmptySpaces(board) { function predictBestMove(board, player) { function minimax(board, isMaximizing) { function checkWinner(board) { ... These functions should work together to determine the best move to make in a game of Tic-Tac-Toe, using the minimax algorithm to evaluate each possible move and choosing the one with the highest score. Then eval and execute the bestMove function, passing in the initial board state, returning the updated board state. Then the human player makes a move. Then another prompt: Try something like: The current board state is: board = [['X', '', ''], ['', 'O', ''], ['', '', '']]; assume there is a function called bestMove(board) and checkWinner(board) that predicts the best tic-tac-toe move to make given a board. use those functions to update the board state and check the winner and return the board state and current winner in JSON form. etc... Using my little engine, I get this solution: question: "Answering as [rowInt, colInt], writing custom predictBestMove, getEmptySpaces, minimax and checkWinner functions implemented in the thunk, what is the best tic-tac-toe move for player X on this board: [['X', '_', 'X'], ['_', '_', '_'], ['_', '_', '_']]?", answer: [ 0, 1 ], https://gist.github.com/williamcotton/e6bdcca0a96a6e7bf5d2fe422d0611d1 https://gist.github.com/williamcotton/e6bdcca0a96a6e7bf5d2fe...
- the_af 4y agoInteresting. Have you tried playing a full game like this, instead of a single move? In any case, I don't think this is what people expect out of ChatGPT. Your approach is too "programmer centric". I think people expect telling ChatGPT the rules of the game, in almost plain language, and then expect to be able to play a game of Tic Tac Toe interacting with it like one would with a person. This means, not asking it to write functions or remind it of the state of the board at every step. This doesn't work consistently for a well-known game like Tic Tac Toe, much less for an arbitrary game you make up.
- williamcotton 4y ago> Interesting. Have you tried playing a full game like this, instead of a single move? No, but it is correctly running the best move functions so through induction we can see it will successfully play a full game. > I think people expect telling ChatGPT the rules of the game, in almost plain language, and then expect to be able to play a game of Tic Tac Toe interacting with it like one would with a person. This is an unreasonable expectation for a large language model. When a person computes the sum of two large numbers they do not use their language facilities. They probably require a pencil and pad so they can externalize the computational process. At the very least they are performing calculations in their head in a manner very different from the cognitive abilities used when they catch a ball. Try playing a game like Risk without a board or pieces, that is, without a concrete mechanism to maintain state. This approach isn’t cheating and an LLM acting as a translator is a key component. This doesn’t “prove that LLMs are useless bullshit generators, snicker snicker” because it can’t maintain state or do math very well, it just means you need to use other existing tools to do math and maintain state… like JS interpreters. One thing that I think will improve is that a larger scale language model would need less internally specific terms for the solution in order to reliably get the same results. Also, translations are necessarily lossy and somewhat arbitrary, so these results need to be considered probabilistically as well. Meaning, generate 10 different thunks and have them act as voting on an answers they compute.
- the_af 4y ago
- the_af 4y agoThat's interesting! But it does show that the hype around ChatGPT is misplaced: as impressive as it is (and I do find it impressive) it doesn't really build a "model" of the conversation; you have to help it all the way or it will go astray, since nonsensical board game moves make as much sense from a conversational point of view. It's also easy to make it hallucinate nonfactual information, which makes it bad at exploring things you're unsure about and about which you could inadvertently write misleading questions (Note this isn't the same as asking misleading questions to a human who will answer confidently out of arrogance; ChatGPT has no "ego" but it will write completely false/nonfactual answers if asked to by mistake. I have examples of this). It's easy to get confused about GPT's limitations because it's a pretty successful parrot, and it writes convincing conversations in a vast number of cases.