Experion::Nnue
Constants
Net compiled into the binary so a release executable is self-contained.
Class methods
dst = src adjusted by removals then additions. Indices are per perspective: (w, b) pairs; counts select how many of the two slots apply.
ENN5 per-perspective context: king bucket | mirror<<8. The perspective's own king square is taken from that side's POV (black flipped vertically); kings on files e-h mirror every square horizontally. Bucket context for one perspective: ENN5 packs bucket|mirror, older formats use the plain file-half bucket.
Evaluate from an accumulator row. Returns cp from the POV OF WHITE scaled to centipawns (stm flip applied by caller like classical eval).
Full evaluation from the incremental row plus, for ENN5, the learned material lane. Returns cp from the side to move's POV.
Queenside (a-d) vs kingside (e-h) king bucket. Depends only on file, so it is unaffected by the rank-mirroring used for POV1 squares. MUST match tools/nnue_train.py's king_bucket exactly — this is the mapping from square to bucket index, not just the bucket count (which is read from the file header and doesn't need to match code on this side).
Rebuild an accumulator row from scratch (used at root and after any king move, since a moving king changes that perspective's bucket for EVERY feature, not just its own).
ENN5: rebuild a single perspective's half of the row (bias folded in).