Skip to content

Conversation

@Orkking2
Copy link

Hello everyone curious enough to visit this unmaintained implementation of chess in rust.
I have taken it upon myself to fork this repo and maintain it. If you would like to contribute, please create a pull request at https://github.com/Orkking2/chess/pulls, unlike jordanbray, I have not been inactive since 2022 😅.
If you'd like to see what changes I have implemented, feel free to peruse this pull request, as it is not likely to be accepted.

@jordanbray
Copy link
Owner

jordanbray commented Mar 17, 2025

Ok, I've been running some benchmarks.

Commit 0b0f7f0 is faster than anything after. This appears to be when 3.2.0 was officially deployed.

I'm not 100% sure what the holdup is. But, this branch is also slower than main. When all is said and done, perft_01 runs in 3.9s on my machine, whereas the above commit runs in 2.9s.

This library is currently losing to cozychess. We are beating shakmaty and chessie in my preferred benchmark.

I am getting the chess_perft crate in a format where you can run it yourself. I will update this comment in a sec.

So, to run the benchmarks:

git checkout ssh://[email protected]/jordanbray/chess_perft.git
# make sure ../chess is your copy of `chess`, the Cargo.toml depends on the path for the moment.  I'll fix that later.
cargo bench

@jordanbray
Copy link
Owner

I have also created a branch called bigolupdate which contains all of this data, as well as some of my own updates. That is to avoid clobbering your history.

@Orkking2
Copy link
Author

I got the following error:

git checkout ssh://[email protected]/jordanbray/chess_perft.git
error: pathspec 'ssh://[email protected]/jordanbray/chess_perft.git' did not match any file(s) known to git

@Orkking2
Copy link
Author

Running cargo bench on jordanbray/chess_perft#3 demonstrates that this update is faster than the original (generally) when run with no_std.

@jordanbray
Copy link
Owner

I have created a new branch, called fastest, where I'm slowly merging many of the ideas here. The problem with this update is simply that it's slow, and I couldn't find out where the slowness is coming from.

However, the fastest branch is now "completely safe" (by that I mean, I don't think it's possible for a user to cause a safety violation without intentionally calling an unsafe function), and the fastest branch is the fastest move generator in the rust ecosystem.

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