https://github.com/syzygy1/probetool
probetool is a simple cli tool for probing tablebase positions specified by a FEN:
Code: Select all
$ ./probetool "K7/N7/k7/8/3p4/8/N7/8 w - -"
Found 163 WDL, 163 DTZ and 0 DTM tablebase files.
+---+---+---+---+---+---+---+---+
| K | | | | | | | | 8
+---+---+---+---+---+---+---+---+
| N | | | | | | | | 7
+---+---+---+---+---+---+---+---+
| k | | | | | | | | 6
+---+---+---+---+---+---+---+---+
| | | | | | | | | 5
+---+---+---+---+---+---+---+---+
| | | | p | | | | | 4
+---+---+---+---+---+---+---+---+
| | | | | | | | | 3
+---+---+---+---+---+---+---+---+
| N | | | | | | | | 2
+---+---+---+---+---+---+---+---+
| | | | | | | | | 1
+---+---+---+---+---+---+---+---+
a b c d e f g h
WDL = 1 (cursed win)
DTZ50 = 164 ply
DTZ50-optimal mating line:
[FEN "K7/N7/k7/8/3p4/8/N7/8 w - -"]
1.Nb4+ Kb6 2.Nd3 Kc7 3.Nb5+ Kc6 4.Na3 Kb6 5.Kb8 Kc6 6.Nc2 Kb5 7.Kc7 Ka4 8.Kb6
Kb3 9.Nce1 Ka2 10.Kc5 Kb3 11.Kb5 Kc3 12.Ka4 Kd2 13.Kb3 Kd1 14.Nf3 Ke2 15.Nfe5
Kd2 16.Kb2 Kd1 17.Nc4 Ke2 18.Kc2 Kf3 19.Kd1 Ke4 20.Ke2 Kd5 21.Nd2 Kc6 22.Kf3
Kd5 23.Kf4 Ke6 24.Kg5 Kd5 25.Kf5 Kd6 26.Ke4 Ke6 27.Nc4 Kf6 28.Kd5 Ke7 29.Ke5
Kf7 30.Kd6 Kf6 31.Nd2 Kf5 32.Ke7 Kg6 33.Ke6 Kg5 34.Ke5 Kg6 35.Ne4 Kg7 36.Kd6
Kh6 37.Nd2 Kg7 38.Ke6 Kf8 39.Nc4 Ke8 40.Na3 Kd8 41.Nb5 Kc8 42.Kd6 Kb7 43.Kd7
Ka6 44.Na3 Ka5 45.Nb1 Kb5 46.Nd2 Kb6 47.Kd6 K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