next up previous
Next: Implementation Up: Methodology Previous: Failure assignment

Choice of move

Given a current game or tic-tac-toe board, we first generate all possible legal moves for the current player. Next, for each possible and legal move available for play by the current player, we compare the current board and the current move under consideration to determine if the current board and the current move under consideration appear as a failure in the failure database. If the current board and the current move under consideration appear as a failure in the failure database, we exclude the current move under consideration as a choice for play.

If, as a result of this process, the current player is left will no moves which will not lead to failure, we record the last move by the current player as a failure, and regenerate the full list of legal moves for the current player, even though all of them have been previously identified by the system as failures. The system does not "resign," and the game continues. It is possible that even though all moves could lead to failure, the opponent may choose to draw instead. The system, alternatively playing moves for both 'X' and 'O', chooses random moves which have not led to failure in the past. If we assume the failure database represents all possible failures in tic-tac-toe, the system playing either for 'X' or for 'O', plays for a draw or better. A draw in tic-tac-toe is, of course, a tie-game, or what children call a "cat's game." Our system employs a failure-avoidance strategy. It may not always avoid loss, but, as best as possible, it plays for a draw or better.

So, legal and possible moves for the current player are excluded and possibly re-introduced as described above. Of the moves that remain, one is chosen randomly and played.


next up previous
Next: Implementation Up: Methodology Previous: Failure assignment
James Riechel 2007-12-12
Hosted by www.Geocities.ws

1