Good catch! I also spotted a bug in qperft which people said it was due to hashing. These little things do not fog the great work by HGM.stegemma wrote:Embedding quick perft in my engine has speed-up development and this doesn't find bugs only in Satana, but in qperft too!!!
In this position, qperft gives me the wrong count, both in the embedded and in the command line version:
FEN: k7/8/8/8/8/8/3b1P2/4K3 w
Satana reports 4 while perft reports 6:
Code: Select all
D:\A\Cpp\Scacchi\AltriMotori>perft 1 "k7/8/8/8/8/8/3b1P2/4K3 w" - - - - - - - - - - - - - - - - - - - - - - - - - - k . . . . . . . - - - - . . . . . . . . - - - - . . . . . . . . - - - - . . . . . . . . - - - - . . . . . . . . - - - - . . . . . . . . - - - - . . . b . P . . - - - - . . . . K . . . - - - - - - - - - - - - - - - - - - - - - - - - - - Quick Perft by H.G. Muller Perft mode: No hashing, bulk counting in horizon nodes perft( 1)= 6 ( 0.000 sec)
Using JetChess in this position, just for verification purposes:
Code: Select all
k7/8/8/8/8/8/3b1P2/4K3 w - -
Only moves: Kf1, Kd1, Kxd2, Ke2.
perft(1) = 4
perft(2) = 39
perft(3) = 244
perft(4) = 2,653
perft(5) = 17,386
perft(6) = 202,238
perft(7) = 1,390,017
perft(8) = 17,262,346
perft(9) = 119,631,160
perft(10) = 1,555,125,531
perft(11) = 10,835,983,182
perft(12) = 145,708,543,492
perft(13) = 1,015,505,344,951
perft(14) = 13,975,998,741,382
perft(15) = 97,423,123,713,706
perft(16) = 1,361,998,961,400,591
perft(17) = 9,519,034,301,245,381
perft(18) = 134,399,711,650,205,020
perft(19) = 949,523,553,081,699,655
perft(20) = 13,466,358,044,176,829,892
Code: Select all
1 Ke1-f1 3898242640434849350
2 Ke1-d1 3493098502582001309
3 Ke1*d2 9907521647705099
4 Ke1-e2 6065109379512274134
Total: -4980386029532721724
-4.980.386.029.532.721.724 (Move pathes after 20 half moves)
Time: 932.302 s
Of course: 2^(64) - 4,980,386,029,532,721,724 = 13,466,358,044,176,829,892 (as expected, so there was an overflow only).
I hope no typos.
Regards from Spain.
Ajedrecista.