Play noughts and crosses against an easy, medium or unbeatable computer, or a friend on the same screen, with a running score and win/draw/loss move hints.
Played well by both sides, tic-tac-toe always ends in a draw. That makes the unbeatable computer here a fair test: you cannot beat it, but you can learn never to lose to it. Easy and medium levels leave room to win while you practise.
This Tic-Tac-Toe also works as a two-player game on one screen, and it keeps score across games until you reset it. Nothing to install, and no account.
The hard level searches the whole game tree with negamax and remembers every position it has scored. There are only 5,478 reachable positions, so the search finishes instantly. Wins are worth more the sooner they come, which is why the computer finishes a game rather than wandering, and among equal moves it prefers the centre, then corners, then edges. Checked against every possible line of opponent play, it won or drew all 613 resulting games, playing first or second.
A finished draw reads “Draw. Nobody can win with perfect play, so this is the expected result.” Scores reset when you switch between Computer and Friend.
Opponent
Difficulty
You play
You (X)
0
Draws
0
Computer (O)
0
Your move (X)
Move outcomes label every empty square win, draw or loss for the player to move, assuming both sides play perfectly from there.