Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
fd15e7f
chore(build): add build script to disable tuned values on release
Lxdovic Jun 19, 2025
0830bad
chore: update ccrl elo for version 1.0.0
Lxdovic Jul 25, 2025
085cdf6
Merge branch 'main' of github.com:CastledChess/pluto into dev
Lxdovic Jul 25, 2025
1f739e0
feat(eval): added pesto eval back for hce and datagen later
Lxdovic Jul 27, 2025
0d9fbee
merge
Lxdovic Jul 28, 2025
b6b57c9
feat(eval): added simple mobility bonus
Lxdovic Jul 28, 2025
50ac321
fix(tc): check timeup every 2048 moves in negamax + fix panic when lo…
Lxdovic Jul 29, 2025
ebe32e7
feat(hce): add rook open files
Lxdovic Jul 28, 2025
21d271c
merge
Lxdovic Jul 29, 2025
bd5421c
feat(hce): add mobility for endgame
Lxdovic Jul 30, 2025
0f4fed5
fix(tc): add timeup check to qsearch
Lxdovic Jul 31, 2025
fc4c3bc
fix(tc): add timeup check to qsearch
Lxdovic Jul 31, 2025
0c6f928
chore(docs): add logo
Lxdovic Jul 31, 2025
91f36a2
chore(docs): set logo size
Lxdovic Jul 31, 2025
c6d4a77
chore(docs): add badges and center logo
Lxdovic Jul 31, 2025
dd498ab
refactor(cfg): refactor cfg for simpler implementation of new params
Lxdovic Jul 31, 2025
53338e9
refactor(cfg): refactor cfg for simpler implementation of new params
Lxdovic Jul 31, 2025
4213698
chore: refactor code to allow building for either hce or nnue
Lxdovic Jul 31, 2025
fb2fc87
merge
Lxdovic Jul 31, 2025
bf8ed7a
refactor(cfg): refactor cfg for simpler implementation of new params
Lxdovic Jul 31, 2025
f539451
merge
Lxdovic Aug 1, 2025
ea37aba
Merge pull request #87 from Lxdovic/feat/hce
Lxdovic Aug 1, 2025
0a633e6
fix(config): fix tuning params
Lxdovic Aug 1, 2025
860a94b
chore(make): rework make and add HCE param
Lxdovic Aug 1, 2025
514e420
chore(make): rework make and add HCE param
Lxdovic Aug 1, 2025
0e535f3
feat(hce): add tempo
Lxdovic Aug 1, 2025
b814f5b
docs: update elo for v1.0.0
Lxdovic Aug 3, 2025
8541fcb
feat(hce): add piece eval improvements
Lxdovic Aug 3, 2025
582e909
feat(logs): added logs file in tmp/pluto_logs
Lxdovic Aug 4, 2025
8487b97
fix(logs): avoid overwriting logs
Lxdovic Aug 4, 2025
fd5fa63
feat(log): add config feature to enable logging
Lxdovic Aug 4, 2025
e182986
fix(pv,killers): set length equal to max depth
Lxdovic Aug 4, 2025
f57399b
fix(build): fixed nnue build
Lxdovic Aug 5, 2025
e822958
refactor(search): refactor improving
Lxdovic Aug 8, 2025
09470d1
feat(search): add aspiration windows
Lxdovic Aug 9, 2025
3736ea3
feat(qs): delta pruning
Lxdovic Aug 10, 2025
d8a7bfd
feat(qs): add move ordering
Lxdovic Aug 10, 2025
301213c
improve(mp): improve move picker sorting speed
Lxdovic Aug 10, 2025
ec0c7af
docs: update readme
Lxdovic Aug 11, 2025
3c81d3d
feat(hce): Add packed scores
Lxdovic Aug 11, 2025
068ad62
chore: format psqt
Lxdovic Aug 12, 2025
46961a2
fix(build): fix nnue build
Lxdovic Aug 12, 2025
726b82e
improve(hce): use greater bishop pair value for eg
Lxdovic Aug 13, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 109 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

45 changes: 8 additions & 37 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Build executables for Carp releases. Base rule is reserved for OpenBench
EXE := Pluto_1.0.1
LXE := Pluto_1.0.1
_THIS := $(realpath $(dir $(abspath $(lastword $(MAKEFILE_LIST)))))
TMPDIR := $(_THIS)/tmp
HCE := true

ifeq ($(OS),Windows_NT)
EXT := .exe
Expand All @@ -16,45 +16,16 @@ else
VER := linux
endif

ifeq ($(HCE),true)
FEATURES := tuning,log,classical
else
FEATURES := tuning,log
endif

NAME := $(EXE)$(EXT)

rule:
cargo rustc -r -p engine --bins -- -C target-cpu=native --emit link=$(NAME)
cargo rustc -r -p engine --bins --features $(FEATURES) -- -C target-cpu=native --emit link=$(NAME)

tmp-dir:
mkdir -p $(TMPDIR)

x86-64 x86-64-v2 x86-64-v3 x86-64-v4 native: tmp-dir
cargo rustc -r -p engine --bins -- -C target-cpu=$@ -C profile-generate=$(TMPDIR) --emit link=$(LXE)-$(VER)-$@$(EXT)
./$(LXE)-$(VER)-$@$(EXT) bench 16
llvm-profdata merge -o $(TMPDIR)/merged.profdata $(TMPDIR)

cargo rustc -r -p engine --bins -- -C target-feature=+crt-static -C target-cpu=$@ -C profile-use=$(TMPDIR)/merged.profdata --emit link=$(LXE)-$(VER)-$@$(EXT)

rm -rf $(TMPDIR)/*
rm -f *.pdb

syzygy: tmp-dir
cargo rustc -r -p engine --bins --features syzygy -- -C target-cpu=native -C profile-generate=$(TMPDIR) --emit link=$(LXE)-$(VER)$(EXT)
./$(LXE)-$(VER)$(EXT) bench 16
llvm-profdata merge -o $(TMPDIR)/merged.profdata $(TMPDIR)

cargo rustc -r -p engine --bins --features syzygy -- -C target-feature=+crt-static -C target-cpu=native -C profile-use=$(TMPDIR)/merged.profdata --emit link=$(LXE)-$(VER)$(EXT)

rm -rf $(TMPDIR)/*
rm -f *.pdb

datagen: tmp-dir
cargo rustc -r -p tools -- -C target-cpu=native -C profile-generate=$(TMPDIR) --emit link=datagen$(EXT)
./datagen$(EXT) datagen -g 256 -t 32 -n 5000
./datagen$(EXT) datagen -g 256 -t 32 -d 8
llvm-profdata merge -o $(TMPDIR)/merged.profdata $(TMPDIR)

cargo rustc -r -p tools -- -C target-cpu=native -C profile-use=$(TMPDIR)/merged.profdata --emit link=datagen$(EXT)

rm -rf $(TMPDIR)
rm -rf $(_THIS)/data
rm -f *.pdb

release: x86-64 x86-64-v2 x86-64-v3 x86-64-v4
rm -rf $(TMPDIR)
43 changes: 35 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,15 @@

# Pluto Chess Engine

by [Lxdovic](https://github.com/Lxdovic)
<div align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/user-attachments/assets/26b61936-4bdd-40c6-a189-da45de028821">
<img width="600" alt="Shows an illustrated sun in light color mode and a moon with stars in dark color mode." src="https://github.com/user-attachments/assets/50e5b2e0-4d13-48ca-bb30-53bcfeb64fab">
</picture>

[![License][license-badge]][license-link]
[![Release][release-badge]][release-link]
[![Commits][commits-badge]][commits-link]
</div>

## Table of Contents

Expand All @@ -19,9 +27,9 @@ by [Lxdovic](https://github.com/Lxdovic)

## Strength

| Version | Date | Estimated ELO | CCRL |
| -------------- | ----------- | ------------- | ---- |
| 1.0.0 | 11 May 2025 | 2870 | 2872 |
| Version | Date | Estimated ELO | CCRL 40/15 | CCRL Blitz 2+1 |
| -------------- | ----------- | ------------- | ---- | ---- |
| 1.0.0 | 11 May 2025 | 2870 | 2879 | 2976 |

## Testing

Expand Down Expand Up @@ -54,15 +62,27 @@ Pluto is tested with OpenBench, a distributed testing framework for UCI chess en
- **Killer Moves**
- **Transposition Tables**
- Evaluation:
Pluto adopted Efficiently Updatable Neural Networks for its evaluation function quite early in development. Earlier versions were using Simple Eval/Pesto Eval
- **HCE** (classical build, see how to build it in #Building)
- **NNUE (768->512)x2->1** Trained using [Bullet](https://github.com/jw1912/bullet) and Stockfish data.

## Building

To build the engine, clone the repository and run the following command in your terminal:
To build the engine, clone the repository and use one of the following options:

### NNUE

This will build Pluto NNUE

```bash
make
cargo build --release --bin engine
```

### Classical

This allows you to build Pluto HCE

```bash
cargo build --release --bin engine --features classical
```

## Contributors
Expand All @@ -81,3 +101,10 @@ Pluto was built using these resources and tools
- [Bullet](https://github.com/jw1912/bullet) -> great tool for building NNUEs
- [Stockfish](https://stockfishchess.org/) -> some implementation examples and ideas

[license-badge]: https://img.shields.io/github/license/Lxdovic/Pluto?style=for-the-badge
[release-badge]: https://img.shields.io/github/v/release/Lxdovic/Pluto?style=for-the-badge
[commits-badge]: https://img.shields.io/github/commits-since/Lxdovic/Pluto/latest?style=for-the-badge

[license-link]: https://github.com/Lxdovic/Pluto/blob/main/LICENSE
[release-link]: https://github.com/Lxdovic/Pluto/releases/latest
[commits-link]: https://github.com/Lxdovic/Pluto/commits/dev
8 changes: 8 additions & 0 deletions engine/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ path = "src/lib.rs"
name = "engine"
path = "src/main.rs"

[features]
default = []
tuning = []
classical = []
log = []

[dependencies]
queues = "1.1.0"
shakmaty = "0.27.2"
Expand All @@ -26,3 +32,5 @@ chrono = "0.4.40"
web-sys = { version = "0.3.77", features = [
'Worker',
] }
log = "0.4"
simplelog = "0.12"
14 changes: 14 additions & 0 deletions engine/src/build.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
fn main() {
if std::env::var("CARGO_FEATURE_TUNING").is_ok() {
println!("cargo:rustc-cfg=feature=\"tuning\"");
}

// pluto classical means no use of NNUE, HCE is used instead
if std::env::var("CARGO_FEATURE_CLASSICAL").is_ok() {
println!("cargo:rustc-cfg=feature=\"classical\"");
}

if std::env::var("CARGO_FEATURE_CLASSICAL").is_ok() {
println!("cargo:rustc-cfg=feature=\"log\"");
}
}
Loading