r/chessprogramming 8d ago

Technical I'm building an open-source C++ chess engine and I'd really like to build a community around it

I've been working on an open-source, UCI-compatible C++ chess engine called Volatile for a while now, and I've reached a point where I'd really like to get other people involved.

It's currently somewhere around the 2200–2400 Elo range, and the engine already has a proper Alpha-Beta search backend, with the architecture designed to support both HCE and NNUE evaluation. Right now, I'm focusing primarily on the HCE.

The reason I started Volatile is somewhat different from the usual "I'm going to make another chess engine" story.

I've always found computer chess fascinating, but I've also noticed that getting into the internals of a very strong engine can be intimidating. Projects like Stockfish have evolved for many years and are incredibly optimized, but for someone new who wants to experiment with the search or evaluation, there can be a pretty steep learning curve.

I wanted to see if it was possible to take a different approach.

The main idea behind Volatile is to have a highly maintainable architecture, using modern C++ design patterns while still being fast enough to play serious/strong chess.

I'd prefer a codebase where another developer can open the repository, understand how the pieces fit together, modify the evaluation or search, run an experiment, and contribute the result without having to spend months on understand the entire engine.

Obviously, this is something I still need to prove. I'm not claiming that abstraction automatically makes a chess engine better or that Volatile has somehow solved engine architecture. That's exactly the experiment I'm interested in.

And this is where I'm hoping to find some people who are interested in joining me.

I'm not just looking for someone to give the project a quick star(although I don't mind if you do) or tell me it looks interesting. I'd really like to find developers who enjoy computer chess and C++ and would be interested in actually experimenting with the engine.

That could mean:

  • improving evaluation
  • experimenting with search heuristics
  • benchmarking
  • finding architectural problems
  • reviewing PRs
  • suggesting better designs
  • or simply trying something weird and seeing whether it works

I'd especially love to have people who disagree with some of my architectural decisions and are willing to discuss them. If something I've designed is unnecessarily complicated or slower than it needs to be, I'd rather have someone point it out and help improve it.

My long-term goal is pretty ambitious: I want Volatile to become a genuinely community-developed engine.

I'd love to eventually look at the repository and see a constant stream of experiments, PRs, discussions and improvements from different people rather than everything coming from one developer.

And yes, eventually I'd love to see how far this architecture can actually go in terms of playing strength. Maybe one day Volatile can get close to the very top engines. Maybe it won't. I honestly don't know yet.

But that's what makes the experiment interesting to me.

Even if you don't want to contribute code, feedback on the architecture, things that look wrong, or ideas for where the engine should go next would be extremely valuable.

Maybe this is a bit ambitious but, I'd really like to build this engine with other people rather than just build it by myself.

Repository:
https://github.com/PriyojitRoy/Volatile

4 Upvotes

16 comments sorted by

6

u/WompTitanium 8d ago

https://github.com/erensh27/Ravager.git

I am also building Ravager chess engine, its already near ~3000 CCRL ratings, and defeats older versions of real stockfish without NNUE.

1

u/builder_2055 8d ago

Hi bro, i really want to code the engine from scratch using C++ and that is without the help of any LLMs,
I need guidance on where to start and what theory components I need to study, before I even start to code.

2

u/Information_Level 7d ago

I started with yt videos and reading chess-programming wiki to learn the basics. There are also plenty of new chess engines around that you can look at and learn from. I'd say first work on the legal move generation; once you have that down, you can start working on search and evaluation. Eventually, you'll find that there are always more optimized or better ways to do what you were already doing, and you'll encounter those at every step. That's where you'll end up learning a lot.

0

u/Information_Level 8d ago edited 8d ago

Great! Starred your repo. If possible could you share some tips on how to improve my engine, like I have been struggling a bit to pull it out of the 2400 rating bracket to 2800-2900. If you could take a look at my repo and offer from insights. Also what part of your engine is responsible for a huge elo jump from say about 2300 rating to around 2900 ?

1

u/WompTitanium 8d ago

NNUE played the most vital role, my search was already really good, a decent nnue helped me to scale it to 2900+, a good search with bad NNUE is way better than bad search with good NNUE, focus on the search for your engine

2

u/TheMazerFaker 8d ago

Personally i like the most simple and stupid approach to chess engines. At the end they have really not that many components and many c++ features just get in the way. Literally a couple of files like board, search, evaluation, uci, constants that expose one or two functions is the sweet spot. It's easy to navigate and to understand. C++ often makes things unnecessary complicated. It is useful in certain context but not for chess engines IMHO.

Good like with your project. A good boost can be given by fine-tuning parameters.

1

u/Information_Level 8d ago

Thanks, I definitely agree that engines don't need many components, but I find keeping things a bit modular helps me in the long run. Since I'm working on Volatile solo rn, it makes it much easier to come back to parts of the eval/search without having to re-understand everything. As long as it doesn't come with any performance cost, I find it worth it. In general, I think a good codebase makes navigation easier and lowers the barrier for more people to contribute. I haven't really seen an engine take this approach, so I decided to try it with my first engine.

1

u/TheMazerFaker 8d ago

Sure try your way. We can only benefit from some variety

2

u/ashishprasadrao 8d ago

Pls don’t use coding agents for chess engine development! Big red flag!

1

u/Information_Level 8d ago

Could you explain your reasoning for what makes use of coding agents in chess engine dev a "Big red flag" ?

1

u/Prestigious-Soil-123 3d ago

What’s the point of it?

1

u/Information_Level 3d ago edited 3d ago

Agents obviously help code faster, so I find them useful for pretty much any project. I know they're looked down upon in chess-engine development, but objectively there's nothing inherently wrong with using them. Obviously, blindly accepting whatever they generate defeats the point of development, and that's not how I or anyone should use them.

1

u/Prestigious-Soil-123 1d ago

Especially with something (just admit it), less human-readable like C++ you need to be able to understand the code. Going through and checking an agents work is harder than a human pressing buttons on a keyboard and worse. I was going to be a part of this. I don’t think I will anymore.

1

u/Information_Level 22h ago

That's fair. I don't think my codebase suffers from that problem though, since I'm pretty strict about understanding every line that goes into it. You may disagree, but I'd suggest having a look through the repo once and judging for yourself.

2

u/Axilerator 17h ago

Hi,

thank you for your post and the offer to let us contribute. I am sure I can be helpful since I write chessprograms for over 40 years now (just for myself as a hobby). While I have started in assembler on a Z80 chip in the 1980s, my current engine is written in C (not C++ though). Although my engine is not Stockfish-level either, it is well above the 3000 ELO level. I can share code snippets and knowledge with you (including writing fast NNUE evaluation with AVX or Neon intrinsics or how to program a Syzygy-tablebase-parser on your own).

Axel

1

u/Information_Level 16h ago

Hi Axel, it’s really great to have you willing to help! DM me whenever you're free, we can continue to discuss things further.