How to submit python engine?
How to submit python engine?
Hello,
I wrote a hobby Python/C++ hybrid chess engine and I am curious if it is possible to submit it here.
If yes, there are several options, please advise what works best, I can:
1) provide the Python scripts, the compiled binary module (for Python3.9 or 3.10 for Linux or Windows), and a requirements.txt file
(the Python side has dependencies on python-chess and psutils); or
2) look into creating a single file self-extracting binary built with PyInstaller, for Linux or Windows.
(based on experiments this seems to work but there's a slow startup due to the self-decompression step).
Also, the engine works best when compiled for AVX2, or even better AVX-512. Should I make separate binaries with/without SSE/AVX, etc?
I do not have and official release ready just yet, but you can see the work in progress here:
https://github.com/cristivlas/sturddle-chess-engine (most recent work is in the beta branch), and you can check out some stats here: https://lichess.org/@/Sturddle.
There's also a companion app for Android: https://github.com/cristivlas/sturddle-chess-app
with a (pre-release) binary
https://github.com/cristivlas/sturddle- ... -debug.apk
if anyone is curious.
Best regards,
Cristian
I wrote a hobby Python/C++ hybrid chess engine and I am curious if it is possible to submit it here.
If yes, there are several options, please advise what works best, I can:
1) provide the Python scripts, the compiled binary module (for Python3.9 or 3.10 for Linux or Windows), and a requirements.txt file
(the Python side has dependencies on python-chess and psutils); or
2) look into creating a single file self-extracting binary built with PyInstaller, for Linux or Windows.
(based on experiments this seems to work but there's a slow startup due to the self-decompression step).
Also, the engine works best when compiled for AVX2, or even better AVX-512. Should I make separate binaries with/without SSE/AVX, etc?
I do not have and official release ready just yet, but you can see the work in progress here:
https://github.com/cristivlas/sturddle-chess-engine (most recent work is in the beta branch), and you can check out some stats here: https://lichess.org/@/Sturddle.
There's also a companion app for Android: https://github.com/cristivlas/sturddle-chess-app
with a (pre-release) binary
https://github.com/cristivlas/sturddle- ... -debug.apk
if anyone is curious.
Best regards,
Cristian
- Graham Banks
- Posts: 26926
- Joined: Sun Dec 18, 2005 5:47 pm
- Sign-up code: 0
- Location: Auckland, NZ
Re: How to submit python engine?
Best to provide an avx2 exe all ready to go.
Single file for Windows.
Single file for Windows.
Re: How to submit python engine?
64-bit, all-in-one Windows binary:
https://github.com/cristivlas/sturddle- ... 9-avx2.exe
There's also a non-AVX2 build under the assets, just in case, at https://github.com/cristivlas/sturddle- ... e/releases
Is this sufficient or do I need to post a new engine "official announcement"?
Best regards,
Cristian
https://github.com/cristivlas/sturddle- ... 9-avx2.exe
There's also a non-AVX2 build under the assets, just in case, at https://github.com/cristivlas/sturddle- ... e/releases
Is this sufficient or do I need to post a new engine "official announcement"?
Best regards,
Cristian
- Graham Banks
- Posts: 26926
- Joined: Sun Dec 18, 2005 5:47 pm
- Sign-up code: 0
- Location: Auckland, NZ
Re: How to submit python engine?
Your name and nationalty would be useful for our engine notes.cristiv wrote: ↑Sat Nov 05, 2022 3:48 am 64-bit, all-in-one Windows binary:
https://github.com/cristivlas/sturddle- ... 9-avx2.exe
There's also a non-AVX2 build under the assets, just in case, at https://github.com/cristivlas/sturddle- ... e/releases
Is this sufficient or do I need to post a new engine "official announcement"?
Best regards,
Cristian
Roughly how strong do you estimate your engine to be in CCRL terms?
Re: How to submit python engine?
Going by the games played on https://lichess.org/@/Sturddle, I would estimate the strength at around 2500.
Cristian Vlasceanu, USA
Cristian Vlasceanu, USA
- Gabor Szots
- Posts: 12855
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: How to submit python engine?
Hi Cristian,
What NNUE do you use?
What NNUE do you use?
Re: How to submit python engine?
Hi Gabor,
For the code itself I forked nnue-probe, and modified it slightly to better fit with the rest of the engine. I can talk more about the code modifications if you are interested.
As for the network, for now I am using an older file (I think it is from 2020) from the Stockfish community.
I do some "post-processing" on the number that I get back from NNUE, mainly scale it by a value (chosen by running experiments under Chess Tuning Tools).
I have some ideas I want to explore about changing the NNUE architecture, and provide my own trained network at some point; for this 0.99 pre-release however I have to live with the nnue-probe fork.
Best regards,
Cristian
For the code itself I forked nnue-probe, and modified it slightly to better fit with the rest of the engine. I can talk more about the code modifications if you are interested.
As for the network, for now I am using an older file (I think it is from 2020) from the Stockfish community.
I do some "post-processing" on the number that I get back from NNUE, mainly scale it by a value (chosen by running experiments under Chess Tuning Tools).
I have some ideas I want to explore about changing the NNUE architecture, and provide my own trained network at some point; for this 0.99 pre-release however I have to live with the nnue-probe fork.
Best regards,
Cristian
- Gabor Szots
- Posts: 12855
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: How to submit python engine?
Thanks Cristian. No, I don't want you to talk more on code modifications, you can be sure I would not understand a single word.
You have answered my question fully. I can see that the SF net is a starting point for you and I am looking forward to developments. Good luck!
You have answered my question fully. I can see that the SF net is a starting point for you and I am looking forward to developments. Good luck!
Re: How to submit python engine?
Hi Gabor,Gabor Szots wrote: ↑Sat Nov 05, 2022 9:34 am Thanks Cristian. No, I don't want you to talk more on code modifications, you can be sure I would not understand a single word.
You have answered my question fully. I can see that the SF net is a starting point for you and I am looking forward to developments. Good luck!
Just to clarify, did you mean you will only be accepting this engine for testing in the future when the nnue architecture is fully original? Or is it fine the way it is?
Thanks,
Cristian
- Gabor Szots
- Posts: 12855
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: How to submit python engine?
Hi Cristian,
What I am writing here is my personal view. I think the engine is fine because the search is original (Is it?) and it is the first version you release so that it may serve as an 'origo' for future versions. If it were a new version with HCE replaced by NNUE evaluation I'd show little interest.
What all this means is that I have put it in my testing queue. However, as I have limited resources and many engines to test, it will have to wait a bit till I can start with testing. Some other tester might pick it up sooner, though.
Best,
Gabor
PS. I might make an exception and put it in top of the queue because it is new.
Re: How to submit python engine?
Hi Gabor,Gabor Szots wrote: ↑Sun Nov 06, 2022 7:15 amHi Cristian,
What I am writing here is my personal view. I think the engine is fine because the search is original (Is it?) and it is the first version you release so that it may serve as an 'origo' for future versions. If it were a new version with HCE replaced by NNUE evaluation I'd show little interest.
What all this means is that I have put it in my testing queue. However, as I have limited resources and many engines to test, it will have to wait a bit till I can start with testing. Some other tester might pick it up sooner, though.
Best,
Gabor
PS. I might make an exception and put it in top of the queue because it is new.
Thank you for the clarifications. Yes the search is quite original, the most interesting idea IMO being that its "personality" can be changed via the UCI "Algorithm" parameter from mtdf, (default) to negascout or negamax.
After you asked me about NNUE I poked around a bit and saw there were some controversies around the topic. Personally I think that building original ideas on top of existing components is good engineering, but I do understand that some people may think it is unethical to use pre-trained NNUEs from SF, and I respect that point of view. My engine can be built without NNUE and retain complete functionality, it will just fail over to HCEs (and play a weaker game, of course); just saying there's a bit more to it than just a search function slapped on top of nnue-probe
Newbie question: is there a "setup recipe" that I can follow to replicate your "official" test environment and run my own tournaments?
Thanks again,
Cristian
- Gabor Szots
- Posts: 12855
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: How to submit python engine?
I don't think it's unethical to use SF NNUE's, only I don't find that interesting. I did test one such engine (BBC) with the only goal to see how much improvement NNUE constitutes over HCE (it was huge). In the case of BBC there had been versions with HCE only so a comparison could be made.cristiv wrote: ↑Sun Nov 06, 2022 3:44 pmAfter you asked me about NNUE I poked around a bit and saw there were some controversies around the topic. Personally I think that building original ideas on top of existing components is good engineering, but I do understand that some people may think it is unethical to use pre-trained NNUEs from SF, and I respect that point of view. My engine can be built without NNUE and retain complete functionality, it will just fail over to HCEs (and play a weaker game, of course); just saying there's a bit more to it than just a search function slapped on top of nnue-probe
Newbie question: is there a "setup recipe" that I can follow to replicate your "official" test environment and run my own tournaments?
Thanks again,
Cristian
Now that you say Sturddle can be compiled not to use NNUE, let me ask you what you would prefer: to test it with HCE or with NNUE? I am not going to do both, one reference version will be enough in my opinion. Again, this is only my point of view, my fellow testers might have different opinions.
If you want to simulate the conditions of our testing environment here is a thread dealing with that: viewtopic.php?f=7&t=1486
You are welcomed to ask any questions if you find something is missing there.
PS. I tried to compile the source but failed. The libpopcnt folder is empty. There might be other problems too. These are the errors:
In file included from captures.cpp:29:
chess.h:48:10: fatal error: libpopcnt.h: No such file or directory
48 | #include "libpopcnt.h"
| ^~~~~~~~~~~~~
compilation terminated.
In file included from chess.cpp:29:
chess.h:48:10: fatal error: libpopcnt.h: No such file or directory
48 | #include "libpopcnt.h"
| ^~~~~~~~~~~~~
compilation terminated.
In file included from context.cpp:32:
chess.h:48:10: fatal error: libpopcnt.h: No such file or directory
48 | #include "libpopcnt.h"
| ^~~~~~~~~~~~~
compilation terminated.
In file included from search.cpp:34:
context.h:30:10: fatal error: Python.h: No such file or directory
30 | #include "Python.h"
| ^~~~~~~~~~
compilation terminated.
Re: How to submit python engine?
My preference is to test the NNUE build.
Your compilation failed because the git repo needs to be cloned recursively to get the submodules, to fix:
git submodule update —init —recursive
You also need the Python development libraries and header file.
Regards
Cristian
Your compilation failed because the git repo needs to be cloned recursively to get the submodules, to fix:
git submodule update —init —recursive
You also need the Python development libraries and header file.
Regards
Cristian
- Gabor Szots
- Posts: 12855
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: How to submit python engine?
OK, I have started a gauntlet.
A small problem: when invoking the program a window pops up which must be iconized not to be there all the time.
A small problem: when invoking the program a window pops up which must be iconized not to be there all the time.
Re: How to submit python engine?
Do you get this behavior with the build that I provided or with binaries built by you?Gabor Szots wrote: ↑Sun Nov 06, 2022 7:19 pm OK, I have started a gauntlet.
A small problem: when invoking the program a window pops up which must be iconized not to be there all the time.
I tested my build with Arena 3.5.1 and Cutechess under Windows 10 and have not seen any window popping up.
What GUI are you running?
- Gabor Szots
- Posts: 12855
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: How to submit python engine?
I use your build. It's under the Shredder 13 GUI, haven't tried Arena. This is also Win10.cristiv wrote: ↑Sun Nov 06, 2022 8:09 pmDo you get this behavior with the build that I provided or with binaries built by you?Gabor Szots wrote: ↑Sun Nov 06, 2022 7:19 pm OK, I have started a gauntlet.
A small problem: when invoking the program a window pops up which must be iconized not to be there all the time.
I tested my build with Arena 3.5.1 and Cutechess under Windows 10 and have not seen any window popping up.
What GUI are you running?
EDIT: Just tried Arena. The window does not pop up.
Re: How to submit python engine?
Shredder 13 is commercial. I don't know if there is a trial version.
- Gabor Szots
- Posts: 12855
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: How to submit python engine?
Sorry, I have inadvertently overwritten your last post.
Re: How to submit python engine?
Looks reasonably priced though. I was about to ask this question on the other thread but have not finished going through all the posts: is there a technical reason (such as accuracy of results) for testing under Windows versus say, Cutechess under Linux? Or just a simple matter of convenience / personal preference?
- Graham Banks
- Posts: 26926
- Joined: Sun Dec 18, 2005 5:47 pm
- Sign-up code: 0
- Location: Auckland, NZ
Re: How to submit python engine?
All CCRL testers use Windows and AVX2 at present.cristiv wrote: ↑Sun Nov 06, 2022 9:08 pmLooks reasonably priced though. I was about to ask this question on the other thread but have not finished going through all the posts: is there a technical reason (such as accuracy of results) for testing under Windows versus say, Cutechess under Linux? Or just a simple matter of convenience / personal preference?
- Gabor Szots
- Posts: 12855
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: How to submit python engine?
Well, reasonably priced for an ancient and user-unfriendly GUI.cristiv wrote: ↑Sun Nov 06, 2022 9:08 pmLooks reasonably priced though. I was about to ask this question on the other thread but have not finished going through all the posts: is there a technical reason (such as accuracy of results) for testing under Windows versus say, Cutechess under Linux? Or just a simple matter of convenience / personal preference?
I test under Windows because I don't have Linux. Neither of CCRL testers has. And I don't use Cute Chess because it lacks one of the for me most important features: interrupting/resuming a tournament.
Re: How to submit python engine?
According to https://github.com/cutechess/cutechess/pull/591 there is a fix available at https://rwbc-chess.de/download.htm, I am going to check it out.Gabor Szots wrote: ↑Sun Nov 06, 2022 9:12 pmWell, reasonably priced for an ancient and user-unfriendly GUI.cristiv wrote: ↑Sun Nov 06, 2022 9:08 pmLooks reasonably priced though. I was about to ask this question on the other thread but have not finished going through all the posts: is there a technical reason (such as accuracy of results) for testing under Windows versus say, Cutechess under Linux? Or just a simple matter of convenience / personal preference?
I test under Windows because I don't have Linux. Neither of CCRL testers has. And I don't use Cute Chess because it lacks one of the for me most important features: interrupting/resuming a tournament.
EDIT1: Looks like cutechess can pause/resume in memory but NOT save/resume tournament to/from a file
EDIT2: Added build instructions to beta branch, new beta-1.1 with Windows exe with fix for the extraneous window pop-up under Shredder:
https://github.com/cristivlas/sturddle- ... g/beta-1.1
- Gabor Szots
- Posts: 12855
- Joined: Sat Dec 09, 2006 6:30 am
- Sign-up code: 10159
- Location: Szentendre, Hungary
Re: How to submit python engine?
I can see you have released beta 1.1 which is 'no-console' and indeed it does not run from the command line. It's a pity because the first thing I try with a new engine is to run it from the command line, issuing uci then go depth n, to see it works and how fast it is. No big deal.
Anyway, I'm already into a tournament with 1.0 so I'm not going to switch.
Anyway, I'm already into a tournament with 1.0 so I'm not going to switch.