A First Program Built Around a Small Board

Tic-tac-toe may look like a simple choice for a first program, but it gives a beginner a compact way to make a computer respond to a person. The program has to keep track of which squares are occupied, accept a move, and decide what to do next. Even a rudimentary version turns a familiar game into a sequence of instructions and decisions.

The board’s small size is what makes the problem manageable. There are only nine squares, and the rules sharply limit which moves are allowed. A program does not need human intuition to play: it can follow rules for choosing a square and checking whether either player has made a line. That can produce a technically successful game without making it an entertaining opponent.

A Conversation Through a Teletype

A teletype terminal was a keyboard-and-printer device for communicating with a computer. Instead of clicking a square on a screen, a player would enter information through the keyboard and read the computer’s response as text. The game’s logic ran on the machine; the terminal was the way a person supplied moves and saw what happened.

That distinction captures the achievement of a first program: the challenge was not flashy graphics, but translating a set of rules into instructions the machine could carry out. Tic-tac-toe made that translation visible, one move at a time—and its famously dull matches were a reminder that getting a computer to play is not the same as making it fun to play against.