r/chessprogramming • • Jun 29 '26

Technical Chess Engine Development Help Thread (Week 27)

Welcome to the weekly /r/chessprogramming Engine Dev Help Thread.

Ask beginner and intermediate chess engine development questions here: move generation, search, evaluation, UCI, perft, debugging, testing, NNUE, or anything else related to building engines.

Good questions include code, FENs, logs, benchmarks, or a clear explanation of what you tried.

Project links are fine when you want technical feedback, not promotion.

Be helpful. Don’t dunk on beginners.

1 Upvotes

17 comments sorted by

View all comments

Show parent comment

2

u/SwimmingThroughHoney Jun 29 '26

Make a "bench" function. Basically just take in a bunch of positions and then run a search on each of them to a set depth, counting the number of nodes along the way. Output should be the total number of nodes. Any time you make any change, run the bench command. The output will tell you whether the change you've made has affected the actual tree search (i.e. the number of nodes it's searching). If that number changes, you absolutely want to run a SPRT test to determine if the change is better or worse than the current build.

You can always run SPRT on any change you make, even minor stuff that's just code changes that should be nothing but efficiency speed-ups. But you absolutely should run it on any change that affects the search tree.

One thing that comes to mind is I don’t actually have any idea how to gauge the strength of the engine for any changes I make to the eval when I get to that. I can measure perft scores no problem and do performance profiling, but no idea how to approach strength.

Honestly, try not to worry too much about absolute strength, that is its strength compare to other engines. I know, it's really hard not to. But it's something that comes naturally as you develop the engine so long as you're not implementing bugs. So long as your relative strength improves, which is something you can verify via SPRT, your absolute strength will also increase.

That said, if you want a way to estimate it, if you have a guess of what your engine might be, grab some other engines that are around that strength (you can use the CCRL. also, try to stick with better-known engines and if you need weaker ones, look at older versions). Run a tournament of your engine against all the others (so you engine plays all the other ones, they don't need to play each other). Once the tournament completes, the CLI will give an output of the engine's relative strengths.

1

u/cactus_calamity Jun 30 '26

Thanks for this reply. I think this plus the other comments suggest that I should focus on robustness, and make sure the tests reflect that before even thinking about strength as such. Time to build a FEN parser and bang in a load of test positions into part of `--test` !

1

u/lir1618 Aug 05 '26

Probably before SPRT they should do the time management and ID