Tic Tac Toe
Play Tic Tac Toe against a rule-based AI. First to get three in a row wins — simple, fast, and free.
How to Play Tic Tac Toe
- X always goes first. Click any empty square to place your mark.
- The first player to get three marks in a row — horizontally, vertically, or diagonally — wins.
- If all nine squares are filled with no winner the game is a draw.
- Click Reset to play again immediately.
Frequently Asked Questions
- Can two humans play on the same device?
- Yes — set both players to Human and take turns clicking squares.
- How smart is the CPU?
- The CPU uses a rule-based engine that always takes a winning move when available and always blocks an opponent's winning threat.
- Is there a first-mover advantage?
- With optimal play from both sides the game always ends in a draw. The CPU is designed to play optimally, so expect draws when both sides use AI.
- What strategies can the CPU use?
- Two. Best uses the rule-based priority order — win, block, then take the centre, a corner, or an edge. Random plays any empty square with no rules at all, which makes it beatable and a good place to start.
- Can the game be played on a bigger board?
- Yes — the engine carries a separate rule list for each board size, so larger boards get their own priorities rather than reusing the 3×3 ones.
- How do I beat the CPU?
- On Best you cannot — it never misses a win or a block, so perfect play from you ends in a draw and anything less loses. Switch the CPU to Random if you want a game you can win.