Tic-tac-toe

Tic-tac-toe (or noughts and crosses) is a pencil-and-paper game for two players, X and O, who take turns marking the spaces in a 3×3 grid. The player who succeeds in placing three respective marks in a horizontal, vertical, or diagonal row wins the game.

The following example game is won by the first player, X:

Players soon discover that best play from both parties leads to a draw (often referred to as cat or cat's game). Hence, tic-tac-toe is most often played by young children.

The friendliness of tic-tac-toe games makes them ideal as a pedagogical tool for teaching the concepts of good sportsmanship and the branch of artificial intelligence that deals with the searching of game trees. It is straightforward to write a computer program to play tic-tac-toe perfectly, to enumerate the 765 essentially different positions (the state space complexity), or the 26,830 possible games up to rotations and reflections (the game tree complexity) on this space.

Read more about Tic-tac-toe:  History, Combinatorics, Strategy, Variations, Alternative English Names, In Popular Culture