Tic-Tac-Toe for two players

[TTT-2.BBX 3KB]

This neural network keeps track of a two player Tic-Tac-Toe game. It cannot play against a human, but it can manage a two player game and detect if someone wins, if there is a stalemate, or if someone has cheated. There is a separate version of the game that can play a single player game against a human: TTT-1.
[Image of network]
TTT is a bit confusing at first. There are two separate boards - one for X and one for O. To play a game, start the network running on slow. Then take turns placing moves for X and O. X must go first, unless the neuron labeled Who goes first is activated, in which case O must go first. The results of the game are straight forward with individual neurons that indicate who won or if there was a tie. When the game is over one can activate Clear All which will reset the board.

Most of the network is devoted to checking for cheating. If a player plays more than one square on their turn, the Error neuron will switch on and prevent anyone from winning. This also occurs if both X and O play on the same square (an easy mistake to make given the split nature of the board). In the event of an error, one can either undo the move that caused the error, or activate Clear All to restart the game.

-------------------------------------
Last modified: 21 September 1998