Skip to content

Add PhoenixNet NNUE v1 - #1

Merged
KnightStackSys merged 41 commits into
mainfrom
nnue-v1
Oct 9, 2026
Merged

KnightStackSys merged 41 commits into
mainfrom
nnue-v1

Conversation

@KnightStackSys

@KnightStackSys KnightStackSys commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Adds the first working IronPhoenix NNUE baseline for 4-player Teams chess.

Engine

  • PhoenixNet v1 NNUE feature mapping/inference
  • 17 king buckets
  • own-king + partner-king streams
  • side-to-move-team-relative output
  • HCE fallback when no net is loaded

MultiPV

  • dedicated root MultiPV search
  • original PVS/aspiration path unchanged when MultiPV=1
  • UCI setoption name MultiPV value N, range 1..32
  • standard multipv N info output

Dataset generation

  • multi-worker HCE/search self-play
  • exact C++ NNUE::featureIndex() sparse features
  • controlled MultiPV exploration
  • randomized opening plies
  • feature-input deduplication
  • append-safe native IPDATA1 files

Graceful stop + resume

  • Ctrl+C requests a graceful stop instead of killing the dataset writer
  • active teacher searches are stopped, workers exit, and the current record count is committed before return
  • progress is reported every 10 saved positions
  • --resume --positions N treats N as the desired TOTAL dataset size; e.g. 50k existing + --resume --positions 500000 generates the remaining 450k
  • --append --positions N keeps its existing meaning: add N new positions
  • resume/append scan and preload existing dedup fingerprints
  • interrupted older datasets with stale header counts are scanned for complete trailing records; complete records are recovered and only an incomplete final record is discarded
  • recovered record counts are written back to the dataset header before generation continues

Training tooling

  • nnue/model.py
  • nnue/train.py reads .ipd directly
  • game-level train/validation splitting
  • vectorized EmbeddingBag packing
  • nnue/export.py

Current optimization stage

PhoenixNet v1 intentionally performs full feature-transformer refreshes as a correctness baseline. Incremental accumulators, quantization, and SIMD are later optimization stages.

@KnightStackSys KnightStackSys self-assigned this Oct 9, 2026
@KnightStackSys KnightStackSys added the enhancement New feature or request label Oct 9, 2026
@KnightStackSys

Copy link
Copy Markdown
Owner Author

This PR will also add MultiPV support

@KnightStackSys
KnightStackSys marked this pull request as ready for review October 9, 2026 16:51
@KnightStackSys
KnightStackSys merged commit 40b4d51 into main Oct 9, 2026
2 checks passed
@KnightStackSys
KnightStackSys deleted the nnue-v1 branch October 9, 2026 16:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant