Perft for Seirawan chess?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Perft for Seirawan chess?

Post by Evert »

Does anyone have perft values for Seirawan chess?
I added support for Seirawan to my Spartan engine Leonidas, and it seems to be working properly but I'd like some independent verification.

For reference, my perft 6 from the starting position is

Code: Select all

 1         28
 2        784
 3      24830
 4     782599
 5   27639803
 6  967583328
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Perft for Seirawan chess?

Post by Ferdy »

Evert wrote:Does anyone have perft values for Seirawan chess?
I added support for Seirawan to my Spartan engine Leonidas, and it seems to be working properly but I'd like some independent verification.

For reference, my perft 6 from the starting position is

Code: Select all

 1         28
 2        784
 3      24830
 4     782599
 5   27639803
 6  967583328
I got the same result from 1 to 5 but not 6.

Here is my perft 6.

Code: Select all

# Sigla v2015.1.2.8
# Can only play seirawan chess variant

new
# rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR[HEhe] w KQkq -
# White pieces on-board: wq 1, we 0, wh 0, wr 2, wb 2, wn 2, wp 8
# Black pieces on-board: bq 1, be 0, bh 0, br 2, bb 2, bn 2, bp 8
# Pieces on-hand: we 1, wh 1, be 1, bh 1
# White virgin squares: e1, h1, g1, f1, d1, c1, b1, a1,
# Black virgin squares: e8, h8, g8, f8, d8, c8, b8, a8,

perft 6

8  r n b q k b n r
7  o o o o o o o o
6  . . . . . . . .
5  . . . . . . . .
4  . . . . . . . .
3  . . . . . . . .
2  P P P P P P P P
1  R N B Q K B N R

   a b c d e f g h


   a2a3 - 26244518
   a2a4 - 35704520
   b2b3 - 35090343
   b2b4 - 34901155
   c2c3 - 36086291
   c2c4 - 41422507
   d2d3 - 66325768
   d2d4 - 75854980
   e2e3 - 87054576
   e2e4 - 87789463
   f2f3 - 25803648
   f2f4 - 30843423
   g2g3 - 35404600
   g2g4 - 34510109
   h2h3 - 26240447
   h2h4 - 35903703
   b1a3 - 24472283
  b1a3h - 17358676
  b1a3e - 17258912
   b1c3 - 27639135
  b1c3h - 19688617
  b1c3e - 19798785
   g1f3 - 27516771
  g1f3h - 19652549
  g1f3e - 19749769
   g1h3 - 24519638
  g1h3h - 17450752
  g1h3e - 17298971

 Perft 6 Summary
 Counts: 967584909
 Time: 234.57 sec
Just implemented castle move with gating at rook file. I have this position created to see the engine generate such gating type move.

Code: Select all

# Sigla v2015.1.2.8
# Can only play seirawan chess variant

setboard r3k2r/p1qnbppp/2pppn2/1pP2bB1/Q2P4/2N1PN2/PP2BPPP/R3K2R[HEhe] w KQkq b6 0 10

# White pieces on-board: wq 1, we 0, wh 0, wr 2, wb 2, wn 2, wp 8
# Black pieces on-board: bq 1, be 0, bh 0, br 2, bb 2, bn 2, bp 8
# Pieces on-hand: we 1, wh 1, be 1, bh 1
# White virgin squares: e1, h1, a1,
# Black virgin squares: e8, h8, a8,

perft 5

8  r . . . k . . r
7  o . q n b o o o
6  . . o o o n . .
5  . o P . . b B .
4  Q . . P . . . .
3  . . N . P N . .
2  P P . . B P P P
1  R . . . K . . R

   a b c d e f g h


   c5d6 - 17378776
   d4d5 - 19744932
   e3e4 - 16305896
   a2a3 - 17015496
   b2b3 - 14523738
   b2b4 - 14119586
   g2g3 - 15838974
   g2g4 - 15386300
   h2h3 - 17641096
   h2h4 - 17743420
   c5b6 - 17176702
   c3b5 - 14505851
   c3d5 - 16536512
   c3e4 - 13979781
   c3b1 - 12493052
   c3d1 - 9984941
   f3e5 - 20637847
   f3h4 - 17297416
   f3d2 - 18471708
   f3g1 - 15073699
   g5f6 - 16425738
   g5h6 - 16102912
   g5f4 - 17889832
   g5h4 - 15864800
   e2d3 - 18327786
   e2c4 - 19041458
   e2b5 - 17050362
   e2d1 - 12366052
   e2f1 - 16524584
   a1b1 - 12101125
  a1b1h - 10253559
  a1b1e - 10222847
   a1c1 - 12900344
  a1c1h - 10979305
  a1c1e - 11335141
   a1d1 - 11174414
  a1d1h - 9676085
  a1d1e - 10387318
   h1g1 - 12592949
  h1g1h - 10056927
  h1g1e - 10020584
   h1f1 - 11531024
  h1f1h - 9370962
  h1f1e - 9713448
   a4a5 - 15268028
   a4a6 - 13624156
   a4a7 - 16730301
   a4b5 - 16213895
   a4b4 - 14310164
   a4c4 - 15116667
   a4a3 - 14135652
   a4b3 - 15520265
   a4c2 - 15774688
   a4d1 - 15761496
   e1d2 - 17183037
  e1d2h - 9138384
  e1d2e - 10826168
   e1d1 - 10160158
  e1d1h - 8340927
  e1d1e - 8564856
   e1f1 - 10500263
  e1f1h - 8746702
  e1f1e - 9256172
   e1g1 - 10002477
  e1g1h - 7813014
  e1g1e - 8276048
  h1e1h - 8812150
  h1e1e - 8786622
   e1c1 - 9352465
  e1c1h - 7688786
  e1c1e - 7902389
  a1e1h - 9157471
  a1e1e - 9485936

 Perft 5 Summary
 Counts: 966214616
 Time: 248.16 sec
User avatar
Ajedrecista
Posts: 1971
Joined: Wed Jul 13, 2011 9:04 pm
Location: Madrid, Spain.

Re: Perft for Seirawan chess?

Post by Ajedrecista »

Hello:

I downloaded Sjaak II beta 5 (by Evert) just to compare the divided Perft(6) of Seirawan Chess. This is what I obtained:

Code: Select all

  Nb1-a3   24472283   24472283
  Nb1-c3   27639135   52111418
  Ng1-f3   27516771   79628189
  Ng1-h3   24519638  104147827
   a2-a3   26244518  130392345
   b2-b3   35090343  165482688
   c2-c3   36086291  201568979
   d2-d3   66325768  267894747
   e2-e3   87052158  354946905
   f2-f3   25803648  380750553
   g2-g3   35404600  416155153
   h2-h3   26240447  442395600
   a2-a4   35704520  478100120
   b2-b4   34901155  513001275
   c2-c4   41422489  554423764
   d2-d4   75854980  630278744
   e2-e4   87788350  718067094
   f2-f4   30843423  748910517
   g2-g4   34510109  783420626
   h2-h4   35903703  819324329
Nb1-a3/H   17358676  836683005
Nb1-a3/E   17258912  853941917
Nb1-c3/H   19688617  873630534
Nb1-c3/E   19798785  893429319
Ng1-f3/H   19652549  913081868
Ng1-f3/E   19749769  932831637
Ng1-h3/H   17450752  950282389
Ng1-h3/E   17298971  967581360
 6  967581360 223.95   4320566.32nps
The first column of numbers is the divided perft itself for each move; the other column is the sum of all the divided perfts until the last one computed.

The number 967581360 (by Evert's Sjaak II) is different from the number 967583328 (by Evert's Leonidas) and also different from the number 967584909 (by Ferdinand's Sigla). Just comparing Sjaak II and Sigla outputs, I see differences in the following starting moves: e3, c4 and e4. It is only a comparison by sight, nothing automatic.

It would be useful that Evert could provide a divided perft of Leonidas just like Sjaak II and Sigla do. Then, Evert and Ferdinand should do a bug hunting in perft and isolate the conflictive positions. Good luck to both of you!

@Evert: I think that it is better to not give a value of Perft(6) of Seirawan variant here until both of you reach an agreement.

Regards from Spain.

Ajedrecista.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Perft for Seirawan chess?

Post by Evert »

Ajedrecista wrote:Hello:

I downloaded Sjaak II beta 5 (by Evert) just to compare the divided Perft(6) of Seirawan Chess. This is what I obtained:

Code: Select all

  Nb1-a3   24472283   24472283
  Nb1-c3   27639135   52111418
  Ng1-f3   27516771   79628189
  Ng1-h3   24519638  104147827
   a2-a3   26244518  130392345
   b2-b3   35090343  165482688
   c2-c3   36086291  201568979
   d2-d3   66325768  267894747
   e2-e3   87052158  354946905
   f2-f3   25803648  380750553
   g2-g3   35404600  416155153
   h2-h3   26240447  442395600
   a2-a4   35704520  478100120
   b2-b4   34901155  513001275
   c2-c4   41422489  554423764
   d2-d4   75854980  630278744
   e2-e4   87788350  718067094
   f2-f4   30843423  748910517
   g2-g4   34510109  783420626
   h2-h4   35903703  819324329
Nb1-a3/H   17358676  836683005
Nb1-a3/E   17258912  853941917
Nb1-c3/H   19688617  873630534
Nb1-c3/E   19798785  893429319
Ng1-f3/H   19652549  913081868
Ng1-f3/E   19749769  932831637
Ng1-h3/H   17450752  950282389
Ng1-h3/E   17298971  967581360
 6  967581360 223.95   4320566.32nps
The first column of numbers is the divided perft itself for each move; the other column is the sum of all the divided perfts until the last one computed.

The number 967581360 (by Evert's Sjaak II) is different from the number 967583328 (by Evert's Leonidas) and also different from the number 967584909 (by Ferdinand's Sigla). Just comparing Sjaak II and Sigla outputs, I see differences in the following starting moves: e3, c4 and e4. It is only a comparison by sight, nothing automatic.
Sjaak II 1.0 RC1 gives the following:

Code: Select all

  Nb1-a3   24472283   24472283
  Nb1-c3   27639135   52111418
  Ng1-f3   27516771   79628189
  Ng1-h3   24519638  104147827
   a2-a3   26244518  130392345
   b2-b3   35090343  165482688
   c2-c3   36086291  201568979
   d2-d3   66325768  267894747
   e2-e3   87052944  354947691
   f2-f3   25803648  380751339
   g2-g3   35404600  416155939
   h2-h3   26240447  442396386
   a2-a4   35704520  478100906
   b2-b4   34901155  513002061
   c2-c4   41422489  554424550
   d2-d4   75854980  630279530
   e2-e4   87789145  718068675
   f2-f4   30843423  748912098
   g2-g4   34510109  783422207
   h2-h4   35903703  819325910
Nb1-a3/H   17358676  836684586
Nb1-a3/E   17258912  853943498
Nb1-c3/H   19688617  873632115
Nb1-c3/E   19798785  893430900
Ng1-f3/H   19652549  913083449
Ng1-f3/E   19749769  932833218
Ng1-h3/H   17450752  950283970
Ng1-h3/E   17298971  967582941
 6  967582941 115.38   8386185.53nps
It'll be good indeed to figure out where the divergence is. I'll look into this later tonight.

It would be useful that Evert could provide a divided perft of Leonidas just like Sjaak II and Sigla do. Then, Evert and Ferdinand should do a bug hunting in perft and isolate the conflictive positions. Good luck to both of you!
I can produce one, but it needs to be done by hacking the source (which is annoying). I'll have a look at that tonight as well.
@Evert: I think that it is better to not give a value of Perft(6) of Seirawan variant here until both of you reach an agreement.
Well, I don't claim that those results are correct, just that that is what I get. ;)
I'll definitely update it with the correct result, when we've found out what that is.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Perft for Seirawan chess?

Post by Evert »

Incredible to see just how many stupid bugs one can make that break things, and yet seem to go undetected using test matches.

SjaakII current:

Code: Select all

  Nb1-a3   24472283   24472283
  Nb1-c3   27639135   52111418
  Ng1-f3   27516771   79628189
  Ng1-h3   24519638  104147827
   a2-a3   26244518  130392345
   b2-b3   35090343  165482688
   c2-c3   36086507  201569195
   d2-d3   66325768  267894963
   e2-e3   87055566  354950529
   f2-f3   25803648  380754177
   g2-g3   35404600  416158777
   h2-h3   26240447  442399224
   a2-a4   35704520  478103744
   b2-b4   34901155  513004899
   c2-c4   41422507  554427406
   d2-d4   75854980  630282386
   e2-e4   87790489  718072875
   f2-f4   30843423  748916298
   g2-g4   34510109  783426407
   h2-h4   35903703  819330110
Nb1-a3/H   17358676  836688786
Nb1-a3/E   17258912  853947698
Nb1-c3/H   19688617  873636315
Nb1-c3/E   19798785  893435100
Ng1-f3/H   19652549  913087649
Ng1-f3/E   19749769  932837418
Ng1-h3/H   17450752  950288170
Ng1-h3/E   17298971  967587141
 6  967587141 118.61   8157988.55nps
I'm probably going to call it a day for now, will try to square things with Leonidas tomorrow. The cases I've looked at here, when Leonidas and SjaakII disagreed, Leonidas was right.

Anyway, for perft 5 in the position r3k2r/p1qnbppp/2pppn2/1pP2bB1/Q2P4/2N1PN2/PP2BPPP/R3K2R[HEhe] w KQkq b6 0 10 I get (compare with 966214616):

Code: Select all

SjaakII:
  Nc3-b1   10291824   10291824
  Nc3-d1    9888815   20180639
  Nc3-e4   13815063   33995702
  Nc3-d5   16355898   50351600
  Nc3xb5   14344153   64695753
  Nf3-g1   13286088   77981841
  Nf3-d2   18275298   96257139
  Nf3-h4   17101322  113358461
  Nf3-e5   20421525  133779986
  Be2-d1   12254060  146034046
  Be2-f1   13263714  159297760
  Be2-d3   18103544  177401304
  Be2-c4   18806200  196207504
  Be2xb5   16820308  213027812
  Bg5-f4   17675316  230703128
  Bg5-h4   15660840  246363968
  Bg5-h6   15899384  262263352
  Bg5xf6   16239118  278502470
  Ra1-b1   11947235  290449705
  Ra1-c1   12728554  303178259
  Ra1-d1   11047140  314225399
  Rh1-f1   11381808  325607207
  Rh1-g1   12423045  338030252
  Qa4-d1   11102737  349132989
  Qa4-c2   15572846  364705835
  Qa4-a3   13999122  378704957
  Qa4-b3   15320083  394025040
  Qa4-b4   14164756  408189796
  Qa4-c4   14982333  423172129
  Qa4-a5   15118400  438290529
  Qa4-a6   13486126  451776655
  Qa4xb5   16069167  467845822
  Qa4xa7   16581583  484427405
     O-O    9868945  494296350
   O-O-O    9234723  503531073
  Ke1-d1   10038364  513569437
  Ke1-f1   10348979  523918416
  Ke1-d2   16975415  540893831
   e3-e4   16067904  556961735
   d4-d5   19511136  576472871
   a2-a3   16813924  593286795
   b2-b3   14377804  607664599
   g2-g3   15621222  623285821
   h2-h3   17436368  640722189
   b2-b4   13927334  654649523
   g2-g4   15172648  669822171
   h2-h4   17530468  687352639
   c5xd6   17157804  704510443
   c5xb6   16969172  721479615
Ra1-b1/H   10153516  731633131
Ra1-b1/E   10123024  741756155
Ra1-c1/H   10868598  752624753
Ra1-c1/E   11222504  763847257
Ra1-d1/H    9590037  773437294
Ra1-d1/E   10297364  783734658
Rh1-f1/H    9276476  793011134
Rh1-f1/E    9617096  802628230
Rh1-g1/H    9951245  812579475
Rh1-g1/E    9915102  822494577
 O-O/He1    7734095  830228672
 O-O/Ee1    8194597  838423269
 O-O/Hh1    8724226  847147495
 O-O/Eh1    8698838  855846333
O-O-O/He1    7613259  863459592
O-O-O/Ee1    7825696  871285288
O-O-O/Ha1    9073994  880359282
O-O-O/Ea1    9400673  889759955
Ke1-d1/H    8261367  898021322
Ke1-d1/E    8484030  906505352
Ke1-f1/H    8655037  915160389
Ke1-f1/E    9161715  924322104
Ke1-d2/H    9041630  933363734
Ke1-d2/E   10719972  944083706
 5  944083706 157.18   6006377.27nps

Code: Select all

Leonidas:
  Ra1-b1   11947235   11947235
  Ra1-c1   12728554   24675789
  Ra1-d1   11047140   35722929
  Rh1-f1   11381808   47104737
  Rh1-g1   12423045   59527782
  Qa4-a3   13999122   73526904
  Qa4-b4   14164756   87691660
  Qa4-c4   14982333  102673993
  Qa4-a5   15117822  117791815
  Qa4-a6   13481424  131273239
  Qa4xa7   16573127  147846366
  Be2-d1   12254060  160100426
  Be2-f1   13263714  173364140
  Be2-d3   18103544  191467684
  Be2-c4   18806200  210273884
  Be2xb5   16820308  227094192
  Qa4-d1   11102737  238196929
  Qa4-c2   15572846  253769775
  Qa4-b3   15320083  269089858
  Qa4xb5   16064819  285154677
  Bg5-f4   17675316  302829993
  Bg5-h4   15660840  318490833
  Bg5-h6   15899384  334390217
  Bg5xf6   16239118  350629335
  Nc3-b1   10291824  360921159
  Nc3-d1    9888815  370809974
  Nc3-e4   13815063  384625037
  Nc3-d5   16355896  400980933
  Nc3xb5   14344151  415325084
  Nf3-g1   13286088  428611172
  Nf3-d2   18275298  446886470
  Nf3-h4   17101322  463987792
  Nf3-e5   20421525  484409317
  Ke1-d1   10038364  494447681
  Ke1-f1   10348979  504796660
  Ke1-d2   16975415  521772075
   a2-a3   16813924  538585999
   b2-b3   14377804  552963803
   b2-b4   13927334  566891137
   g2-g3   15621222  582512359
   g2-g4   15172648  597685007
   h2-h3   17436368  615121375
   h2-h4   17530468  632651843
   e3-e4   16067904  648719747
   d4-d5   19511136  668230883
   c5xb6   16969022  685199905
   c5xd6   17157804  702357709
     O-O    9868945  712226654
   O-O-O    9234723  721461377
Ra1-b1/Ha1   10153516  731614893
Ra1-b1/Ea1   10123024  741737917
Ra1-c1/Ha1   10868598  752606515
Ra1-c1/Ea1   11222504  763829019
Ra1-d1/Ha1    9590037  773419056
Ra1-d1/Ea1   10297364  783716420
Rh1-f1/Hh1    9276476  792992896
Rh1-f1/Eh1    9617096  802609992
Rh1-g1/Hh1    9951245  812561237
Rh1-g1/Eh1    9915102  822476339
Ke1-d1/He1    8261367  830737706
Ke1-d1/Ee1    8484030  839221736
Ke1-f1/He1    8655037  847876773
Ke1-f1/Ee1    9161715  857038488
Ke1-d2/He1    9041630  866080118
Ke1-d2/Ee1   10719972  876800090
 O-O/He1    7734095  884534185
 O-O/Ee1    8194597  892728782
 O-O/Hh1    8724226  901453008
 O-O/Eh1    8698838  910151846
O-O-O/He1    7613259  917765105
O-O-O/Ee1    7825696  925590801
O-O-O/Ha1    9073994  934664795
O-O-O/Ea1    9400673  944065468
 5  944065468 87.58  10779628.81nps
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Perft for Seirawan chess?

Post by Evert »

Ferdy wrote: Here is my perft 6.

Code: Select all

# Sigla v2015.1.2.8
# Can only play seirawan chess variant

new
# rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR[HEhe] w KQkq -
# White pieces on-board: wq 1, we 0, wh 0, wr 2, wb 2, wn 2, wp 8
# Black pieces on-board: bq 1, be 0, bh 0, br 2, bb 2, bn 2, bp 8
# Pieces on-hand: we 1, wh 1, be 1, bh 1
# White virgin squares: e1, h1, g1, f1, d1, c1, b1, a1,
# Black virgin squares: e8, h8, g8, f8, d8, c8, b8, a8,

perft 6

8  r n b q k b n r
7  o o o o o o o o
6  . . . . . . . .
5  . . . . . . . .
4  . . . . . . . .
3  . . . . . . . .
2  P P P P P P P P
1  R N B Q K B N R

   a b c d e f g h


   a2a3 - 26244518
   a2a4 - 35704520
   b2b3 - 35090343
   b2b4 - 34901155
   c2c3 - 36086291
   c2c4 - 41422507
   d2d3 - 66325768
   d2d4 - 75854980
   e2e3 - 87054576
   e2e4 - 87789463
   f2f3 - 25803648
   f2f4 - 30843423
   g2g3 - 35404600
   g2g4 - 34510109
   h2h3 - 26240447
   h2h4 - 35903703
   b1a3 - 24472283
  b1a3h - 17358676
  b1a3e - 17258912
   b1c3 - 27639135
  b1c3h - 19688617
  b1c3e - 19798785
   g1f3 - 27516771
  g1f3h - 19652549
  g1f3e - 19749769
   g1h3 - 24519638
  g1h3h - 17450752
  g1h3e - 17298971

 Perft 6 Summary
 Counts: 967584909
 Time: 234.57 sec
The development version of SjaakII now agrees:

Code: Select all

  Nb1-a3   24472283   24472283
  Nb1-c3   27639135   52111418
  Ng1-f3   27516771   79628189
  Ng1-h3   24519638  104147827
   a2-a3   26244518  130392345
   b2-b3   35090343  165482688
   c2-c3   36086291  201568979
   d2-d3   66325768  267894747
   e2-e3   87054576  354949323
   f2-f3   25803648  380752971
   g2-g3   35404600  416157571
   h2-h3   26240447  442398018
   a2-a4   35704520  478102538
   b2-b4   34901155  513003693
   c2-c4   41422507  554426200
   d2-d4   75854980  630281180
   e2-e4   87789463  718070643
   f2-f4   30843423  748914066
   g2-g4   34510109  783424175
   h2-h4   35903703  819327878
Nb1-a3/H   17358676  836686554
Nb1-a3/E   17258912  853945466
Nb1-c3/H   19688617  873634083
Nb1-c3/E   19798785  893432868
Ng1-f3/H   19652549  913085417
Ng1-f3/E   19749769  932835186
Ng1-h3/H   17450752  950285938
Ng1-h3/E   17298971  967584909
Leonidas does not, but I've identified a bug that causes it to discard some moves from pinned pieces along the pin ray.

Code: Select all

# Sigla v2015.1.2.8
# Can only play seirawan chess variant

setboard r3k2r/p1qnbppp/2pppn2/1pP2bB1/Q2P4/2N1PN2/PP2BPPP/R3K2R[HEhe] w KQkq b6 0 10

# White pieces on-board: wq 1, we 0, wh 0, wr 2, wb 2, wn 2, wp 8
# Black pieces on-board: bq 1, be 0, bh 0, br 2, bb 2, bn 2, bp 8
# Pieces on-hand: we 1, wh 1, be 1, bh 1
# White virgin squares: e1, h1, a1,
# Black virgin squares: e8, h8, a8,

perft 5

8  r . . . k . . r
7  o . q n b o o o
6  . . o o o n . .
5  . o P . . b B .
4  Q . . P . . . .
3  . . N . P N . .
2  P P . . B P P P
1  R . . . K . . R

   a b c d e f g h


   c5d6 - 17378776
   d4d5 - 19744932
   e3e4 - 16305896
   a2a3 - 17015496
   b2b3 - 14523738
   b2b4 - 14119586
   g2g3 - 15838974
   g2g4 - 15386300
   h2h3 - 17641096
   h2h4 - 17743420
   c5b6 - 17176702
   c3b5 - 14505851
   c3d5 - 16536512
   c3e4 - 13979781
   c3b1 - 12493052
   c3d1 - 9984941
   f3e5 - 20637847
   f3h4 - 17297416
   f3d2 - 18471708
   f3g1 - 15073699
   g5f6 - 16425738
   g5h6 - 16102912
   g5f4 - 17889832
   g5h4 - 15864800
   e2d3 - 18327786
   e2c4 - 19041458
   e2b5 - 17050362
   e2d1 - 12366052
   e2f1 - 16524584
   a1b1 - 12101125
  a1b1h - 10253559
  a1b1e - 10222847
   a1c1 - 12900344
  a1c1h - 10979305
  a1c1e - 11335141
   a1d1 - 11174414
  a1d1h - 9676085
  a1d1e - 10387318
   h1g1 - 12592949
  h1g1h - 10056927
  h1g1e - 10020584
   h1f1 - 11531024
  h1f1h - 9370962
  h1f1e - 9713448
   a4a5 - 15268028
   a4a6 - 13624156
   a4a7 - 16730301
   a4b5 - 16213895
   a4b4 - 14310164
   a4c4 - 15116667
   a4a3 - 14135652
   a4b3 - 15520265
   a4c2 - 15774688
   a4d1 - 15761496
   e1d2 - 17183037
  e1d2h - 9138384
  e1d2e - 10826168
   e1d1 - 10160158
  e1d1h - 8340927
  e1d1e - 8564856
   e1f1 - 10500263
  e1f1h - 8746702
  e1f1e - 9256172
   e1g1 - 10002477
  e1g1h - 7813014
  e1g1e - 8276048
  h1e1h - 8812150
  h1e1e - 8786622
   e1c1 - 9352465
  e1c1h - 7688786
  e1c1e - 7902389
  a1e1h - 9157471
  a1e1e - 9485936

 Perft 5 Summary
 Counts: 966214616
 Time: 248.16 sec
Here we still disagree:

Code: Select all

  Nc3-b1   10291824   10291824
  Nc3-d1    9888815   20180639
  Nc3-e4   13815063   33995702
  Nc3-d5   16355898   50351600
  Nc3xb5   14344153   64695753
  Nf3-g1   13286088   77981841
  Nf3-d2   18275298   96257139
  Nf3-h4   17101322  113358461
  Nf3-e5   20421525  133779986
  Be2-d1   12254060  146034046
  Be2-f1   13263714  159297760
  Be2-d3   18103544  177401304
  Be2-c4   18806200  196207504
  Be2xb5   16820308  213027812
  Bg5-f4   17675316  230703128
  Bg5-h4   15660840  246363968
  Bg5-h6   15899384  262263352
  Bg5xf6   16239118  278502470
  Ra1-b1   11947235  290449705
  Ra1-c1   12728554  303178259
  Ra1-d1   11047140  314225399
  Rh1-f1   11381808  325607207
  Rh1-g1   12423045  338030252
  Qa4-d1   11102737  349132989
  Qa4-c2   15572846  364705835
  Qa4-a3   13999122  378704957
  Qa4-b3   15320083  394025040
  Qa4-b4   14164756  408189796
  Qa4-c4   14982333  423172129
  Qa4-a5   15118400  438290529
  Qa4-a6   13486126  451776655
  Qa4xb5   16069167  467845822
  Qa4xa7   16581583  484427405
     O-O    9868945  494296350
   O-O-O    9234723  503531073
  Ke1-d1   10038364  513569437
  Ke1-f1   10348979  523918416
  Ke1-d2   16975415  540893831
   e3-e4   16067904  556961735
   d4-d5   19511136  576472871
   a2-a3   16813924  593286795
   b2-b3   14377804  607664599
   g2-g3   15621222  623285821
   h2-h3   17436368  640722189
   b2-b4   13927334  654649523
   g2-g4   15172648  669822171
   h2-h4   17530468  687352639
   c5xd6   17157804  704510443
   c5xb6   16969172  721479615
Ra1-b1/H   10153516  731633131
Ra1-b1/E   10123024  741756155
Ra1-c1/H   10868598  752624753
Ra1-c1/E   11222504  763847257
Ra1-d1/H    9590037  773437294
Ra1-d1/E   10297364  783734658
Rh1-f1/H    9276476  793011134
Rh1-f1/E    9617096  802628230
Rh1-g1/H    9951245  812579475
Rh1-g1/E    9915102  822494577
 O-O/He1    7734095  830228672
 O-O/Ee1    8194597  838423269
 O-O/Hh1    8724226  847147495
 O-O/Eh1    8698838  855846333
O-O-O/He1    7613259  863459592
O-O-O/Ee1    7825696  871285288
O-O-O/Ha1    9073994  880359282
O-O-O/Ea1    9400673  889759955
Ke1-d1/H    8261367  898021322
Ke1-d1/E    8484030  906505352
Ke1-f1/H    8655037  915160389
Ke1-f1/E    9161715  924322104
Ke1-d2/H    9041630  933363734
Ke1-d2/E   10719972  944083706
For reference, here are my divided perfs for this position for depths 2-4:

Code: Select all

  Nc3-b1         66         66
  Nc3-d1         66        132
  Nc3-e4         63        195
  Nc3-d5         67        262
  Nc3xb5         65        327
  Nf3-g1         66        393
  Nf3-d2         66        459
  Nf3-h4         66        525
  Nf3-e5         66        591
  Be2-d1         66        657
  Be2-f1         66        723
  Be2-d3         64        787
  Be2-c4         67        854
  Be2xb5         65        919
  Bg5-f4         67        986
  Bg5-h4         67       1053
  Bg5-h6         66       1119
  Bg5xf6         65       1184
  Ra1-b1         66       1250
  Ra1-c1         66       1316
  Ra1-d1         66       1382
  Rh1-f1         66       1448
  Rh1-g1         66       1514
  Qa4-d1         65       1579
  Qa4-c2         64       1643
  Qa4-a3         65       1708
  Qa4-b3         65       1773
  Qa4-b4         64       1837
  Qa4-c4         66       1903
  Qa4-a5         64       1967
  Qa4-a6         58       2025
  Qa4xb5         65       2090
  Qa4xa7         67       2157
     O-O         66       2223
   O-O-O         66       2289
  Ke1-d1         66       2355
  Ke1-f1         66       2421
  Ke1-d2         66       2487
   e3-e4         63       2550
   d4-d5         67       2617
   a2-a3         66       2683
   b2-b3         66       2749
   g2-g3         66       2815
   h2-h3         66       2881
   b2-b4         65       2946
   g2-g4         65       3011
   h2-h4         66       3077
   c5xd6         67       3144
   c5xb6         64       3208
Ra1-b1/H         66       3274
Ra1-b1/E         66       3340
Ra1-c1/H         66       3406
Ra1-c1/E         66       3472
Ra1-d1/H         66       3538
Ra1-d1/E         66       3604
Rh1-f1/H         66       3670
Rh1-f1/E         66       3736
Rh1-g1/H         66       3802
Rh1-g1/E         66       3868
 O-O/He1         66       3934
 O-O/Ee1         66       4000
 O-O/Hh1         66       4066
 O-O/Eh1         66       4132
O-O-O/He1         66       4198
O-O-O/Ee1         66       4264
O-O-O/Ha1         66       4330
O-O-O/Ea1         66       4396
Ke1-d1/H         66       4462
Ke1-d1/E         66       4528
Ke1-f1/H         66       4594
Ke1-f1/E         66       4660
Ke1-d2/H         66       4726
Ke1-d2/E         66       4792
 2       4792  0.00   2350171.65nps
  Nc3-b1       3632       3632
  Nc3-d1       3565       7197
  Nc3-e4       4394      11591
  Nc3-d5       4777      16368
  Nc3xb5       4463      20831
  Nf3-g1       4180      25011
  Nf3-d2       4980      29991
  Nf3-h4       4841      34832
  Nf3-e5       5285      40117
  Be2-d1       3991      44108
  Be2-f1       4178      48286
  Be2-d3       5019      53305
  Be2-c4       5101      58406
  Be2xb5       4827      63233
  Bg5-f4       4910      68143
  Bg5-h4       4648      72791
  Bg5-h6       4703      77494
  Bg5xf6       4757      82251
  Ra1-b1       3933      86184
  Ra1-c1       4065      90249
  Ra1-d1       3741      93990
  Rh1-f1       3852      97842
  Rh1-g1       4050     101892
  Qa4-d1       3756     105648
  Qa4-c2       4646     110294
  Qa4-a3       4388     114682
  Qa4-b3       4584     119266
  Qa4-b4       4395     123661
  Qa4-c4       4521     128182
  Qa4-a5       4572     132754
  Qa4-a6       4201     136955
  Qa4xb5       4707     141662
  Qa4xa7       4830     146492
     O-O       3540     150032
   O-O-O       3360     153392
  Ke1-d1       3501     156893
  Ke1-f1       3603     160496
  Ke1-d2       4981     165477
   e3-e4       4703     170180
   d4-d5       5164     175344
   a2-a3       4843     180187
   b2-b3       4451     184638
   g2-g3       4635     189273
   h2-h3       4914     194187
   b2-b4       4390     198577
   g2-g4       4571     203148
   h2-h4       4974     208122
   c5xd6       4844     212966
   c5xb6       4823     217789
Ra1-b1/H       3540     221329
Ra1-b1/E       3541     224870
Ra1-c1/H       3672     228542
Ra1-c1/E       3738     232280
Ra1-d1/H       3413     235693
Ra1-d1/E       3544     239237
Rh1-f1/H       3398     242635
Rh1-f1/E       3464     246099
Rh1-g1/H       3530     249629
Rh1-g1/E       3530     253159
 O-O/He1       3017     256176
 O-O/Ee1       3149     259325
 O-O/Hh1       3279     262604
 O-O/Eh1       3279     265883
O-O-O/He1       2964     268847
O-O-O/Ee1       3030     271877
O-O-O/Ha1       3294     275171
O-O-O/Ea1       3360     278531
Ke1-d1/H       3112     281643
Ke1-d1/E       3177     284820
Ke1-f1/H       3212     288032
Ke1-f1/E       3344     291376
Ke1-d2/H       3301     294677
Ke1-d2/E       3626     298303
 3     298303  0.05   5755411.92nps
  Nc3-b1     202220     202220
  Nc3-d1     198498     400718
  Nc3-e4     226899     627617
  Nc3-d5     263760     891377
  Nc3xb5     239602    1130979
  Nf3-g1     233127    1364106
  Nf3-d2     278144    1642250
  Nf3-h4     269480    1911730
  Nf3-e5     292059    2203789
  Be2-d1     222733    2426522
  Be2-f1     233040    2659562
  Be2-d3     270349    2929911
  Be2-c4     289729    3219640
  Be2xb5     264523    3484163
  Bg5-f4     279532    3763695
  Bg5-h4     264567    4028262
  Bg5-h6     259737    4287999
  Bg5xf6     257452    4545451
  Ra1-b1     219388    4764839
  Ra1-c1     226739    4991578
  Ra1-d1     208558    5200136
  Rh1-f1     214666    5414802
  Rh1-g1     225813    5640615
  Qa4-d1     206800    5847415
  Qa4-c2     251071    6098486
  Qa4-a3     241100    6339586
  Qa4-b3     252254    6591840
  Qa4-b4     237727    6829567
  Qa4-c4     253107    7082674
  Qa4-a5     243670    7326344
  Qa4-a6     214098    7540442
  Qa4xb5     254792    7795234
  Qa4xa7     265890    8061124
     O-O     197288    8258412
   O-O-O     187243    8445655
  Ke1-d1     194731    8640386
  Ke1-f1     200820    8841206
  Ke1-d2     277514    9118720
   e3-e4     248204    9366924
   d4-d5     292878    9659802
   a2-a3     270531    9930333
   b2-b3     248628   10178961
   g2-g3     258635   10437596
   h2-h3     274487   10712083
   b2-b4     240567   10952650
   g2-g4     250496   11203146
   h2-h4     277611   11480757
   c5xd6     274580   11755337
   c5xb6     257940   12013277
Ra1-b1/H     197218   12210495
Ra1-b1/E     197277   12407772
Ra1-c1/H     204569   12612341
Ra1-c1/E     208279   12820620
Ra1-d1/H     190037   13010657
Ra1-d1/E     197398   13208055
Rh1-f1/H     189187   13397242
Rh1-f1/E     192903   13590145
Rh1-g1/H     196618   13786763
Rh1-g1/E     196618   13983381
 O-O/He1     167689   14151070
 O-O/Ee1     175115   14326185
 O-O/Hh1     182623   14508808
 O-O/Eh1     182623   14691431
O-O-O/He1     164739   14856170
O-O-O/Ee1     168455   15024625
O-O-O/Ha1     183453   15208078
O-O-O/Ea1     187163   15395241
Ke1-d1/H     172703   15567944
Ke1-d1/E     176352   15744296
Ke1-f1/H     178647   15922943
Ke1-f1/E     186073   16109016
Ke1-d2/H     183129   16292145
Ke1-d2/E     201363   16493508
 4   16493508  2.60   6353752.06nps
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Perft for Seirawan chess?

Post by Evert »

We seem to get different results on pretty much all moves here. So to start to narrow this down, here's my perft 4 for the position after 1. Rb1:

Code: Select all

Position: r3k2r/p1qnbppp/2pppn2/1pP2bB1/Q2P4/2N1PN2/PP2BPPP/1R2K2R[HEhe] b Kkq - 1 1

  Nf6-e4     202810     202810
  Nf6-g4     224682     427492
  Nf6-d5     227389     654881
  Nf6-h5     226399     881280
  Nf6-g8     189197    1070477
  Nd7-e5     235005    1305482
  Nd7-b6     233136    1538618
  Nd7-b8     173048    1711666
  Nd7-f8     182802    1894468
  Nd7xc5     232427    2126895
  Bf5-c2     196656    2323551
  Bf5-d3     200157    2523708
  Bf5-h3     195404    2719112
  Bf5-e4     205923    2925035
  Bf5-g4     197940    3122975
  Bf5-g6     209705    3332680
  Bf5xb1     198008    3530688
  Be7-d8     183101    3713789
  Be7-f8     182294    3896083
  Ra8-b8     180168    4076251
  Ra8-c8     176620    4252871
  Ra8-d8     163300    4416171
  Rh8-f8     169811    4585982
  Rh8-g8     183137    4769119
  Qc7-a5     176390    4945509
  Qc7-b6     223225    5168734
  Qc7-b7     213257    5381991
  Qc7-b8     163947    5545938
  Qc7-c8     176888    5722826
  Qc7-d8     173388    5896214
     O-O     163456    6059670
   O-O-O     150514    6210184
  Ke8-d8     166474    6376658
  Ke8-f8     166660    6543318
   b5-b4     216971    6760289
   d6-d5     212868    6973157
   e6-e5     227620    7200777
   a7-a6     219273    7420050
   g7-g6     209285    7629335
   h7-h6     232897    7862232
   a7-a5     216196    8078428
   h7-h5     236340    8314768
   b5xa4     158142    8472910
   d6xc5     233046    8705956
Ra8-b8/H     163570    8869526
Ra8-b8/E     160295    9029821
Ra8-c8/H     160022    9189843
Ra8-c8/E     160077    9349920
Ra8-d8/H     150032    9499952
Ra8-d8/E     153417    9653369
Rh8-f8/H     149901    9803270
Rh8-f8/E     153231    9956501
Rh8-g8/H     159897   10116398
Rh8-g8/E     159897   10276295
 O-O/He8     126895   10403190
 O-O/Ee8     136885   10540075
 O-O/Hh8     150084   10690159
 O-O/Eh8     150084   10840243
O-O-O/He8     121215   10961458
O-O-O/Ee8     127753   11089211
O-O-O/Ha8     147358   11236569
O-O-O/Ea8     147352   11383921
Ke8-d8/H     136573   11520494
Ke8-d8/E     143233   11663727
Ke8-f8/H     136759   11800486
Ke8-f8/E     146749   11947235
 4   11947235  1.74   6882983.52nps
I propose you post your results for the same position (and perhaps pick a move) and so we walk the tree to figure out where the divergence comes from.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Perft for Seirawan chess?

Post by Evert »

Evert wrote: The development version of SjaakII now agrees:

Code: Select all

  Nb1-a3   24472283   24472283
  Nb1-c3   27639135   52111418
  Ng1-f3   27516771   79628189
  Ng1-h3   24519638  104147827
   a2-a3   26244518  130392345
   b2-b3   35090343  165482688
   c2-c3   36086291  201568979
   d2-d3   66325768  267894747
   e2-e3   87054576  354949323
   f2-f3   25803648  380752971
   g2-g3   35404600  416157571
   h2-h3   26240447  442398018
   a2-a4   35704520  478102538
   b2-b4   34901155  513003693
   c2-c4   41422507  554426200
   d2-d4   75854980  630281180
   e2-e4   87789463  718070643
   f2-f4   30843423  748914066
   g2-g4   34510109  783424175
   h2-h4   35903703  819327878
Nb1-a3/H   17358676  836686554
Nb1-a3/E   17258912  853945466
Nb1-c3/H   19688617  873634083
Nb1-c3/E   19798785  893432868
Ng1-f3/H   19652549  913085417
Ng1-f3/E   19749769  932835186
Ng1-h3/H   17450752  950285938
Ng1-h3/E   17298971  967584909
Leonidas does not, but I've identified a bug that causes it to discard some moves from pinned pieces along the pin ray.
After fixing this bug, Leonidas agrees with perft 6 = 967584909 for the starting position.
User avatar
Evert
Posts: 2929
Joined: Sat Jan 22, 2011 12:42 am
Location: NL

Re: Perft for Seirawan chess?

Post by Evert »

Evert wrote:

Code: Select all

# Sigla v2015.1.2.8
# Can only play seirawan chess variant

setboard r3k2r/p1qnbppp/2pppn2/1pP2bB1/Q2P4/2N1PN2/PP2BPPP/R3K2R[HEhe] w KQkq b6 0 10

[…]

 Perft 5 Summary
 Counts: 966214616
 Time: 248.16 sec
Here we still disagree:
Ok, I found another bug: in this position
[D]Q3k2r/2qnbppp/1ppppn2/5bB1/3P4/2N1PN2/PP2BPPP/R3K2R b KQk - 0 2
(with H and E in hand for both sides) Sjaak thinks Kf8/H and Kf8/E are valid evasions. Leonidas does not, but its total perft for the first position is still different: 944065468.

I'll at least try to get Sjaak and Leonidas to agree on the correct perft count before reporting back.
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Perft for Seirawan chess?

Post by Ferdy »

Evert wrote:We seem to get different results on pretty much all moves here. So to start to narrow this down, here's my perft 4 for the position after 1. Rb1:

Code: Select all

Position: r3k2r/p1qnbppp/2pppn2/1pP2bB1/Q2P4/2N1PN2/PP2BPPP/1R2K2R[HEhe] b Kkq - 1 1

  Nf6-e4     202810     202810
  Nf6-g4     224682     427492
  Nf6-d5     227389     654881
  Nf6-h5     226399     881280
  Nf6-g8     189197    1070477
  Nd7-e5     235005    1305482
  Nd7-b6     233136    1538618
  Nd7-b8     173048    1711666
  Nd7-f8     182802    1894468
  Nd7xc5     232427    2126895
  Bf5-c2     196656    2323551
  Bf5-d3     200157    2523708
  Bf5-h3     195404    2719112
  Bf5-e4     205923    2925035
  Bf5-g4     197940    3122975
  Bf5-g6     209705    3332680
  Bf5xb1     198008    3530688
  Be7-d8     183101    3713789
  Be7-f8     182294    3896083
  Ra8-b8     180168    4076251
  Ra8-c8     176620    4252871
  Ra8-d8     163300    4416171
  Rh8-f8     169811    4585982
  Rh8-g8     183137    4769119
  Qc7-a5     176390    4945509
  Qc7-b6     223225    5168734
  Qc7-b7     213257    5381991
  Qc7-b8     163947    5545938
  Qc7-c8     176888    5722826
  Qc7-d8     173388    5896214
     O-O     163456    6059670
   O-O-O     150514    6210184
  Ke8-d8     166474    6376658
  Ke8-f8     166660    6543318
   b5-b4     216971    6760289
   d6-d5     212868    6973157
   e6-e5     227620    7200777
   a7-a6     219273    7420050
   g7-g6     209285    7629335
   h7-h6     232897    7862232
   a7-a5     216196    8078428
   h7-h5     236340    8314768
   b5xa4     158142    8472910
   d6xc5     233046    8705956
Ra8-b8/H     163570    8869526
Ra8-b8/E     160295    9029821
Ra8-c8/H     160022    9189843
Ra8-c8/E     160077    9349920
Ra8-d8/H     150032    9499952
Ra8-d8/E     153417    9653369
Rh8-f8/H     149901    9803270
Rh8-f8/E     153231    9956501
Rh8-g8/H     159897   10116398
Rh8-g8/E     159897   10276295
 O-O/He8     126895   10403190
 O-O/Ee8     136885   10540075
 O-O/Hh8     150084   10690159
 O-O/Eh8     150084   10840243
O-O-O/He8     121215   10961458
O-O-O/Ee8     127753   11089211
O-O-O/Ha8     147358   11236569
O-O-O/Ea8     147352   11383921
Ke8-d8/H     136573   11520494
Ke8-d8/E     143233   11663727
Ke8-f8/H     136759   11800486
Ke8-f8/E     146749   11947235
 4   11947235  1.74   6882983.52nps
I propose you post your results for the same position (and perhaps pick a move) and so we walk the tree to figure out where the divergence comes from.
Here is my latest version with special castle that gates at rook file. Asserts() are enabled in this compile.

http://www.mediafire.com/download/l87i5 ... .1.2.8.rar

You can setup position and conduct perft by the sample commands.

Code: Select all

setboard [your fen]
perft n (n=1, 2 ...n)