Skip to content

Commit

Permalink
Perft benchmarks and tests + fixes (#16)
Browse files Browse the repository at this point in the history
Use Divan for benchmarks.
Add perft4 benchmarks and compare against Shakmaty and Rust-Chess.
Add perft1-4 tests and compare against Shakmaty.
Fix: missing promotion to knight in move generation.
Fix: disable castling right when rook is captured.
  • Loading branch information
oriolarcas authored May 5, 2024
1 parent 1d5d433 commit a049fb8
Show file tree
Hide file tree
Showing 7 changed files with 509 additions and 28 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
run: cargo build --verbose
- name: Run tests
working-directory: ./chusst-gen
run: cargo test --verbose
run: cargo test --release --verbose
- name: Install React dependencies
run: npm install
if: startsWith(github.ref, 'refs/tags/')
Expand Down Expand Up @@ -66,7 +66,7 @@ jobs:
run: cargo build --verbose
- name: Run tests
working-directory: ./chusst-gen
run: cargo test --verbose
run: cargo test --release --verbose
- name: Install React dependencies
run: npm install
- name: Install Rust dependencies
Expand Down
142 changes: 135 additions & 7 deletions Cargo.lock

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

4 changes: 3 additions & 1 deletion chusst-gen/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ rand = "0.8.5"
serde = { version = "1.0.195", features = ["derive"] }

[dev-dependencies]
bencher = "0.1.5"
chess = "3.2.0"
divan = "0.1.14"
shakmaty = "0.27.0"

[[bench]]
name = "search"
Expand Down
Loading

0 comments on commit a049fb8

Please sign in to comment.