Computer Chess Club Archives


Search

Terms

Messages

Subject: Opening book

Author: Frank Phillips

Date: 11:37:51 04/01/99


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?



This page took 0.05 seconds to execute

Last modified: Thu, 07 Jul 11 08:48:38 -0700

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