Play the classic game of Tic-Tac-Toe against a friend or challenge our AI with multiple difficulty levels. Strategy, logic, and fun!
How to Play: Players take turns placing X and O marks on a 3×3 grid. The first player to get 3 of their marks in a row (horizontally, vertically, or diagonally) wins. If all 9 squares are filled without a winner, the game ends in a draw.
Tic-tac-toe (also known as Noughts and Crosses or Xs and Os) is a paper-and-pencil game for two players who take turns marking the spaces in a 3×3 grid with X or O. The player who succeeds in placing three of their marks in a horizontal, vertical, or diagonal row wins the game.
Mathematical Significance: Tic-tac-toe is a solved game, meaning that with perfect play from both players, the game will always end in a draw. The game has 255,168 possible games, but only 138 terminal board positions when considering symmetry.
| First Player Move | Optimal Response | Game Outcome (Perfect Play) | Common Beginner Mistakes |
|---|---|---|---|
| Center | Corner | Draw | Playing edge instead of corner |
| Corner | Center | Draw | Playing adjacent corner instead of center |
| Edge | Center | Draw (but gives slight advantage to second player) | Playing corner instead of center |
Classic Tic-Tac-Toe: The standard 3×3 game. With perfect play from both players, the game always ends in a draw.
Ultimate Tic-Tac-Toe: A 9×9 grid divided into nine 3×3 subgrids. The position you play in a subgrid determines which subgrid your opponent must play in next.
3D Tic-Tac-Toe: Played on a 3×3×3 cube. The goal is to get three in a row in any dimension - horizontally, vertically, diagonally, or through different layers.
Misère Tic-Tac-Toe: The opposite of normal Tic-Tac-Toe - the player who gets three in a row loses. This variation requires completely different strategy.
| Mode | Wins | Losses | Draws |
|---|---|---|---|
| Player vs Player | 0 | 0 | 0 |
| Player vs AI (Easy) | 1 | 0 | 0 |
| Player vs AI (Medium) | 0 | 0 | 0 |
| Player vs AI (Hard) | 0 | 0 | 0 |