SaplingEngine 1.1.0
dotnet add package SaplingEngine --version 1.1.0
NuGet\Install-Package SaplingEngine -Version 1.1.0
<PackageReference Include="SaplingEngine" Version="1.1.0" />
paket add SaplingEngine --version 1.1.0
#r "nuget: SaplingEngine, 1.1.0"
// Install SaplingEngine as a Cake Addin #addin nuget:?package=SaplingEngine&version=1.1.0 // Install SaplingEngine as a Cake Tool #tool nuget:?package=SaplingEngine&version=1.1.0
<p align="center"> <div style="width:640;height:320"> <img style="width: inherit" src="./sapling-banner.png"> </div> </p>
A strong dotnet UCI Chess engine - My leaf nodes are growing
[!NOTE]
Sapling is still in active development so expect certain features to be missing or experimental. Also the current release is using a NNUE net trained from self play starting with random weights and is only 14 iterations deep, expect the engine to be much stronger in the coming days as the training does takes a while.
Play it here → https://iblunder.com/
Or challenge it on Lichess → https://lichess.org/@/sapling-bot
Releases
You can browse all windows, linux or mac releases here
Latest Release v1.0.5 22/09/2024
Requirements
- Sapling makes use of hardware intrinsics to improve performance. Currently your CPU must support:
Avx2
,Bmi1
,Bmi2
,Popcnt
,Sse
. Most modern hardware shipped after 2013 should be supported. - The releases come with a bundled version of the dotnet runtime, however if you want to run from source you'll need the dotnet 8 SDK installed.
Running from source
dotnet run --project .\Sapling\Sapling.csproj --configuration Release
Commands
quit
: exit the programsetoption name threads value 8
: sets the number of threads to useucinewgame
: initializes a new gameposition startpos
: sets the engine to the starting chess positionposition startpos moves a2a3 a7a6
: sets the engine to the starting position then applies a set of movesposition fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1
: sets the engine to the position given by the fen stringd
: outputs a diagram of the current positiongo perft 6
: Runs a pert test to a specific depthgo depth 10
: Returns the best move after searching for the given depthgo wtime 10000 btime 10000 winc 100 binc 100
: returns the best move after searching with the given time controlgo see a2a3
: [Dev] returns a the result of static exchange evaluation for a given movego eval
: [Dev] returns the static evaluation of the current positiondatagen
: [Dev] starts generating data in the bullet format, used when training a new NNUE network
Features
<details> <Summary>General</Summary>
- Bitboards
- NNUE (768 → 1024)x2 → 8
- Horizontal mirroring
- Output buckets x8
- Transposition table
- Lazy SMP
- Pondering </details>
<details> <Summary>Search</Summary>
- Negamax
- Quiescence
- Alpha-Beta pruning
- Iterative Deepening
- Asperation windows
- Null move pruning
- Late Move Pruning
- Futility Pruning
- Razoring
- Principal Variation Search
- Check extensions
- Internal Iterative Reduction
- Late Move Reductions
- Cuckoo filter repetition detection </details>
<details> <Summary>Move generation / ordering</Summary>
- Pseudo-legal movegen
- Static exchange evaluation
- Killer move heuristic
- Counter move heuristic
- History heuristic with malus
- Incremental sorting
- Magic bitboards
- PEXT bitboards </details>
SPRT
After any changes to the engine a SPRT test must be ran to ensure that the changes have a positive effect.
There is a script sprt.bat
which contains the command to run a cutechess-cli SPRT test. Ensure that you've configured CuteChess to point to both dev
and base
engines before hand, and also update the opening book + endgame table base to point to one on your system.
NNUE
I'm in the process of training a (768 → 1024)x2 → 8 network starting from random weights using self play data generation and bullet trainer. Expect the engine to get much stronger in the coming days / weeks. Check here to see the sequence of networks starting from scratch and the training logs.
Resources:
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net8.0
- FluentResults (>= 3.16.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.1.0 | 108 | 9/23/2024 |