help validating perft numbers

Discussion of chess software programming and technical issues.

Moderator: Ras

jesper_nielsen

help validating perft numbers

Post by jesper_nielsen »

Hello!

I have recently found a bug in Pupsi's check evasion move generator, causing it to not consider blocking the path with a promotion.

[d]2K5/3P4/2k1q3/8/3R4/8/8/8 b - - 14 120

So in this position it happily plays Qg8# with a big smile on it's face!

I think i have fixed the bug, but if someone would be willing to confirm the perft numbers for me, i would appriciate it.

perft 1: 24
perft 2: 360
perft 3: 7554
perft 4: 123671
perft 5: 2611766
perft 6: 45554896

Thanks in advance!

Kind regards,
Jesper
Mincho Georgiev
Posts: 454
Joined: Sat Apr 04, 2009 6:44 pm
Location: Bulgaria

Re: help validating perft numbers

Post by Mincho Georgiev »

Code: Select all

Pawny 0.13
setboard 2K5/3P4/2k1q3/8/3R4/8/8/8 b - - 14 120
perft 8

-----------------------
 depth   nodes
-----------------------
     1   24
     2   360
     3   7554
     4   123671
     5   2611766
     6   45554896
     7   969124580
     8   17883914386
-----------------------
Confirmed ! :wink:
jesper_nielsen

Re: help validating perft numbers

Post by jesper_nielsen »

xcomponent wrote:

Code: Select all

Pawny 0.13
setboard 2K5/3P4/2k1q3/8/3R4/8/8/8 b - - 14 120
perft 8

-----------------------
 depth   nodes
-----------------------
     1   24
     2   360
     3   7554
     4   123671
     5   2611766
     6   45554896
     7   969124580
     8   17883914386
-----------------------
Confirmed ! :wink:
Brilliant! Thanks! :)

/jesper
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: help validating perft numbers

Post by bob »

those match my results:

Crafty v23.1 (1 cpus)

White(1): 2K5/3P4/2k1q3/8/3R4/8/8/8 b - - 14 120
Black(1): perft 1
total moves=24 time=0.00
Black(1): perft 2
total moves=360 time=0.00
Black(1): perft 3
total moves=7554 time=0.00
Black(1): perft 4
total moves=123671 time=0.01
Black(1): perft 5
total moves=2611766 time=0.26
Black(1): perft 6
total moves=45554896 time=4.89
Black(1):
Dann Corbit
Posts: 12792
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: help validating perft numbers

Post by Dann Corbit »

jesper_nielsen wrote:Hello!

I have recently found a bug in Pupsi's check evasion move generator, causing it to not consider blocking the path with a promotion.

[d]2K5/3P4/2k1q3/8/3R4/8/8/8 b - - 14 120

So in this position it happily plays Qg8# with a big smile on it's face!

I think i have fixed the bug, but if someone would be willing to confirm the perft numbers for me, i would appriciate it.

perft 1: 24
perft 2: 360
perft 3: 7554
perft 4: 123671
perft 5: 2611766
perft 6: 45554896

Thanks in advance!

Kind regards,
Jesper
Movei results:

Code: Select all

setboard 2K5/3P4/2k1q3/8/3R4/8/8/8 b - -
perft 1
telluser perft(1) = 24,time=150
perft 2
telluser perft(2) = 360,time=0
perft 3
telluser perft(3) = 7554,time=0
perft 4
telluser perft(4) = 123671,time=5
perft 5
telluser perft(5) = 2611766,time=84
perft 6
telluser perft(6) = 45554896,time=1479
perft 7
telluser perft(7) = 969124580,time=24025
perft 8
telluser perft(8) = 17883914386,time=554368
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: help validating perft numbers

Post by stegemma »

I confirm until ply 8:

2K5/3P4/2k1q3/8/3R4/8/8/8 b - - 14 120

Freccia:

1: perft=24 ms=1
2: perft=360 ms=1
3: perft=7554 ms=1
4: perft=123671 ms=9
5: perft=2611766 ms=212
6: perft=45554896 ms=3017
7: perft=969124580 ms=75735
8: perft=17883914386 ms=1129668

(times in milliseconds)
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: help validating perft numbers

Post by bob »

Dann Corbit wrote:
jesper_nielsen wrote:Hello!

I have recently found a bug in Pupsi's check evasion move generator, causing it to not consider blocking the path with a promotion.

[d]2K5/3P4/2k1q3/8/3R4/8/8/8 b - - 14 120

So in this position it happily plays Qg8# with a big smile on it's face!

I think i have fixed the bug, but if someone would be willing to confirm the perft numbers for me, i would appriciate it.

perft 1: 24
perft 2: 360
perft 3: 7554
perft 4: 123671
perft 5: 2611766
perft 6: 45554896

Thanks in advance!

Kind regards,
Jesper
Movei results:

Code: Select all

setboard 2K5/3P4/2k1q3/8/3R4/8/8/8 b - -
perft 1
telluser perft(1) = 24,time=150
perft 2
telluser perft(2) = 360,time=0
perft 3
telluser perft(3) = 7554,time=0
perft 4
telluser perft(4) = 123671,time=5
perft 5
telluser perft(5) = 2611766,time=84
perft 6
telluser perft(6) = 45554896,time=1479
perft 7
telluser perft(7) = 969124580,time=24025
perft 8
telluser perft(8) = 17883914386,time=554368
I am curious about your "times" above. I would assume those are times in milliseconds? I am guessing this because the first 7 are faster than Crafty, but when we get to perft 8, suddenly Crafty is 3x faster???

Here's my numbers:

Black(1): perft 6
total moves=45554896 time=3.50
Black(1): perft 7
total moves=969124580 time=69.68
Black(1): perft 8
total moves=17883914386 time=1311.43

This on a 2.0ghz laptop. I don't do the perft hashing trick, so I really traverse and make/unmake each move as well as do the move generations and check them for legality.
User avatar
Zach Wegner
Posts: 1922
Joined: Thu Mar 09, 2006 12:51 am
Location: Earth

Re: help validating perft numbers

Post by Zach Wegner »

bob wrote:
Dann Corbit wrote:
jesper_nielsen wrote:Hello!

I have recently found a bug in Pupsi's check evasion move generator, causing it to not consider blocking the path with a promotion.

[d]2K5/3P4/2k1q3/8/3R4/8/8/8 b - - 14 120

So in this position it happily plays Qg8# with a big smile on it's face!

I think i have fixed the bug, but if someone would be willing to confirm the perft numbers for me, i would appriciate it.

perft 1: 24
perft 2: 360
perft 3: 7554
perft 4: 123671
perft 5: 2611766
perft 6: 45554896

Thanks in advance!

Kind regards,
Jesper
Movei results:

Code: Select all

setboard 2K5/3P4/2k1q3/8/3R4/8/8/8 b - -
perft 1
telluser perft(1) = 24,time=150
perft 2
telluser perft(2) = 360,time=0
perft 3
telluser perft(3) = 7554,time=0
perft 4
telluser perft(4) = 123671,time=5
perft 5
telluser perft(5) = 2611766,time=84
perft 6
telluser perft(6) = 45554896,time=1479
perft 7
telluser perft(7) = 969124580,time=24025
perft 8
telluser perft(8) = 17883914386,time=554368
I am curious about your "times" above. I would assume those are times in milliseconds? I am guessing this because the first 7 are faster than Crafty, but when we get to perft 8, suddenly Crafty is 3x faster???

Here's my numbers:

Black(1): perft 6
total moves=45554896 time=3.50
Black(1): perft 7
total moves=969124580 time=69.68
Black(1): perft 8
total moves=17883914386 time=1311.43

This on a 2.0ghz laptop. I don't do the perft hashing trick, so I really traverse and make/unmake each move as well as do the move generations and check them for legality.
1311.43 > 554.368. :lol:

And for the record, ZCT beats everything. At least it can do something worthwhile.

Code: Select all

(zct)1... perft 6
moves=45554896 time=0.719
(zct)1... perft 7
moves=969124580 time=15.775
(zct)1... perft 8
moves=17883914386 time=4:36
User avatar
hgm
Posts: 28391
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: help validating perft numbers

Post by hgm »

1.3GHz Celeron-M laptop:

Code: Select all

$ ./qperft 8 H23 "2K5/3P4/2k1q3/8/3R4/8/8/8 b - - 0 1"
Hash-table size = 7fffff, Starts at 4a0040
 - - - - - - - - - - - -
 - - - - - - - - - - - -
 - - . . K . . . . . - -
 - - . . . P . . . . - -
 - - . . k . q . . . - -
 - - . . . . . . . . - -
 - - . . . R . . . . - -
 - - . . . . . . . . - -
 - - . . . . . . . . - -
 - - . . . . . . . . - -
 - - - - - - - - - - - -
 - - - - - - - - - - - -

Quick Perft by H.G. Muller
Perft mode: Hash-table size = 128MB, bulk counting in horizon nodes

perft(1)=24 ( 0.000 sec)        probes=       0, entries=       0 hits=       0

perft(2)=360 ( 0.000 sec)       probes=      29, entries=      29 hits=       0

perft(3)=7554 ( 0.010 sec)      probes=     390, entries=     419 hits=       0

perft(4)=123671 ( 0.010 sec)    probes=    9479, entries=    4778 hits=    1866

perft(5)=2611766 ( 0.120 sec)   probes=   49338, entries=   35832 hits=   18162

perft(6)=45554896 ( 0.781 sec)  probes=  709196, entries=  196203 hits=  371924

perft(7)=969124580 ( 2.123 sec) probes= 2064426, entries=  887523 hits= 1284936

perft(8)=17883914386 (14.351 sec)       probes=18760156, entries= 2743564 hits=13414405
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: help validating perft numbers

Post by stegemma »

bob wrote:...Here's my numbers:

Black(1): perft 6
total moves=45554896 time=3.50
Black(1): perft 7
total moves=969124580 time=69.68
Black(1): perft 8
total moves=17883914386 time=1311.43

This on a 2.0ghz laptop. I don't do the perft hashing trick, so I really traverse and make/unmake each move as well as do the move generations and check them for legality.
I'm curious me too. Even Freccia does a complete search with full make/unmake and a full "slow" test for check at any move (for check it tests all the possible squares from the King, as to generates queen's moves plus knight moves). My time is about 1100 seconds. About half the time can be reached with a better check test algorithm than mine. Maybe with transposition tables and avoiding make/unmake move at the last node can give even more better results, i think. For me, having a perft better than Crafty (on the same machine) is more than expected and i don't optimize further, until the other algorithm will be completed.