Package: lang/prolog/code/fun/ttt/ Name: TIC-TAC-TOE Summary: A Prolog implementation of Noughts and Crosses Version: FEB-91 Description: This program was written by David Green as an MSc exercise when he was at Edinburgh University in 1991. The most interesting thing about it is its use of a 3x3 'magic square' to represent the playing area. This means that each position on the noughts & crosses board is given a numerical value: 8 3 4 1 5 9 6 7 2 It is a property of this magic square that each winning line in noughts & crosses has a total sum of 15. Thereore, 15 as a sum of three numbers uniquely defines a particular winning position of the game. The game state is stored as a list of the numbers which have been 'taken' so far by the user, a list of the numbers which have similarly been taken by the computer, and finally a list representing the current board state, in which positions which have previously been filled by either player are marked with an 'o' or an 'x' as is appropriate. Furthermore, this representation makes it possible to refer to any vacant board position by a single number from 1 to 9. Requires: Ports: Sicstus Prolog Origin: src.doc.ic.ac.uk:packages/prolog-pd-software/ (146.169.2.1) as noughts_and_crosses.zip Copying: Updated: CD-ROM: Prime Time Freeware for AI, Issue 1-1 Bug Reports: Mailing List: Author(s): David Green <davidg@aipna.> Edinburgh University Contact: Keywords: Prolog!Code, Prolog!Fun Programs, Tic-Tac-Toe, Authors!Green, Edinburgh Contains: See Also: References: ???