Tic-Tac-Toe vs AI
Play tic-tac-toe against an unbeatable opponent powered by the minimax algorithm. Easy mode plays randomly, hard mode plays perfectly.
You: 0AI: 0Draw: 0
Your turn
How does it work?
In hard mode your opponent is the minimax algorithm: it searches the entire tree of possible moves, scores every branch and picks the move that guarantees the best outcome for itself and the worst for you. Since tic-tac-toe is a solved game, the best you can achieve in this mode is a draw.