robertnurnberg / matetools

Python scripts to manipulate and provide mating PVs for Chest-like EPD files.
GNU General Public License v3.0
3 stars 1 forks source link

improve a mate in 125 to mate in 109 #71

Closed robertnurnberg closed 3 months ago

robertnurnberg commented 3 months ago

This PR improves the shortest mate for the position

3N1qN1/1Kn2P2/1Q1p1Pp1/3P1pp1/1R6/1p1p4/kp1p4/b2b3n w - - bm #125;

from 125 to 109, and adds a PV for it.

The full PV for the found mate is as follows:

3N1qN1/1Kn2P2/1Q1p1Pp1/3P1pp1/1R6/1p1p4/kp1p4/b2b3n w - - bm #109; PV: b4a4 a2b1 b6g1 h1f2 b7c7 b1c2 a4c4 c2b1 c7c8 b1a2 c4a4 a2b1 c8d7 b1c2 a4c4 c2b1 c4c8 b1a2 c8a8 a2b1 g1f1 b1c2 a8c8 c2b1 d7c7 b1a2 c8a8 a2b1 c7b6 b1c2 a8c8 c2b1 b6b5 b1a2 c8a8 a2b1 b5b4 b1c2 a8c8 c2b1 b4a3 g5g4 f1g1 g6g5 a3b4 b1a2 c8a8 a2b1 b4b5 b1c2 a8c8 c2b1 b5b6 b1a2 c8a8 a2b1 b6b7 b1c2 a8c8 c2b1 b7c7 b1a2 c8a8 a2b1 a8a6 b1c2 a6c6 c2b1 c7c8 b1a2 c6a6 a2b1 c8d7 b1c2 a6c6 c2b1 c6c8 b1a2 c8a8 a2b1 d7e6 f5f4 e6d7 b1c2 a8c8 c2b1 d7c7 b1a2 c8a8 a2b1 c7b6 b1c2 a8c8 c2b1 b6b5 b1a2 c8a8 a2b1 b5b4 b1c2 a8c8 c2b1 b4a3 g4g3 g1f1 f4f3 a3b4 b1a2 c8a8 a2b1 b4b5 b1c2 a8c8 c2b1 b5b6 b1a2 c8a8 a2b1 b6b7 b1c2 a8c8 c2b1 b7c7 b1a2 c8a8 a2b1 c7b6 b1c2 a8c8 c2b1 b6b5 b1a2 c8a8 a2b1 b5b4 b1c2 a8c8 c2b1 b4a3 g5g4 a3b4 b1a2 c8a8 a2b1 b4b5 b1c2 a8c8 c2b1 b5b6 b1a2 c8a8 a2b1 b6b7 b1c2 a8c8 c2b1 b7c7 b1a2 c8a8 a2b1 c7b6 b1c2 a8c8 c2b1 b6b5 b1a2 c8a8 a2b1 b5b4 b1c2 a8c8 c2b1 b4a3 g3g2 f1g1 g4g3 a3b4 b1a2 c8a8 a2b1 b4b5 b1c2 a8c8 c2b1 b5b6 b1a2 c8a8 a2b1 b6b7 b1c2 a8c8 c2b1 b7c7 b1a2 c8a8 a2b1 c7b6 b1c2 a8c8 c2b1 b6b5 b1a2 c8a8 a2b1 b5b4 f8d8 a8d8 b1a2 d8a8 a2b1 g8h6 b1c2 a8c8 c2b1 b4a3 f2g4 g1d1;

Here a click-able version on cdb.

The root position seems to be too difficult for the matetb.py script, and so we use the proven PV for the position 3N1qN1/1Kn2P2/3p1Pp1/3P1pp1/R7/1p1p4/1p1p1n2/bk1b2Q1 w - - from #70. Said position can be forced by white as follows:

  1. Ra4+ Kb1 (only move)
  2. Qg1

Here black has 19 possible moves, but all but Nf2 lead to a mate in 3 or mate in 1. The position after b4a4 a2b1 b6g1 h1f2 is the one analysed in #70, and so we just append these four moves to the PV found there.