Tic-Tac-Toe, also known as Noughts and Crosses, and spelled in a variety of ways (ticktacktoe, etc), is a well-known pastime which is not as ancient as popularly believed, though it certainly has roots in older games. The earliest clear description of the rules, but without a name, comes from Charles Babbage around 1820. Later on, Babbage started to call the game Tit Tat To and by slight variants on this, gave the first detailed analysis of it, and designed the first robot to play it! He speculated that:
[T]he machine might consist of the figures of two children playing against each other, accompanied by a lamb and a cock. That the child who won the game might clap his hands whilst the cock was crowing, after which, that the child who was beaten might cry and wring his hands whilst the lamb was bleating.
His plan was to exhibit the machine in London to raise money for his more serious projects, including the fabulous Analytical Engine. However, on hearing that similar devices, such as a mechanical composer of Latin verse, had flopped financially he abandoned the scheme.
Two expert players of tic-tac-toe will always draw. In other words, there is no winning strategy against an opponent who knows the game well. Nor is it difficult to become unbeatable. Despite the fact that there are 9 × 8 × 7 × 6 × 5 (= 15,120) possible layouts of Noughts and Crosses for the first five moves alone, these reduce to just a few basic patterns of play and counter-play that ensure the canny contestant never loses. The game is only interesting when at least one novice is involved. The strongest opening play is in a corner because an unwary opponent will be trapped unless her counter-move is in the center. By the same token, a center opening must be countered by a corner response or the first player has an easy win. Of course, a master player will not only never lose but will learn his opponents weaknesses and exploit them in the most devastating way.
The game also becomes more interesting when played on a larger board and/or in more dimensions. An exception to this is the 3 × 3 × 3 cube which gives an easy win to the first player; in fact, it cannot end in a draw because the first player has 14 plays and it is impossible to make all of these without scoring. The 4 × 4 × 4 cube is much more interesting and is sold commercially as the well-known Score Four game. For the ambitious, tic-tac-toe can be played in four dimensions on a tesseract by sectioning it into two-dimensional squares. Older, similar, and mathematically more interesting relatives of tic-tac-toe include Nine Men's Morris and Ovid's Game.