Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Another opening book question

Author: William H Rogers

Date: 10:59:57 07/17/02

Go up one level in this thread


Here is a simple solution, not the best, but it works.
List books moves as follows:

e2e4e7e5g1f3f8g6b1c3b8c6 ......
e2e4e7e5b1c3b8c6g1f3f8g6 ......

You can start with any opening that you want. The openings can be stored as
binary. Assuming that you play first then you play e2e4... After your opponent
makes his move you check to see if it is e7e5 if it is then you follow with g1f3
and so on. If however, you opponent makes another move then you read in another
string of moves until you match, that is your move plus his. If no match is
found then you are out of book. As long as he makes the predicted move you can
continue using the same string that you loaded into memory the first time right
up to the end of the game if possible.
One other consideration is to use two seperate books, one for white and one for
black, and of course you want the best moves for both. You could also include
moves that lead to draws, just in case your opponent is much stronger than you.
Simple = yes. Fancy = no. Works = yes. Easy to implement = yes.
Good luck and if you find a better way to do it please let me know.
Bill




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.