Tic-tac-toe (tick tack toe, noughts and crosses, Xs and Os and many other names) is a very old pencil-and-paper game for two players, O and X, who take turns marking the spaces in a rectangular grid, usually X going first.
According to Claudia Zaslavsky's book Tic Tac Toe: And Other Three-In-A Row Games from Ancient Egypt to the Modern Computer, the game Tic Tac Toe is originally from ancient Egypt..
When playing on the 3x3 board, players soon discover that best play from both parties leads to a draw. Hence, tic-tac-toe is most often played by young children; when they have discovered an unbeatable strategy they move on to more sophisticated games. This reputation for ease has led to casinos offering gamblers the chance to play tic-tac-toe against trained chickens (though the chicken is advised by a computer program)
The simplicity of tic-tac-toe makes it ideal as a tool for teaching the concepts of combinatorial game theory 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, enumerating the 765 essentially different positions (the state space complexity), or the 26,830 possible games up to rotations and reflections (game tree complexity) on this space.
The first known video game, OXO (or Noughts and Crosses, 1952) for the EDSAC computer played perfect games of tic-tac-toe against a human opponent.
One example of a Tic-Tac-Toe playing computer is the Tinkertoy computer, developed by Massachusetts Institute of Technology, and made out of Tinker Toys. It only plays Tic-Tac-Toe and has never lost a game. It is currently on display at the Museum of Science, Boston.
Surprisingly few people know optimal stategy of this game. Apart just random moves, there are two major strategies of playing this Tic Tac Toe:
Both first and second player needs to avoid edges, preferring corners or center. If the first player takes the center during the first move, the second player should take any corner. If the first player takes the corner instead, the second player should take the center.
Experienced player never looses (for the two experts, the game ends in a draw).
In the nineteenth century, the game was introduced to Britain where it was known as "Go Bang", said to be a corrupution. Japanese goban, said to be adapted from Chinese k'i pan (qí bàn) 'chess-board'.
Acknowledgements: This article reuses material from the two Wikipedia articles: