Skip to content

Add multilayer neural network#306

Merged
kevlu8 merged 26 commits into
mainfrom
multilayer
Apr 30, 2026
Merged

Add multilayer neural network#306
kevlu8 merged 26 commits into
mainfrom
multilayer

Conversation

@kevlu8
Copy link
Copy Markdown
Owner

@kevlu8 kevlu8 commented Apr 30, 2026

Passed STC

Elo   | 8.55 +- 5.00 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=32MB
LLR   | 3.02 (-2.25, 2.89) [0.00, 5.00]
Games | N: 5652 W: 1488 L: 1349 D: 2815
Penta | [52, 595, 1383, 754, 42]

https://ob.int0x80.ca/test/698/

Passed LTC

Elo   | 16.02 +- 7.06 (95%)
SPRT  | 40.0+0.40s Threads=1 Hash=128MB
LLR   | 2.92 (-2.25, 2.89) [0.00, 5.00]
Games | N: 2540 W: 689 L: 572 D: 1279
Penta | [11, 254, 616, 385, 4]

https://ob.int0x80.ca/test/700/

Bench: 4559824

kevlu8 and others added 25 commits April 23, 2026 16:59
Bench: 3851225
Bench: 4157561
Bench: 3713163
Bench: 3609107
Bench: 3609107
Bench: 3609107
Bench: 3609107
Bench: 4324337
Bench: 4408593
Bench: 4579505
Bench: 4579505
Bench: 4518305
Bench: 3930050
Bench: 4495551
Bench: 4559824
Bench: 4559824
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the engine’s NNUE evaluation to a multi-layer network with a new SIMD abstraction layer, and adjusts related tuning parameters and accumulator sizing to match the new architecture.

Changes:

  • Replace the single hidden-layer NNUE with a 3-layer (L1/L2/L3) network and updated scaling/constants.
  • Introduce a SIMD abstraction (simd.hpp + AVX2/AVX512 backends) and rewrite nnue_eval to use it.
  • Update accumulator sizing (HL_SIZE → L1_SIZE) and refresh usage in a few call sites; retune various search parameters.

Reviewed changes

Copilot reviewed 10 out of 10 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
engine/params.hpp Updates various tuned search parameters.
engine/nnue/simd.hpp Declares SIMD abstraction types, constants, and APIs for AVX2/AVX512.
engine/nnue/simd.cpp Selects the AVX backend implementation to compile.
engine/nnue/avx2.hpp Implements SIMD abstraction using AVX2 intrinsics.
engine/nnue/avx512.hpp Implements SIMD abstraction using AVX-512 intrinsics.
engine/nnue/network.hpp Updates NNUE network layout to multi-layer weights/biases and new sizes.
engine/nnue/network.cpp Updates network loading and rewrites nnue_eval for multi-layer forward pass.
engine/nnue/accumulator.hpp Updates accumulator initialization loops to L1_SIZE.
engine/nnue/accumulator.cpp Updates accumulator update/refresh loops to L1_SIZE.
engine/main.cpp Updates a refresh call site to use full_refresh(pos, 0).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread engine/nnue/network.cpp
Comment thread engine/nnue/simd.cpp Outdated
Comment thread engine/nnue/avx512.hpp Outdated
Comment thread engine/nnue/avx2.hpp
Comment thread engine/nnue/avx512.hpp
Comment thread engine/nnue/network.cpp Outdated
Bench: 4559824
@kevlu8 kevlu8 merged commit 0fac3c9 into main Apr 30, 2026
3 checks passed
@kevlu8 kevlu8 deleted the multilayer branch May 2, 2026 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants