Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Binary Book Creation

Author: Gian-Carlo Pascutto

Date: 04:00:08 06/20/00

Go up one level in this thread


On June 19, 2000 at 19:48:09, Tom Kerrigan wrote:

>>I call movegen for every move in the game, then again for each move for
>>that move (disambiguation in the convertor - sp?), and if the move is a check
>>again for each move for each move (check or mate?).
>
>I assume you are doing all this generation to determine if a move should be
>followed by a '+' or a '#'. When parsing moves, I believe you can safely ignore
>those symbols.

I use the same internal format->SAN conversion routine everywhere,
so I cant cripple it and I didn't want to add another function when it was
going to be replaced anyway.

>When I am parsing my opening book PGN file, I call my move generator once per
>move, then I call makemove()/undo() for each move that's generated to determine
>legality, then I call san() on each move to see if the string matches the >string that was read from the PGN file. Even though I do all this work, I can >parse a few hundred games per second. Maybe around a thousand.

I suppose your san() function does not have to generate moves itself but
can use the movelist from elsewhere, so movegen only needs to be done once.

I could probably do that too, and go a lot faster, but I've looked at the
new faile sources and it uses a nice algorithm from the extract program.

It does a reverse conversion, i.e. it converts the SAN to internal move format
rather than the other way around. Only needs to do movegen once, and is a lot
more tolerance to psuedo-SAN than doing string-matching.

--
GCP



This page took 0.01 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.