Author: Robert Hyatt
Date: 08:09:07 05/23/04
Go up one level in this thread
On May 23, 2004 at 10:58:50, Uri Blass wrote:
>I guess that crafty does not have the same position more than once in its book
>but the same position can happen in many games and I do not see where it removes
>doubles.
It sorts the hash signatures, merges the book, and then squeezes out duplicates,
but it counts them so that it knows how many times the move was played (by how
many times the duplicate hash signature is in the original file).
>
>I guess that the steps for building a book:
>1)building a book based on games when the same position may appear a lot of
>times.
>2)Sorting the book so the positions are ordered by lexisographic order.
>3)deleting double from the book
>4)copying the book that remains to a file.
>
>What function in Crafty is responsible for 3?
It is in bookup.c:
if (current.position == next.position) {
current.status_played = current.status_played | next.status_played;
played++;
if (temp.status & 128 && temp.percent_play & 128)
wins++;
if (temp.status & 128 && !(temp.percent_play & 128))
losses++;
if (temp.status & 32 && !(temp.percent_play & 128))
wins++;
if (temp.status & 32 && temp.percent_play & 128)
losses++;
That is what happens when the next position signature is the same as the current
(a duplicate)...
>Maybe qsort already delete doubles but it is not clear and I think it is may be
>possible to sort 2 3 4 1 3 as 1 2 3 3 4 and not as 1 2 3 4.
>
>Uri
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.