.he 'NIM''page %'
.fo 'John Gibson''Oct 7 1977'
.sp 3
.ce 2
NIM PLAYER
==========

 
 
   For those unfamiliar with the game, nim is played as follows:  15 objects
(usually matchsticks, but here asterisks) are layed out in 5 rows, thus
 				
 				1  *
 				2  **
 				3  ***
 				4  ****
 				5  *****
 
the players then take it in turn to remove any number of objects (but at least
one) from any row (i.e. only from one row at a time):  the player who
is forced to take the last object is then the loser.
 
  
 
playing against the program
 
   type
 
 	% POP11
 	: LIB NIM;
 	: NIM();
 
and the program will respond with
 
 	do you want me to use my experience?
 
each time the program plays a game it learns from its mistakes and remembers the
moves not to make.  so if you now type "yes" it will use this experience and
will be very difficult to beat.  but if you say "no" it will start learning
again from scratch and will (at least to begin with) be very easy to beat.
   after typing "yes" or "no" you will be asked
 
 	do you want to start?
 
to which you should respond "yes" or "no" as appropriate.
   the position of the game will now be printed out when it is your move, the
program indicating the move it has just made with hyphens, thus:
 
 				1  *
 				2  **
 				3  ***
 				4  *---
 				5  *****
 
 	your move:
 
(here you let the program go first).you now indicate your move by typing
 	
 	your move: n m
 
meaning take n from row m.  this continues until the end of the game when,
after printing
 
 	i win
 or
 
 	you win
 
as appropriate, you will be asked
 
 	want another game?
 
to which you should reply "yes" or "no", depending on how fed up you are!
