JohnWoe wrote: ↑Thu Aug 15, 2019 1:23 am
My engine RubyShogi seems to get startpos perft numbers correct per se: 
http://tonyjh.com/chess/technical/
I wrote a random position generator to see whether RubyShogi gets all perft numbers correct?
At least RubyShogi plays under Xboard w/o issues.
Code: Select all
~~~ suite( 5 ) ~~~
0: 1 | 0.0s | 1 nps | ok
1: 30 | 0.001s | 22666 nps | ok
2: 900 | 0.044s | 20438 nps | ok
3: 25470 | 1.088s | 23420 nps | ok
4: 719731 | 33.952s | 21198 nps | ok
5: 19861490 | 824.894s | 24077 nps | ok
= 20607622 | 859.978s | 23962 nps
Code: Select all
~~~ perft( 2 ) ~~~
[ fen: 5k3/b8/1n5G1/1B2l+R2+P/+S4K1+NK/7G1/9/9/8K[LSGnps] w 0 1 ]
0: 1 | 0.0s | 1 nps
1: 244 | 0.007s | 32551 nps
2: 1026 | 0.601s | 1706 nps
= 1271 | 0.609s | 2087 nps
Code: Select all
~~~ perft( 2 ) ~~~
[ fen: 2k6/L8/+b6p1/+b1+b2+n2P/5P1s+N/9/9/7K1/9[LPPpsn] w 0 1 ]
0: 1 | 0.0s | 1 nps
1: 171 | 0.009s | 19936 nps
2: 38191 | 1.093s | 34939 nps
= 38363 | 1.102s | 34823 nps
Code: Select all
~~~ perft( 2 ) ~~~
[ fen: 5k3/+n8/1G5R1/2+s+P3b1/n+s2l+B+N2/5s+prp/9/7K1/9[SPGnpn] w 0 1 ]
0: 1 | 0.0s | 1 nps
1: 235 | 0.01s | 24406 nps
2: 43506 | 1.82s | 23899 nps
= 43742 | 1.83s | 23902 nps
Code: Select all
~~~ perft( 2 ) ~~~
[ fen: 9/+l4k3/+P1+r2L1+l1/+l3+B2S1/1n5rR/5+l+l2/9/9/1K7[LGNpgl] w 0 1 ]
0: 1 | 0.0s | 1 nps
1: 214 | 0.009s | 23151 nps
2: 1066 | 0.552s | 1929 nps
= 1281 | 0.562s | 2280 nps
 
I have a 9x9 shogi called it Siyam, a Filipino name meaning nine in english.
Startpos:
Code: Select all
perft 5
9   l  n  s  g  k  g  s  n  l
8   .  r  .  .  .  .  .  b  .
7   p  p  p  p  p  p  p  p  p
6   .  .  .  .  .  .  .  .  .
5   .  .  .  .  .  .  .  .  .
4   .  .  .  .  .  .  .  .  .
3   P  P  P  P  P  P  P  P  P
2   .  B  .  .  .  .  .  R  .
1   L  N  S  G  K  G  S  N  L
    a  b  c  d  e  f  g  h  i
  a3a4 - 879050
  b3b4 - 721424
  c3c4 - 1099961
  d3d4 - 722473
  e3e4 - 728065
  f3f4 - 727359
  g3g4 - 777353
  h3h4 - 763797
  i3i4 - 821423
  a1a2 - 721423
  i1i2 - 623123
  c1c2 - 643428
  c1d2 - 604467
  g1f2 - 495883
  g1g2 - 455271
  d1c2 - 596975
  d1d2 - 606016
  d1e2 - 524756
  f1e2 - 529913
  f1f2 - 534086
  f1g2 - 454476
  h2g2 - 687521
  h2f2 - 650175
  h2e2 - 647634
  h2d2 - 638030
  h2c2 - 666383
  h2i2 - 713800
  e1e2 - 614526
  e1d2 - 645667
  e1f2 - 567032
 Perft 5 Summary
 Nodes: 19861490
 Time: 2.26 sec
 Nodes/sec: 8772743
Result is the same.
From your 1st fen:
Code: Select all
new
setboard 5k3/b8/1n5G1/1B2l+R2+P/+S4K1+NK/7G1/9/9/8K[LSGnps] w 0 1
5k3/b8/1n5G1/1B2l+R2+P/+S4K1+NK/7G1/9/9/8K[LSGnps] w 0 1
# On-hold materials:
# pocket L color 0, cnt 1
# pocket S color 0, cnt 1
# pocket G color 0, cnt 1
# pocket P color 1, cnt 1
# pocket N color 1, cnt 1
# pocket S color 1, cnt 1
# fen err: too many white king
# reset to orig board position
There are more than 1 white king.
From your 2nd fen:
Code: Select all
new
setboard 2k6/L8/+b6p1/+b1+b2+n2P/5P1s+N/9/9/7K1/9[LPPpsn] w 0 1
2k6/L8/+b6p1/+b1+b2+n2P/5P1s+N/9/9/7K1/9[LPPpsn] w 0 1
# On-hold materials:
# pocket P color 0, cnt 2
# pocket L color 0, cnt 1
# pocket P color 1, cnt 1
# pocket N color 1, cnt 1
# pocket S color 1, cnt 1
perft 2
9   .  .  k  .  .  .  .  .  .
8   L  .  .  .  .  .  .  .  .
7  +b  .  .  .  .  .  .  p  .
6  +b  . +b  .  . +n  .  .  P
5   .  .  .  .  .  P  .  s +N
4   .  .  .  .  .  .  .  .  .
3   .  .  .  .  .  .  .  .  .
2   .  .  .  .  .  .  .  K  .
1   .  .  .  .  .  .  .  .  .
    a  b  c  d  e  f  g  h  i
 i6i7+ - 228
  i6i7 - 228
  f5f6 - 225
 a8a9+ - 227
  i5h5 - 226
  i5h6 - 229
  i5i4 - 228
  h2h3 - 227
  h2i2 - 227
  h2g3 - 226
  h2i3 - 226
  h2i1 - 228
  P@b8 - 224
  L@b8 - 224
  P@c8 - 6
  L@c8 - 6
  P@d8 - 224
  L@d8 - 224
  P@e8 - 224
  L@e8 - 224
  L@f8 - 225
  P@g8 - 225
  L@g8 - 225
  P@h8 - 226
  L@h8 - 226
  L@i8 - 225
  P@b7 - 221
  L@b7 - 220
  P@c7 - 224
  L@c7 - 9
  P@d7 - 222
  L@d7 - 221
  P@e7 - 225
  L@e7 - 225
  L@f7 - 225
  P@g7 - 225
  L@g7 - 225
  L@i7 - 225
  P@b6 - 220
  L@b6 - 218
  P@d6 - 225
  L@d6 - 223
  P@e6 - 225
  L@e6 - 225
  P@g6 - 225
  L@g6 - 225
  P@h6 - 226
  L@h6 - 226
  P@a5 - 225
  L@a5 - 225
  P@b5 - 220
  L@b5 - 218
  P@c5 - 221
  L@c5 - 207
  P@d5 - 221
  L@d5 - 219
  P@e5 - 225
  L@e5 - 225
  P@g5 - 225
  L@g5 - 225
  P@a4 - 225
  L@a4 - 225
  P@b4 - 225
  L@b4 - 223
  P@c4 - 222
  L@c4 - 208
  P@d4 - 222
  L@d4 - 220
  P@e4 - 222
  L@e4 - 222
  L@f4 - 225
  P@g4 - 225
  L@g4 - 225
  P@h4 - 226
  L@h4 - 226
  L@i4 - 225
  P@a3 - 225
  L@a3 - 225
  P@b3 - 225
  L@b3 - 223
  P@c3 - 225
  L@c3 - 211
  P@d3 - 223
  L@d3 - 221
  P@e3 - 223
  L@e3 - 223
  L@f3 - 223
  P@g3 - 225
  L@g3 - 225
  P@h3 - 226
  L@h3 - 226
  L@i3 - 225
  P@a2 - 226
  L@a2 - 226
  P@b2 - 226
  L@b2 - 224
  P@c2 - 226
  L@c2 - 212
  P@d2 - 226
  L@d2 - 224
  P@e2 - 225
  L@e2 - 225
  L@f2 - 225
  P@g2 - 225
  L@g2 - 225
  L@i2 - 226
  P@a1 - 227
  L@a1 - 227
  P@b1 - 227
  L@b1 - 225
  P@c1 - 227
  L@c1 - 213
  P@d1 - 227
  L@d1 - 225
  P@e1 - 227
  L@e1 - 227
  L@f1 - 227
  P@g1 - 227
  L@g1 - 227
  P@h1 - 227
  L@h1 - 227
  L@i1 - 227
 Perft 2 Summary
 Nodes: 26689
 Time: 0.03 sec
 Nodes/sec: 834031
Result is not the same.
From your 3rd fen:
Code: Select all
new
setboard 5k3/+n8/1G5R1/2+s+P3b1/n+s2l+B+N2/5s+prp/9/7K1/9[SPGnpn] w 0 1
5k3/+n8/1G5R1/2+s+P3b1/n+s2l+B+N2/5s+prp/9/7K1/9[SPGnpn] w 0 1
# On-hold materials:
# pocket P color 0, cnt 1
# pocket S color 0, cnt 1
# pocket G color 0, cnt 1
# pocket P color 1, cnt 1
# pocket N color 1, cnt 2
perft 2
9   .  .  .  .  .  k  .  .  .
8  +n  .  .  .  .  .  .  .  .
7   .  G  .  .  .  .  .  R  .
6   .  . +s +P  .  .  .  b  .
5   n +s  .  .  l +B +N  .  .
4   .  .  .  .  .  s +p  r  p
3   .  .  .  .  .  .  .  .  .
2   .  .  .  .  .  .  .  K  .
1   .  .  .  .  .  .  .  .  .
    a  b  c  d  e  f  g  h  i
  h2g2 - 149
  h2i2 - 150
  h2i1 - 150
  h2g1 - 150
  P@h3 - 143
  S@h3 - 143
  G@h3 - 143
 Perft 2 Summary
 Nodes: 1028
 Time: 0.00 sec
 Nodes/sec: 1
Result is not the same.
From your 4th fen:
Code: Select all
new
setboard 9/+l4k3/+P1+r2L1+l1/+l3+B2S1/1n5rR/5+l+l2/9/9/1K7[LGNpgl] w 0 1
9/+l4k3/+P1+r2L1+l1/+l3+B2S1/1n5rR/5+l+l2/9/9/1K7[LGNpgl] w 0 1
# On-hold materials:
# pocket L color 0, cnt 1
# pocket N color 0, cnt 1
# pocket G color 0, cnt 1
# pocket P color 1, cnt 1
# pocket L color 1, cnt 1
# pocket G color 1, cnt 1
perft 2
9   .  .  .  .  .  .  .  .  .
8  +l  .  .  .  .  k  .  .  .
7  +P  . +r  .  .  L  . +l  .
6  +l  .  .  . +B  .  .  S  .
5   .  n  .  .  .  .  .  r  R
4   .  .  .  .  . +l +l  .  .
3   .  .  .  .  .  .  .  .  .
2   .  .  .  .  .  .  .  .  .
1   .  K  .  .  .  .  .  .  .
    a  b  c  d  e  f  g  h  i
bking was captured legally
 f7f8+ - 244
bking was captured legally
  f7f8 - 244
 h6g7+ - 4
  h6g7 - 4
 h6h7+ - 4
  h6h7 - 5
 h6i7+ - 6
  h6i7 - 6
  h6g5 - 6
  a7a8 - 5
  a7b8 - 5
  a7b7 - 5
  a7a6 - 5
  i5h5 - 5
  i5i6 - 5
 i5i7+ - 5
  i5i7 - 5
 i5i8+ - 2
  i5i8 - 2
 i5i9+ - 3
  i5i9 - 3
  i5i4 - 5
  i5i3 - 5
  i5i2 - 5
  i5i1 - 5
  e6d7 - 4
  e6c8 - 7
  e6b9 - 7
  e6f5 - 7
  e6g4 - 7
  e6d5 - 6
  e6c4 - 6
  e6b3 - 6
  e6a2 - 6
  e6d6 - 4
  e6e7 - 3
  e6f6 - 5
  e6e5 - 7
  b1a1 - 5
  b1b2 - 5
  b1a2 - 5
  G@a9 - 5
  G@b9 - 5
  G@c9 - 5
  G@d9 - 4
  G@e9 - 4
  G@f9 - 2
  G@g9 - 4
  G@h9 - 4
  G@i9 - 5
  L@b8 - 5
  G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- 5
  N@g3 - 5
  L@g3 - 5
  G@g3 - 5
  N@h3 - 5
  L@h3 - 5
  G@h3 - 5
  N@i3 - 5
  L@i3 - 5
  G@i3 - 5
  N@a2 - 5
  L@a2 - 5
  G@a2 - 5
  N@b2 - 5
  L@b2 - 5
  G@b2 - 5
  N@c2 - 5
  L@c2 - 5
  G@c2 - 5
  N@d2 - 5
  L@d2 - 5
  G@d2 - 5
  N@e2 - 5
  L@e2 - 5
  G@e2 - 5
  N@f2 - 5
  L@f2 - 5
  G@f2 - 5
  N@g2 - 5
  L@g2 - 5
  G@g2 - 5
  N@h2 - 5
  L@h2 - 5
  G@h2 - 5
  N@i2 - 5
  L@i2 - 5
  G@i2 - 5
  N@a1 - 5
  L@a1 - 5
  G@a1 - 5
  N@c1 - 5
  L@c1 - 5
  G@c1 - 5
  N@d1 - 5
  L@d1 - 5
  G@d1 - 5
  N@e1 - 5
  L@e1 - 5
  G@e1 - 5
  N@f1 - 5
  L@f1 - 5
  G@f1 - 5
  N@g1 - 5
  L@g1 - 5
  G@g1 - 5
  N@h1 - 5
  L@h1 - 5
  G@h1 - 5
  N@i1 - 5
  L@i1 - 5
  G@i1 - 5
 Perft 2 Summary
 Nodes: 1508
 Time: 0.05 sec
 Nodes/sec: 32085
Result is not the same.
You may get Siyam at 
https://sites.google.com/site/deuterium ... /shogi-9x9
To test perft:
1. Run it in console
2. new
3. setboard [your fen]
4. perft n 
where n >= 1