fsmosca / Python-Chess-Scripts

Tools to process things using python chess library.
GNU General Public License v3.0
1 stars 1 forks source link

Skip depth 1 evals [pgn_graph + eval_swing] #11

Open rwbc opened 3 years ago

rwbc commented 3 years ago

Sorry for having not properly reported this in an own issue before.

Depth 1 evals should be treated as no eval (skipped) and the previous non-depth 1 eval should be used for plotting. Same for eval_swing. Depth 1 evals should not be considered for output. (The times should be kept if not zero)

I have created a test.pgn with just 4 games from two sites. This is attached at the end of this post.

found depth 1 in pgn (you can see what evals made it into the plot and into the eval_swing output)

game 1
C:\ChessTools\QualityControl\PGN_Scripts\PGN\test.pgn/50: 40. Nd5 {+2.55/1 0} Qd8 {+0.79/26 16}
C:\ChessTools\QualityControl\PGN_Scripts\PGN\test.pgn/90: 80. e6 {+0.49/1 0} Nd6 {-0.30/29 30}
C:\ChessTools\QualityControl\PGN_Scripts\PGN\test.pgn/130: 120. Kf5 {-8.94/1 0} Bd5 {-98.00/32 1:07}
game 2
C:\ChessTools\QualityControl\PGN_Scripts\PGN\test.pgn/191: 17. Nxh7 {+3.37/24 17} Kxh7 {+1.26/1 5}
C:\ChessTools\QualityControl\PGN_Scripts\PGN\test.pgn/197: 23. Bd1 {+6.66/25 4} cxb2 {+5.29/1 5}
game 3
C:\ChessTools\QualityControl\PGN_Scripts\PGN\test.pgn/227: 5. f4 {+0.01/1 12} c5 {0.00/39 0}
C:\ChessTools\QualityControl\PGN_Scripts\PGN\test.pgn/230: 8. g3 {+0.01/1 2} O-O {+0.22/24 7}
C:\ChessTools\QualityControl\PGN_Scripts\PGN\test.pgn/235: 13. O-O {+0.01/1 8} cxd4 {+0.31/34 27}
C:\ChessTools\QualityControl\PGN_Scripts\PGN\test.pgn/255: 33. Rd3 {+0.01/1 4} Bb2 {+3.27/34 22}
C:\ChessTools\QualityControl\PGN_Scripts\PGN\test.pgn/271: 49. Rxb1 {+0.01/1 31} Bxb1 {+153.75/39 0}
game 4
C:\ChessTools\QualityControl\PGN_Scripts\PGN\test.pgn/341: 40. Rc6 {0.00/27 25} Ra2 {-0.95/1 0}
C:\ChessTools\QualityControl\PGN_Scripts\PGN\test.pgn/381: 80. Kf2 {0.00/46 38} Rd1 {-0.43/1 0}
 #                   White                   Black     Res WMaxMove  WMaxEval WMinMove  WMinEval BMaxMove  BMaxEval BMinMove  BMinEval
 1 iCE 4.0 v853 Modern x64    Wasp 4.50 Modern x64     0-1       40      2.55        -       NaN        -       NaN      107    -98.00
 2                Fire 7.1              Senpai 2.0     1-0        -       NaN        1      0.15       23      5.29        -       NaN
 3             Crafty 25.2        Stockfish 220818     0-1       23      0.92        -       NaN        -       NaN        1     -0.13
 4   Vajolet2 2.8 BMI2 x64 iCE 4.0 v853 Modern x64 1/2-1/2        9      0.28       34     -0.37        8      0.55       40     -0.95

test_1 test_2 test_3 test_4

test.zip

fsmosca commented 3 years ago

Which GUI is producing this kind of output?

What if the engines are really run on depth 1 games?

rwbc commented 3 years ago

I doubt someone will produce graphs and stats for depth 1 games. (if there are people at all running depth 1 games?) Moreover depth 1 is often reserved for book output (various engines with own book), easy moves and ponder moves.

IIRC one site was CCCC1 (the ponder games, unknown GUI) and the other was FCPT (Shredder GUI), both preprocessed by a macro from me, otherwise they would not be usable. It is also possible that only some engines produce unusual depth 1 output.

Of course I can also remove depth 1 already with extending my macros before using your scripts. (at least depth 1 with zero time and checking non zero times in ponder off games first)

What about making it an option?

I have no other examples currently for tournaments using ponder on, but if the output from CCCC1 can be reproduced in other GUIs, ponder hits can completely wreck the graph, because the output will be for the opponent move.

fsmosca commented 3 years ago

I will make a flag for it then.

--depth-one-no-eval

If this flag is present in the command line, it will consider all depth 1 eval as empty.

rwbc commented 3 years ago

I will make a flag for it then.

--depth-one-no-eval

If this flag is present in the command line, it will consider all depth 1 eval as empty.

Will it still read the time in case depth 1 wasn't done in zero time anyway?

rwbc commented 3 years ago

bump!?