Tic-Tac-Toe

You're X, the computer is O.

Your move

Simple game, smart opponent

The classic 3x3 grid, but the computer opponent actually plays to win when it can and block when it has to — not random moves, so beating it consistently takes real strategy, not luck.

Why perfect play always ends in a draw

Tic-tac-toe is a "solved" game — with perfect play from both sides, every game ends in a draw, and no strategy can force a win against an opponent who never makes a mistake. The center square is the strongest opening move (it's part of the most possible winning lines), followed by the corners; the edge squares are the weakest. Against a genuinely optimal opponent, the realistic goal isn't winning, it's not losing — but this AI isn't flawless in every position, so the occasional win is very much on the table.

The trap most people lose to

The most common way to lose isn't missing your own winning move, it's missing that the opponent has created a "fork" — a position where they have two different ways to win on their next turn, so blocking one leaves the other open. Checking after every one of the opponent's moves specifically for a fork, not just for a single obvious three-in-a-row threat, is the one habit that separates consistently drawing from occasionally losing.

Why a game this simple is still worth playing

Precisely because it's small enough to fully understand, tic-tac-toe is one of the most commonly used first examples in game theory and introductory computer science courses for teaching how a computer opponent can look ahead through every possible future move — the same core idea (minimax search) that powers far more complex game-playing AI, just at a scale a person can actually hold in their head and verify by hand.