This is a simple javascript multiplayer tic tac toe game that also demonstrates how the minimax algorithm can be used to create an unbeatable A.I. player.
The minimax algorithm uses backtracking to determine all of the possible outcomes of a given move, and chooses the move that maximizes the player's score assuming the opponent will always respond by choosing the move that minimizes the player's score.
You can learn more about this algorithm here.