How the Minimax AI Algorithm Works
In Impossible Mode, our AI computes a full **Minimax Decision Tree** with alpha-beta pruning. It evaluates all 255,168 possible game states to guarantee it will never lose a game.
The Perfect Opening Strategy (Never Lose)
- If you move first: Always claim a Corner Cell. This creates the highest probability of a "Fork" (two winning avenues simultaneously).
- If you move second: If the opponent takes a corner, you MUST take the Center Cell to force a draw. If they take the center, claim a corner.