Tic Tac Toe Agent - Deterministic Minimax (Vanishing)
One algorithm, two sets of rules, and a lesson about choosing the simplest tool that works.
The problem
It is tempting to use a language model for everything, including problems that a short algorithm already solves exactly.
I wanted a small and concrete case to show where that line is, and what changes when the rules get harder.
The approach
The agent uses minimax. It explores the legal moves, assumes that the opponent plays well, and picks the best outcome.
The same algorithm plays two games, the classic one and a vanishing variant where each player keeps three marks and the oldest one disappears.
A React interface sends the board to a Node and Express API, which returns the move. It runs on a CPU, with no external service.
The results
In the classic game the agent cannot be beaten, and its moves are instant, free and reproducible.
In the vanishing game the same strategy loses its edge and a human can win. The added complexity is where a fixed method starts to show its limits.
The limits
The agent does not learn from its games.
It is a study case, and the approach would not scale to games such as Go, where the number of positions calls for other methods.
Contact
If you'd like to discuss a role, request a demo, or ask about my projects, feel free to reach out.
I'm looking for a hands-on senior AI/ML engineer or AI tech lead role, in Lyon or remote. I'm also happy to talk about AI projects, consulting, or leading an AI team.