Developer exhaustively tests Tic-Tac-Toe AI across 1,270 games, records zero losses
A developer benchmarked a minimax-based Tic-Tac-Toe AI engine to verify claims of it being unbeatable, enumerating all 642 reachable game lines on a 3×3 board and finding the AI never lost. The engine, which uses a full depth-9 minimax search on 3×3 boards, recorded 386 wins and 183 draws when playing second, and 71 wins with 2 draws when playing first. Alpha-beta pruning reduced search node visits by 93% compared to plain minimax, cutting from roughly 550,000 nodes to about 36,500 while producing identical results. Testing was extended to larger boards — 4×4, 5×5, and 6×6 — against random and greedy opponents across 628 simulated games, with the AI still recording zero losses. The developer noted that as board size grows, the AI's depth cap makes forcing a win harder, shifting outcomes toward draws rather than defeats, and released the engine and benchmark code as open source on GitHub.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in