MINIMAX AI
A graphical Tic-Tac-Toe game with an AI that searches the possible moves before choosing its own. You can draw against it. Winning is another matter.
I built this project during a one-week AI summer school at Fitzwilliam College in Cambridge. Tic-Tac-Toe gave me a small board on which to work with recursive decision-making and game-tree search.
For each possible move, the AI explores the moves that could follow until it reaches a win, a loss, or a draw. Minimax works back through those outcomes, choosing on the assumption that the other player will also make their best move.
That gives the game a fairly stubborn opponent: with correct play, the AI cannot lose. The graphical board puts the algorithm into a game I can actually play and test.
The project brings together the search algorithm and a graphical interface. A move on the board becomes a new position for the AI to evaluate, and its chosen move comes back to the board.
The small size of the game makes it possible to trace a decision all the way through. If a move looks wrong, I can go back through the possible positions and check how the result was chosen. That is the part I find interesting: being able to follow the reasoning behind a move.