Skip to content

Refactor Stats saving and resuming #857

@vondele

Description

@vondele

For a match started like:

/home/vondele/chess/vondele/workspace/scratch/abcdefgh/testing/fastchess/fastchess \
    -rounds 10 \
    -games 2 \
    -repeat \
    -srand 42 \
    -concurrency 280 \
    --force-concurrency \
    -openings file=/home/vondele/chess/vondele/workspace/data/UHO_Lichess_4852_v1.epd \
              format=epd \
              order=random \
    -ratinginterval 280 \
    -report penta=true \
    -pgnout file=match.pgn \
    -engine name=reference \
            cmd=/home/vondele/chess/vondele/workspace/scratch/abcdefgh/testing/reference/Stockfish/src/stockfish \
    -engine name=step_97fb32d68c61_nn-0861a1e95b35.nnue \
            cmd=/home/vondele/chess/vondele/workspace/scratch/abcdefgh/testing/testing/Stockfish/src/stockfish \
            option.EvalFile=/home/vondele/chess/vondele/workspace/scratch/97fb32d68c61/run/lightning_logs/version_0/checkpoints/nn-0861a1e95b35.nnue \
    -each proto=uci \
          option.Threads=1 \
          option.Hash=16 \
          tc=10+0.1

(most importantly -rounds 10 -games 2 -repeat and two engines)
The config file contains

    "stats": {
        "step_97fb32d68c61_nn-0861a1e95b35.nnue vs reference": {
            "wins": 0,
            "losses": 8,
            "draws": 0,
            "penta_WW": 0,
            "penta_WD": 0,
            "penta_WL": 0,
            "penta_DD": 0,
            "penta_LD": 0,
            "penta_LL": 4
        },
        "reference vs step_97fb32d68c61_nn-0861a1e95b35.nnue": {
            "wins": 11,
            "losses": 0,
            "draws": 1,
            "penta_WW": 5,
            "penta_WD": 1,
            "penta_WL": 0,
            "penta_DD": 0,
            "penta_LD": 0,
            "penta_LL": 0
        }
    }

which seems to suggest one engine played 12 games with white and the other only 8. That would be wrong given the options, and is also different from what I see in the pgn:

$ grep "\[White" match.pgn  | sort | uniq -c
     10 [White "reference"]
     10 [White "step_97fb32d68c61_nn-0861a1e95b35.nnue"]

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