hgm wrote:Code: Select all
$ ./qperft 6 "1B3k2/P2Q4/7p/8/P1N1B1p1/7b/7b/7K w - -"
- - - - - - - - - - - -
- - - - - - - - - - - -
- - . B . . . k . . - -
- - P . . Q . . . . - -
- - . . . . . . . p - -
- - . . . . . . . . - -
- - P . N . B . p . - -
- - . . . . . . . b - -
- - . . . . . . . b - -
- - . . . . . . . K - -
- - - - - - - - - - - -
- - - - - - - - - - - -
Quick Perft by H.G. Muller
Perft mode: No hashing, bulk counting in horizon nodes
perft(1)=52 ( 0.000 sec)
perft(2)=530 ( 0.000 sec)
perft(3)=22749 ( 0.000 sec)
perft(4)=263591 ( 0.050 sec)
perft(5)=10871062 ( 0.981 sec)
perft(6)=137871803 (22.532 sec)
Note that qperft can be downloaded from my website, so you could generate these data easily yourself.
Note that your move generator (i.e. perft counts) are unlikely to be the problem, a
s you do find the correct solution whent you search without hash. Even if the counts would be totaly off, e.g. because your Queens did not have any backward moves, you should still find the same mate in 3 with and without hashing.
Let's be clear on one thing. Not only do I find the correct answer without hash,
I find the correct answer with hash, when I use exact matches on the depth. The problem manifests itself in small percentage of case only when I use inexact ( depth <= stored depth ).
I change == to <= and there is this problem in maybe one or two positions out of 5000
I should point out that my perft routine also includes hash key verification as follows
the very first entries in my perft method are as follows...
Code: Select all
if( gs.zKey != Utils.calcZ( getFen() ) ) {
System.out.println("Houston we have a problem at depth = " +depth);
System.exit(0);
}
This routine constructs a fen string from the position array and game state variables, then builds a zKey (hash key actually) from that, then compares the zKey with that which is maintained incrementally during search. This is done for every node. the position in question passed the test for si6 independent searches, from 1 through 6.
So I am not sure what else to do. I intend to use the same z Key verification in my alphaBeta, If that works, and I expect it will, then I guess it is time to take a dump

, It's not clear if that will show me why there is a problem, but I guess I will see.
p.s. the position passes the hash key verification test for search depth = 6