...back in 2019/2020 when I was developing my own neural-net based minimax-tree-searching chess engine.
https://github.com/leonkacowicz/chess-tools
All packages are written in "modern C++" (>= C++17) and use CMake as build tool and GCC as compiler.
The tools include a couple of useful libraries so you don't have to write magic-bitboards/etc from scratch, and tools like a chess-arbiter (to make to engines play against each other), and a chess-diluter (so you can dilute existing chess engines to a less potent concentration to track the improvement of the chess-engine you are developing while its strength is not comparable with Stockfish's)
Please, let me know if there's anything that can be improved or needs to be fixed. If you want to, I'd love to collaborate to improve the tools.
Open-sourcing a collection of chess-tools I developed...
Moderator: Ras
-
- Posts: 7
- Joined: Fri Jan 20, 2023 7:53 pm
- Full name: Leon Kacowicz
-
- Posts: 7
- Joined: Fri Jan 20, 2023 7:53 pm
- Full name: Leon Kacowicz
Re: Open-sourcing a collection of chess-tools I developed...
quick correction: "... to make 2 engines play..."
-
- Posts: 680
- Joined: Sat Jun 08, 2013 10:07 am
- Location: France
- Full name: Roland Chastain
Re: Open-sourcing a collection of chess-tools I developed...
Hello! Looks interesting. Thank you for sharing.
I had five minutes to make a quick test. I downloaded and built the chess engine.
The building system works fine.
I notice that the items id name ... and id author ... are missing, and that the engine doesn't quit when it receives the quit command.
I had five minutes to make a quick test. I downloaded and built the chess engine.
The building system works fine.
I notice that the items id name ... and id author ... are missing, and that the engine doesn't quit when it receives the quit command.
Code: Select all
[roland@localhost engine (main)]$ ./chessengine
uci
uciok
quit
^C
[roland@localhost engine (main)]$
Qui trop embrasse mal étreint.
-
- Posts: 7
- Joined: Fri Jan 20, 2023 7:53 pm
- Full name: Leon Kacowicz
Re: Open-sourcing a collection of chess-tools I developed...
Thanks for checking it out and testing it. Yeah, it probably has quite a few of these rough edges. I'll try to correct these asap!Roland Chastain wrote: ↑Sat Jan 21, 2023 5:49 am Hello! Looks interesting. Thank you for sharing.
I had five minutes to make a quick test. I downloaded and built the chess engine.
The building system works fine.
I notice that the items id name ... and id author ... are missing, and that the engine doesn't quit when it receives the quit command.
Code: Select all
[roland@localhost engine (main)]$ ./chessengine uci uciok quit ^C [roland@localhost engine (main)]$
-
- Posts: 7
- Joined: Fri Jan 20, 2023 7:53 pm
- Full name: Leon Kacowicz
Re: Open-sourcing a collection of chess-tools I developed...
I just pushed a fix for these in the both the chess-engine and the chess-neuralnet-engine. Thanks again for catching those problems, and let me know if you find more. Also feel free to send pull requests if you prefer.leonkacowicz wrote: ↑Sat Jan 21, 2023 6:02 amThanks for checking it out and testing it. Yeah, it probably has quite a few of these rough edges. I'll try to correct these asap!Roland Chastain wrote: ↑Sat Jan 21, 2023 5:49 am Hello! Looks interesting. Thank you for sharing.
I had five minutes to make a quick test. I downloaded and built the chess engine.
The building system works fine.
I notice that the items id name ... and id author ... are missing, and that the engine doesn't quit when it receives the quit command.
Code: Select all
[roland@localhost engine (main)]$ ./chessengine uci uciok quit ^C [roland@localhost engine (main)]$
-
- Posts: 680
- Joined: Sat Jun 08, 2013 10:07 am
- Location: France
- Full name: Roland Chastain
Re: Open-sourcing a collection of chess-tools I developed...
Thanks.
Another thing I noticed. The engine doesn't seem to recognize the position fen ... command.
Another thing I noticed. The engine doesn't seem to recognize the position fen ... command.
Code: Select all
07:16:05:962 -> position fen rnbqkbnr/pp2pppp/2p5/3P4/8/5N2/PPPP1PPP/RNBQKB1R b KQkq - 0 3
07:16:05:962 -> isready
07:16:05:983 <- readyok
07:16:05:993 -> go movetime 500
07:16:06:034 <- info calculating move for 500ms
07:16:06:034 <- info depth 1 score cp 0 nodes 1 qnodes 1 nps 6986 time 0 tthit 0 pv b1a3
07:16:06:034 <- info depth 1 score cp 5 nodes 2 qnodes 2 nps 10850 time 0 tthit 1 pv b1c3
07:16:06:034 <- info depth 2 score cp 0 nodes 41 qnodes 40 nps 91096 time 0 tthit 3 pv b1c3 b8c6
07:16:06:034 <- info depth 3 score cp 5 nodes 161 qnodes 120 nps 67813 time 2 tthit 4 pv b1c3 b8c6 g1f3
07:16:06:034 <- info depth 3 score cp 7 nodes 356 qnodes 263 nps 83194 time 4 tthit 42 pv b2b3 b8c6 c1b2
07:16:06:034 <- info depth 3 score cp 9 nodes 476 qnodes 341 nps 75248 time 6 tthit 65 pv b2b4 b8c6 c1b2
07:16:06:034 <- info depth 4 score cp -2 nodes 1685 qnodes 1289 nps 88657 time 19 tthit 291 pv b2b4 e7e6 c1b2 f8b4
07:16:06:090 <- info depth 4 score cp 0 nodes 3448 qnodes 2617 nps 84594 time 40 tthit 731 pv d2d4 d7d5 c1d2 c8g4
07:16:06:090 <- info depth 5 score cp 5 nodes 6519 qnodes 4904 nps 75393 time 86 tthit 988 pv d2d4 d7d5 c1d2 c8g4 g1f3
07:16:06:342 <- info depth 6 score cp 0 nodes 31510 qnodes 26327 nps 91719 time 343 tthit 4207 pv d2d4 d7d5 c1d2 b8c6 g1f3 c8d7
07:16:06:543 <- bestmove d2d4
Qui trop embrasse mal étreint.
-
- Posts: 7
- Joined: Fri Jan 20, 2023 7:53 pm
- Full name: Leon Kacowicz
Re: Open-sourcing a collection of chess-tools I developed...
You're right. In this line https://github.com/leonkacowicz/chess-e ... in.cpp#L90Roland Chastain wrote: ↑Sat Jan 21, 2023 8:36 am Thanks.
Another thing I noticed. The engine doesn't seem to recognize the position fen ... command.
Code: Select all
07:16:05:962 -> position fen rnbqkbnr/pp2pppp/2p5/3P4/8/5N2/PPPP1PPP/RNBQKB1R b KQkq - 0 3 07:16:05:962 -> isready 07:16:05:983 <- readyok 07:16:05:993 -> go movetime 500 07:16:06:034 <- info calculating move for 500ms 07:16:06:034 <- info depth 1 score cp 0 nodes 1 qnodes 1 nps 6986 time 0 tthit 0 pv b1a3 07:16:06:034 <- info depth 1 score cp 5 nodes 2 qnodes 2 nps 10850 time 0 tthit 1 pv b1c3 07:16:06:034 <- info depth 2 score cp 0 nodes 41 qnodes 40 nps 91096 time 0 tthit 3 pv b1c3 b8c6 07:16:06:034 <- info depth 3 score cp 5 nodes 161 qnodes 120 nps 67813 time 2 tthit 4 pv b1c3 b8c6 g1f3 07:16:06:034 <- info depth 3 score cp 7 nodes 356 qnodes 263 nps 83194 time 4 tthit 42 pv b2b3 b8c6 c1b2 07:16:06:034 <- info depth 3 score cp 9 nodes 476 qnodes 341 nps 75248 time 6 tthit 65 pv b2b4 b8c6 c1b2 07:16:06:034 <- info depth 4 score cp -2 nodes 1685 qnodes 1289 nps 88657 time 19 tthit 291 pv b2b4 e7e6 c1b2 f8b4 07:16:06:090 <- info depth 4 score cp 0 nodes 3448 qnodes 2617 nps 84594 time 40 tthit 731 pv d2d4 d7d5 c1d2 c8g4 07:16:06:090 <- info depth 5 score cp 5 nodes 6519 qnodes 4904 nps 75393 time 86 tthit 988 pv d2d4 d7d5 c1d2 c8g4 g1f3 07:16:06:342 <- info depth 6 score cp 0 nodes 31510 qnodes 26327 nps 91719 time 343 tthit 4207 pv d2d4 d7d5 c1d2 b8c6 g1f3 c8d7 07:16:06:543 <- bestmove d2d4
It's only checking for startpos.
But it should not be too hard to add this, as decoding fen is already implemented in https://github.com/leonkacowicz/chess-c ... en.cpp#L67
I'll work on this soon. Thanks for pointing it out. I'll add an issue to track this until it's pushed: https://github.com/leonkacowicz/chess-engine/issues/1
-
- Posts: 680
- Joined: Sat Jun 08, 2013 10:07 am
- Location: France
- Full name: Roland Chastain
Re: Open-sourcing a collection of chess-tools I developed...
I have just seen that it is fixed. Thanks.
Qui trop embrasse mal étreint.
-
- Posts: 7
- Joined: Fri Jan 20, 2023 7:53 pm
- Full name: Leon Kacowicz
Re: Open-sourcing a collection of chess-tools I developed...
A nice idea would be to write a complete "abstract" uci chess engine in the chess-uci package, so in the engine packages it's only necessary to implement the filler code and not worry about any UCI specifics.
-
- Posts: 680
- Joined: Sat Jun 08, 2013 10:07 am
- Location: France
- Full name: Roland Chastain
Re: Open-sourcing a collection of chess-tools I developed...
Yes, nice idea indeed. And why not also a CECP engine (if ever you feel interest for that). Just in case, there is an excellent tutorial with source code on the Winboard forum.
Qui trop embrasse mal étreint.