Dale's Home Page

Atari home | Miner >>

Game 1 of 5

Atari BASIC · late 1981 or early 1982Noughts & Crosses

Noughts and Crosses: the board drawn in light blue lines, an X in the centre square, and the prompt YOUR MOVE (COLUMN,ROW)?

This is probably the first game I ever wrote. I still remember hacking away at it, and where I was sitting. It's from my character-graphics era, before I knew anything about player/missile graphics: the board and the big X's and O's are all PRINTed with Atari's line-drawing characters on the ordinary text screen. You're O and the computer is X. You type your move as column, row. The computer takes the centre if it can, checks whether anyone is about to win, and otherwise picks a corner or an edge at random. I called it Noughts & Crosses, which no Canadian kid would have done. That came from my British teacher, Mr. Emerson, who taught us a variety of British idioms along with everything else. He was a big influence on me. Long before I could get a computer, he got hold of a programmable calculator and showed it to us, the first one I ever saw.

I've always thought it was all my own work. The best-known tic-tac-toe programs of the time, the two in David Ahl's BASIC Computer Games (1978), number the squares 1 to 9 and work quite differently, and I haven't found anything else mine resembles.

It had a flaw I never noticed back then. When it looked for a line to block, it found two of your O's in a row but didn't check whether the third square was still empty. If that square was already taken, it gave up and moved at random, and could miss a real threat somewhere else.

2026: The game page has a switch between my original logic and a fixed version that checks the square is empty. A computer player making random moves won 10.3% of its games against the original and 0.8% against the fix.

Play Noughts & Crosses  ·  Read the listing

Atari home | Miner >>

Game 1 of 5