Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Opening book

Author: Andrew Williams

Date: 12:56:14 04/01/99

Go up one level in this thread


On April 01, 1999 at 14:37:51, Frank Phillips wrote:

>I have added an opening book to my developing program and am wondering about
>better ways of storing the information.  At the moment I store opening positions
>as a hash-table in a disk file, accessing them as I would a hash table stored in
>RAM by shifting the hash code for  the appropriate number of places to generate
>the index and then performing a lookup as
>fseek(pfile,index*sizeof(record),SEEK_SET)  etc.  This works but involves a lot
>of wasted storage.  For example, I have a 12MB file of about 1million records
>with the order of only 100 000 book entries.  Is it normal having generated the
>book to then sort and search it as a simple linear file instead?  What do others
>do?

In my program, I don't store blank entries. I simply store the entries that
exist and do a binary search on the file to see if the position is in the
book. The hash key is the same as the one used in the transposition table,
but I use it in a different way.

Andrew



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.