I want to improve my engine by making it play itself. How should I organize it? What should be the time limit or searching-depth limit? How can I evaluate if a stronger version of engine won or was it just a pure luck?
Thank you!
How do you organize a self-play?
Moderator: Ras
-
- Posts: 16
- Joined: Fri Oct 25, 2019 2:51 pm
- Full name: Jaroslav Tavgen
-
- Posts: 5713
- Joined: Tue Feb 28, 2012 11:56 pm
Re: How do you organize a self-play?
The more games the better. Let two versions play each other at very fast time controls (seconds per full game, not minutes) and play as many games in parallel as your computer has cores (or even threads).jaroslav.tavgen wrote: ↑Sun Sep 14, 2025 9:12 pm I want to improve my engine by making it play itself. How should I organize it? What should be the time limit or searching-depth limit? How can I evaluate if a stronger version of engine won or was it just a pure luck?
Do not limit search depth. Limit total time for the game.
You can use cutechess-cli to run the games and keep track of the results.
Then learn about statistics to gain some understanding of when a result is significant or not.
-
- Posts: 580
- Joined: Tue Jul 03, 2018 10:19 am
- Full name: Folkert van Heusden
Re: How do you organize a self-play?
...or use 'sprt' in fastchess and let fastchess tell you what the result issyzygy wrote: ↑Mon Sep 15, 2025 6:10 pmThe more games the better. Let two versions play each other at very fast time controls (seconds per full game, not minutes) and play as many games in parallel as your computer has cores (or even threads).jaroslav.tavgen wrote: ↑Sun Sep 14, 2025 9:12 pm I want to improve my engine by making it play itself. How should I organize it? What should be the time limit or searching-depth limit? How can I evaluate if a stronger version of engine won or was it just a pure luck?
Do not limit search depth. Limit total time for the game.
You can use cutechess-cli to run the games and keep track of the results.
Then learn about statistics to gain some understanding of when a result is significant or not.

-
- Posts: 5713
- Joined: Tue Feb 28, 2012 11:56 pm
Re: How do you organize a self-play?
-
- Posts: 37
- Joined: Fri May 30, 2025 10:18 pm
- Full name: Ben Vining
Re: How do you organize a self-play?
Here's an example of integrating fastchess SPRT into a CMake workflow: https://github.com/benthevining/BenBot/ ... eLists.txt
I create 2 custom targets, sprt_set_baseline and sprt. sprt_set_baseline builds the engine and copies the binary to a eng_baseline file, sprt always tests the latest build against the last baseline. So then the workflow is, when I'm at a stable point, run sprt_set_baseline, then make some changes and run sprt, and that should tell you if your changes have helped or hurt.
I create 2 custom targets, sprt_set_baseline and sprt. sprt_set_baseline builds the engine and copies the binary to a eng_baseline file, sprt always tests the latest build against the last baseline. So then the workflow is, when I'm at a stable point, run sprt_set_baseline, then make some changes and run sprt, and that should tell you if your changes have helped or hurt.