Hi,
This is a bit unusual but here goes ....
I've written a NIM player.... A set of matches in rows which have a number
taken from each by the computer and a player in turn. The player who has to
take the last match loses.
I've written the game using a computer player which uses a knowledge base to
decide the appropriate set of circumstances. Does anybody have any ideas /
code (in CML) of how to improve the quality of the computer player?
Preferably something fairly short as I have 'til friday to do it and have only
just started programming in LISP (although I do have about 10 years
programming experience).
Thanks,
Dan.
D J Hooker wrote:
> I've written a NIM player.... A set of matches in rows which have a number
> taken from each by the computer and a player in turn. The player who has to
> take the last match loses.
>
> I've written the game using a computer player which uses a knowledge base to
> decide the appropriate set of circumstances. Does anybody have any ideas /
> code (in CML) of how to improve the quality of the computer player?
There is a simple algorithm that plays perfect Nim. You can
find the details in many, many books.
--
Gareth McCaughan Dept. of Pure Mathematics & Mathematical Statistics,
·····@dpmms.cam.ac.uk Cambridge University, England.