New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ideas #14
Comments
Hey Mike, glad you were able to build it!
This is a deliberate choice, opening book management is usually offloaded to the GUI (cute chess has an option to load a pgn file for example).
Move generation is one thing, its pretty slow right now relative to other engines, mostly due to the fact that I use clone in a lot of places which makes the move generation code much easier to understand and debug but much slower. If you can find a way to make some optimizations there that would be great. You can check out the README for how to run benchmarks. |
Mitchel, I did not see the AI that already exists. I was refering more to the nural/deep learning AI. I spent my evening running tests/perf and reading. Clone is usually number 1 or 2 in the perf stats. I'm running on linux using a i7 lenovo, 4 cpus 8 threads. My observations so far:
|
Testing results: Perf ./walleye -T --depth=6 perf sudo perf record ./walleye -P -S perf |
Thanks for putting this together, for accurate results though make sure you are profiling the release build (with these nps numbers I highly suspect you are profiling the debug build). For perf to still work for you properly you can instruct the compiler to keep the debugging symbols using
For why the speed drops off rapidly as depth increase thats because there are many more terminal nodes (exponentially more each level) and each of those positions gets evaluated, if you were to disable the evaluation part of the test bench you would get a much more consistent nps across depths. |
I was profiling debug. Where do I put the debug = true line? I expect the release numbers would be better, but the items would likely stay the same. |
You would add it here https://github.com/MitchelPaulin/Walleye/blob/main/Cargo.toml The numbers actually do change slightly, for example |
Release version sudo perf record ./walleye -T --depth=5 perf |
And when playing itself: perf Does it only play so far (e.g. number of moves)? What determines when it stops? |
Its set to stop after 100 moves or checkmate, it usually ends up drawing when it plays itself and so reaches the 100 move mark. Profiling it with -PS gives a better idea of how it performs in real games, where as -T is good if you want move generation specifically, |
Hi Mitchel, Got a few things I'm trying but running into borrow checker issues, I'm trying to run multiple threads in generate_moves
// spawn this I clone the board but keep getting a static error on the zobrist_hasher. Not sure how to fix that yet. I have to understand ownership and 'static better. My idea is running the get moves in threads should be faster. I have a similar idea in the check code but am less sure it will help. Mike |
Hey Mike, I do not think using multiple cores during play is allowed under the CCRL testing conditions, or at least they put the engine on a separate leader board and would prefer you use no more than one core during play. you can see this issue for more details. Usually you are allowed more than one thread but these need to be "light weight" threads, usually just waiting to be waken up by input and using additional threads for move generation would have a noticeable multi-core CPU footprint. For learning purposes adding multi threading is a great idea but unfortunately I would not be able to include the results in Walleye. Also a quick note: |
I'm going to close this issue but feel free to keep commenting here if you have any other questions |
Hi Mitchel,
Nice job on the engine!
Just starting to get familiar with the code. New to rust so it will take some time. So far it looks great!
No specific issue. Is thier anything you need help on?
On my initial review it does not appear that you support using any sort of opening book moves. I'm looking at another another github project that could act as a source to provide a set of opening book moves. See https://github.com/niklasf/chess-openings
I have cloned and built Walleye.
Cute chess does not seem to install as documented. But that issues will go to them.
A few other ideas:
The text was updated successfully, but these errors were encountered: