tromp / ChessPositionRanking

Software suite for ranking chess positions and accurately estimating the number of legal chess positions
MIT License
148 stars 7 forks source link

5Bb1/2n1q3/1R3n1K/1QR2k1N/qpR1N3/p3N2r/3Qrb1N/1Q2bRRb b - - 0 1 #642

Closed tromp closed 3 years ago

tromp commented 3 years ago

5Bb1/2n1q3/1R3n1K/1QR2k1N/qpR1N3/p3N2r/3Qrb1N/1Q2bRRb b - - 0 1

img

Discovered Double Check wx 2 wp 0 wpr 7 wpx 1 maxuwp 1 minopp -1 bx 3 bp 2 bpr 3 bpx 3 maxubp 3 minopp -1

calcu16 commented 3 years ago
  1. g4 Nf6 2. g5 Nd5 3. g6 Rg8 4. gxh7 g5 5. h8=Q g4 6. Nf3 g3 7. h4 g2 8. h5 g1=B 9. h6 f5 10. Bh3 Bh2 11. Bg4 fxg4 12. Ne5 g3 13. f4 Bg7 14. f5 g2 15. f6 d6 16. Nc4 Kd7 17. Rf1 g1=Q 18. f7 Bge5 19. f8=R Qg4 20. Qf6 Qg3+ 21. Rf2 Qg4 22. h7 Qg2 23. h8=Q Qg3 24. e4 Bf4 25. e5 Nb6 26. d4 e6 27. d5 Qa3 28. dxe6+ Kc6 29. e7 Qd7 30. e8=R Kb5 31. Rd8 d5 32. e6 d4 33. e7 Qdd6 34. e8=R d3 35. Kf1 d2 36. Qe2 d1=B 37. Qhg7 Kc5 38. Kg2 Kd5 39. Rd7 Be3 40. Qd8 Be5 41. Kh3 Bf6 42. Kg4 Be7 43. Kh5 Ke6 44. R8f3 Qf4 45. Qg5 Qc5 46. Kh6 Qg3 47. Ref8 Nd5 48. Re8 Nf4 49. Qh4 Kf5 50. Ne5 Qd5 51. c4 c5 52. b4 Bc2 53. bxc5 Qc6+ 54. Rd6 Be6 55. Nc3 Qd5 56. c6 Qc5 57. c7 Qd5 58. c8=N Qa5 59. c5 Qb5 60. c6 Qa5 61. Nb6 Qb5 62. c7 Qa5 63. c8=N Nc6 64. Ng4 Ne5 65. Nf6 Nd7 66. Nh5 Nf6 67. Qc7 Rf8 68. Nba4 Bg8 69. Ba3 Bd8 70. Rdd1 Rf7 71. Bf8 { [%csl Gf8] } 71... Rd7 72. Re4 Qc5 73. Rb4 Qe7 74. Ne4 Qg2 75. Rdb1 Rd1 76. Rc1 Rh1 77. Qh2 Bcb3 78. Qg1 Rh2 79. Qge1 Rh3 80. Qec3 Qf1 81. Qec4 Qd3 82. Rg1 Bd1 83. Rff1 { [%csl Gg1,Gf1] } 83... Be2 84. R3f2 Bf3 85. Rfb2 Bh1 86. Nd2 Qd4 87. Nf3 Qd3 88. Nh2 Bf2 89. Ncb6 Qd2 90. Q7c6 Bc7 91. Nd5 Be5 92. Qa3 Bc3 93. Rbb1 Qc2 94. R1b2 Bce1 95. Nac3 Qa4 96. Ne4 Rd8 97. Nb6 Rd2 98. Nd5 Re2 99. Qcd3 a5 100. Qd2 Qb5 101. Qcc1 a4 102. Rab1 Qa5 103. Rc4 Qa6 104. Rbc2 Qa5 105. Rb5 Qa6 106. Rbc5 Qa5 107. Qb3 a3 108. Qbc3 b5 109. Qb3 b4 110. Rc6 Qa4 111. R4c5 Qa5 112. Qc4 Qa4 113. Qb5 Qa5 114. Rb6 Qa4 115. R2c4 Ne6 116. Qa5 Nc7 117. Qb5 Qc2 118. Qa5 Qxa2 119. Qb5 Qb3 120. Qb1 Qa4 121. Ne3#
tromp commented 3 years ago

Verified. Thanks, Andrew!

Cute that the position is mate...

calcu16 commented 3 years ago

That is cute, do you have enough statistical power in your runs to calculate how many unique mating positions there are?

tromp commented 3 years ago

One could change my legality checker to check for mate (at the cost of considerable code complexity for a move generator), but that still wouldn't tell you if the mate positions are legal.

calcu16 commented 3 years ago

I was thinking depending on what percentage of the 10k are legal mates, you might have a small enough +/- to be able to be relatively confident in the number of legal mating positions. I don't have any intuition on how likely mates are though.

tromp commented 3 years ago

That's true. One could just manually check for mates among the 529 legal positions. Maybe only 1% of them do. If I had to guess:-)