diff options
| author | Scott Gasch <[email protected]> | 2026-10-20 09:26:44 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-10-20 09:26:44 -0700 |
| commit | c8c6bbc2c1a103e5b07b079a0f8bdf66c7724d80 (patch) | |
| tree | b6c2137c9ac577fa83b1e948fa0311d53dfe445d /annotate_pgns/GNUmakefile | |
| parent | 3b5d3677bb14ae14728a1c4b221176bb83667d92 (diff) | |
Wire NNUE eval into search, build the training pipeline, and add a fast
move/eval-agreement benchmark against Stockfish (tests/lop)
Implements the architecture decisions in src/docs/NNUE.md: HalfKAv2_hm
feature set, int16/int8 quantization, per-ply accumulator backup for
king moves, and a lazy-eval-ready integration into search.c/eval.c.
Adds the full annotate_pgns/ training pipeline (extraction, K-fit/
labeling, quiet filtering, tensor building, training, export) plus an
end-to-end orchestrator (run_nnue_pipeline.py) and validation tooling
(sanity_check_net.py, compare_vs_stockfish_net.py). Adds tests/lop:
a 10k-position list-of-positions benchmark comparing engine eval rank
and move choice against pre-computed Stockfish/lc0 references, much
cheaper than a full self-play match for day-to-day progress checks.
First sd10-matched self-play result against classic HCE: LLR +2.28
(H1=+2.94), -72=119+169 over 360 games, confirming the net is
"smarter per node" at matched depth. A real-time (--st 4) match is
currently weaker (candidate loses ~3 plies of depth to a ~3.3-3.7x
nps gap against an unrecalibrated search), consistent with
NNUE.md's adoption-criterion section -- pruning/reduction constants
still need retuning for the new eval's score scale before a fair
real-time comparison is possible.
Co-Authored-By: Claude Sonnet 5 <[email protected]>
Diffstat (limited to 'annotate_pgns/GNUmakefile')
| -rw-r--r-- | annotate_pgns/GNUmakefile | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/annotate_pgns/GNUmakefile b/annotate_pgns/GNUmakefile new file mode 100644 index 0000000..29fd78d --- /dev/null +++ b/annotate_pgns/GNUmakefile @@ -0,0 +1,54 @@ +# Packages just the NNUE training pipeline's Python driver + its +# dependencies (NOT the input PGN -- that's passed to +# run_nnue_pipeline.py's --pgn-glob at runtime, shipped separately) into +# a single tar.bz2 for copying to a rented GPU box. See docs/NNUE.md. +# +# Usage: +# make -C annotate_pgns bundle +# make -C annotate_pgns clean-bundle + +BUNDLE := nnue_pipeline_bundle.tar.bz2 + +# This directory's own driver + everything it imports. +PIPELINE_FILES := \ + run_nnue_pipeline.py \ + extract_selfplay_positions.py \ + split_holdout.py \ + fit_k_and_label.py \ + quiet_filter_games.py \ + quiet_filter.py \ + quiet_common.py \ + build_training_tensors.py \ + nnue_feature_spec.py \ + nnue_model.py \ + nnue_train.py \ + export_nnue_weights.py \ + sample_egtb_positions.py + +# quiet_common.py reaches into ../src/eval_tune for its SEE logic +# (tune_eval_dna.py's static_exchange_eval/has_hanging_material), and +# dna_diff.py parses ../src/eval.c at import time for the DNA term +# list -- all three are genuine runtime dependencies, not optional +# extras, even though they live outside this directory. See +# quiet_common.py's own docstring. +EXTERNAL_FILES := \ + ../src/eval_tune/tune_eval_dna.py \ + ../src/eval_tune/dna_diff.py \ + ../src/eval.c + +ALL_FILES := $(PIPELINE_FILES) $(EXTERNAL_FILES) + +.PHONY: bundle clean-bundle + +bundle: $(BUNDLE) + +$(BUNDLE): $(ALL_FILES) + tar -cjf $@ -C .. \ + $(addprefix annotate_pgns/,$(PIPELINE_FILES)) \ + $(patsubst ../%,%,$(EXTERNAL_FILES)) + @echo "Wrote $@ ($$(du -h $@ | cut -f1)) -- the input PGN is NOT" \ + "included; pass it separately via run_nnue_pipeline.py's" \ + "--pgn-glob on the rented box." + +clean-bundle: + rm -f $(BUNDLE) |
