Skip to content

Exit proofgame after it finds a list of moves leading to a position #5

@dpaleka

Description

@dpaleka

Is there an option for telexutil proofgame to say whether it found a list of moves leading to a given position?

For example, when I run

texelutil proofgame -w 1:5 -v -nokernel \ 
    "r6r/pp3pk1/5Rp1/n2pP1Q1/2pPp3/2P1P2q/PP1B3P/R5K1 w - - 0 1"

I get some log like this:

min cost: 24 queue: 0 nodes: 0 time: 8.50001e-06
Q:0 R:0 Bd:0 Bl:-1 N:-2 P:-1 sP:1
q:0 r:0 bd:-1 bl:-1 n:-1 p:-1 sp:1
bound: 12 -w 1:5 queue: 305 nodes: 13 time: 0.00338529
d4 c5 c3 d5 e3 e5 Qg4 g6 Bd2 c4 Qg5 e4
min cost: 26 queue: 356 nodes: 15 time: 0.00377876
bound: 10 -w 1:5 queue: 4475 nodes: 198 time: 0.0298678
d4 c5 c3 d5 e3 e5 Qg4 g6 Bd2 c4 Qg5 e4 Be2 Bd7 Kf1 Nc6
min cost: 28 queue: 4500 nodes: 199 time: 0.0300857
bound: 8 -w 1:5 queue: 8052 nodes: 343 time: 0.0520785
d4 c5 c3 d5 e3 e5 Qg4 g6 Bd2 c4 Qg5 e4 Be2 Bd7 Kf1 Nc6 Nf3 Qc8 Kg1 Bb4
min cost: 30 queue: 8368 nodes: 357 time: 0.0540554
bound: 7 -w 1:5 queue: 14481 nodes: 654 time: 0.0909689
d4 c5 c3 d5 e3 e5 Qg4 g6 Bd2 c4 Qg5 e4 Be2 Bd7 Kf1 Nc6 Nf3 Qc8 Kg1 Bd6 g3 Bf4 gxf4
min cost: 32 queue: 14523 nodes: 656 time: 0.0913092
min cost: 34 queue: 15920 nodes: 728 time: 0.100409
bound: 6 -w 1:5 queue: 15997 nodes: 731 time: 0.10089
d4 c5 c3 d5 e3 e5 Qg4 g6 Bd2 c4 Qg5 e4 Be2 Bd7 Kf1 Nc6 Nf3 Qc8 Kg1 Bd6 g3 Bf4 gxf4 Kf8 Ne5 Nxe5 Bf3 Kg7
min cost: 36 queue: 16420 nodes: 750 time: 0.103554
bound: 5 -w 1:5 queue: 16490 nodes: 753 time: 0.103966
d4 c5 c3 d5 e3 e5 Qg4 g6 Bd2 c4 Qg5 e4 Be2 Bd7 Kf1 Nc6 Nf3 Qc8 Kg1 Bd6 g3 Bf4 gxf4 Kf8 Ne5 Nxe5 Bf3 Kg7 fxe5 Ne7 Bh5
min cost: 38 queue: 16623 nodes: 758 time: 0.104789
bound: 4 -w 1:5 queue: 16686 nodes: 761 time: 0.105167
d4 c5 c3 d5 e3 e5 Qg4 g6 Bd2 c4 Qg5 e4 Be2 Bd7 Kf1 Nc6 Nf3 Qc8 Kg1 Bd6 g3 Bf4 gxf4 Kf8 Ne5 Nxe5 Bf3 Kg7 fxe5 Ne7 Bg4 Bxg4 f4 Nc6
min cost: 40 queue: 16784 nodes: 765 time: 0.10579
min cost: 42 queue: 19295 nodes: 890 time: 0.117835
min cost: 44 queue: 145429 nodes: 7531 time: 0.725356
bound: 2 -w 1:5 queue: 146555 nodes: 7585 time: 0.728636
d4 c5 c3 d5 e3 e5 Qg4 g6 Bd2 c4 Qg5 e4 Be2 Bd7 Kf1 Nc6 Nf3 Qc8 Kg1 Bd6 g3 Bf4 gxf4 Kf8 Ne5 Nxe5 Bf3 Kg7 fxe5 Ne7 Bh5 Nc6 Bxg6 hxg6 f3 Bg4 Na3 Bxf3 Rf1 Bg2 Rf6 Na5
min cost: 46 queue: 146574 nodes: 7586 time: 0.728826
min cost: 48 queue: 147366 nodes: 7622 time: 0.731002
min cost: 50 queue: 179351 nodes: 9233 time: 0.821918
min cost: 52 queue: 298779 nodes: 16436 time: 1.1709
bound: 1 -w 1:5 queue: 13625768 nodes: 943040 time: 55.6623
d4 c5 c3 d5 e3 e5 Qg4 g6 Bd2 c4 Qg5 e4 Be2 Bd7 Kf1 Nc6 Nf3 Qc8 Kg1 Bd6 g3 Bf4 gxf4 Kf8 Ne5 Nxe5 Na3 Kg7 fxe5 Ne7 f4 Nc6 f5 Bxf5 Rf1 Bh3 Rf6 Bg2 Kxg2 h5 Ra1 Na5 Bg4 hxg4 Kg1 g3 Qxg3 Qd7 Qg5
min cost: 54 queue: 13628150 nodes: 943174 time: 55.6693
min cost: 56 queue: 13692285 nodes: 947036 time: 55.8784
56 -w 1:5 queue: 13693362 nodes: 947088 time: 55.8815
d4 c5 c3 d5 e3 e5 Qg4 g6 Bd2 c4 Qg5 e4 Be2 Bd7 Kf1 Nc6 Nf3 Qc8 Kg1 Bd6 g3 Bf4 gxf4 Kf8 Ne5 Nxe5 Na3 Kg7 fxe5 Ne7 f4 Nc6 f5 Bxf5 Rf1 Bh3 Rf6 Bg2 Kxg2 h5 Ra1 Na5 Bg4 hxg4 Kg1 g3 Qxg3 Qh3 Qg5 Rae8 Nb5 Ra8 Nc7 Rae8 Na8 Rxa8
52 -w 1:5 queue: 13821076 nodes: 971241 time: 57.1127
d4 c5 c3 d5 e3 e5 Qg4 g6 Bd2 c4 Qg5 e4 Be2 Bd7 Kf1 Nc6 Nf3 Qc8 Kg1 Bd6 g3 Bf4 gxf4 Kf8 Ne5 Nxe5 Na3 Kg7 fxe5 Ne7 f4 Nc6 f5 Bxf5 Rf1 Bh3 Rf6 Bg2 Kxg2 h5 Ra1 Na5 Bxh5 Rxh5 Nb5 Qh3+ Kg1 Rhh8 Nc7 Rag8 Na8 Rxa8
50 -w 1:5 queue: 13823018 nodes: 972864 time: 57.2037
d4 c5 c3 d5 e3 e5 Qg4 g6 Bd2 c4 Qg5 e4 Be2 Bd7 Kf1 Nc6 Nf3 Qc8 Kg1 Bd6 g3 Bf4 gxf4 Kf8 Ne5 Nxe5 Na3 Kg7 fxe5 Ne7 f4 Nc6 f5 Bxf5 Rf1 Bh3 Rf6 Bg2 Kxg2 Na5 Ra1 Qe8 Nb5 Qxb5 Bh5 Qd7 Bxg6 hxg6 Kg1 Qh3
... more lines

The last line I included seems to be a solution; but the output does not indicate that in a way I understand.
For my use case, it seems I have to parse the output and check whether any list of moves in the output is a solution.
Note that I am not interested in the number of moves reaching a given position; that's why I put 0 1, as in the example in proofgame.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions