Author: Uri Blass
Date: 11:36:48 01/01/02
Go up one level in this thread
On January 01, 2002 at 13:25:44, Heiner Marxen wrote:
>On January 01, 2002 at 13:03:47, Gian-Carlo Pascutto wrote:
>
>>On December 31, 2001 at 21:06:49, Heiner Marxen wrote:
>>
>>>On December 31, 2001 at 17:07:31, Uri Blass wrote:
>>>
>>>>My program had problems with WAC 250 so I decided to ask it to calculate the
>>>>perft function and found that it cannot calculate perft 4 correctly
>>>>
>>>>The bug is that my program believed that double check from 2 rook directions is
>>>>impossible
>>>>
>>>>Here is the position of WAC 250
>>>>[D]1b5k/7P/p1p2np1/2P2p2/PP3P2/4RQ1R/q2r3P/6K1 w - - 0 1
>>>>
>>>>When I asked my program to calculate perft it failed in perft 4.
>>>>
>>>>My program did not count correctly the number of moves after
>>>>1.a5 Ng8 hxg8Q+
>>>>
>>
>>Sjeng: perft 4
>>Raw nodes for depth 4: 1353197
>>Time : 0.93
>>
>>Sjeng: perft 5
>>Raw nodes for depth 5: 40590029
>>Time : 11.97
>>
>>Are these numbers correct?
>>
>>--
>>GCP
>
>Chest agrees with your numbers:
>
>FEN: 1b5k/7P/p1p2np1/2P2p2/PP3P2/4RQ1R/q2r3P/6K1 w - -
>Counting width of legal tree, 5 plies deep...
>Time (user) = 9.84 sec
>dep #nodes quot sum nodes
> 0 1 [ 0.000] 1
> 1 31 [ 31.000] 32
> 2 1213 [ 39.129] 1245
> 3 35927 [ 29.618] 37172
> 4 1353197 [ 37.665] 1390369
> 5 40590029 [ 29.996] 41980398
>
>(Done on a K7/600)
>
>Cheers,
>Heiner
I guess that 6.289 second of my program on p800 is considered to be slightly
faster
Note that now I have some socres in my move generator for move ordering that are
not needed for calculating perft and I did not care to delete them for this
computation
I can add that correcting the bug was only deleting one else
and has no significant effect on speed.
It should do my program slightly slower only when it make moves that are checks
Here is the relevant part of my code now after I corrected it
if (temp>0)
{
//temp&3 means that 1 of the directions is up or down
//it means that the direction is 0 or 1 and that
///kingincheck&1=1
if (temp&3)
kingincheck++;
///temp&12 means that 1 of the directions is right
//or left=2 or 3 and that kingincheck&2=2
if (temp&12)
kingincheck+=2;
...
}
The previous wrong code had one else after kingincheck++;
temp is a 16 bits number that tells me the direction that the king is attacked
from
the varaible kingincheck gets the sum of the following numbers
1 for cases that the king is threatened from up down
2 for cases that the king is threatened from left right
4 for cases that the king is threatened from one diagnol direction(I do not
remember which one now)
8 for cases that the king is threatened from another diagnol that is not
parallel to the previous diagnol
16 for cases that the king is thretened by a knight.
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.