▣ TINY OPPONENTS

DISK 03 / THE FIELD MANUAL

It has already
seen the ending.

Tic-tac-toe is small enough that the computer can look all the way to the end before it moves. No learning. No model call. The game is just small enough to brute-force the future.

The whole game fits in its head

After you put down X, the computer tries each legal O. For every one, it assumes you make your best possible reply. Then it assumes its own best reply after that, and keeps going until somebody wins or the board fills.

Work backward

A computer win is good. A draw is neutral. A human win is bad. Once every branch has an ending, it works backward and chooses the move whose worst case is best.

That is minimax. On a game this small, there is no reason to guess.

You go first on purpose

X has the advantage in tic-tac-toe, so you get it. Against perfect play that still only buys you a draw. If you make one wrong move, the computer takes whatever win you left open.

The verified record

The browser handles the game. When it ends, the server replays your moves and reconstructs every O from the same seed. Those checked games make up the public record. No leaderboard. The only number that really matters is computer losses.

OPEN THE NERD / MATH DRAWER

tic-tac-toe-v1 scores terminal positions from the computer's point of view: computer win 10 - depth, draw 0, human win depth - 10. Computer turns maximize the score; human turns minimize it. Equal optimal moves use deterministic seeded tie-breaking, so the server can replay the exact browser game.