Tic-Tac-Toe, playable directly in your browser — but the real point isn't the game. It's the AI behind it.

This is the same Minimax algorithm and Alpha-beta pruning from my Sudoku solver, applied to the simplest possible game. Tic-Tac-Toe has a small enough set of outcomes that you can actually see the algorithm think — every move it makes is the mathematically best possible response, looking ahead through every way the game could end.

Try to beat it. You won't — and that's exactly the point. A properly implemented Minimax player is unbeatable in Tic-Tac-Toe. If it loses, something in the logic is wrong.

Second prototype this week, both built while learning the same core algorithm. Built solo while working full-time — more small projects like this coming soon. Follow for updates.

Comments

Log in with itch.io to leave a comment.

To play a normal game, press the fullscreen button