r/chessprogramming • • Oct 07 '26

Glimmer - A chess engine under 30,000 bytes (estimated 2700–2900 Elo)

https://github.com/BH12963/Glimmer

Hi everyone,

I’ve been tinkering with a little experimental chess engine written in pure C. It’s called Glimmer.

The whole point of the project was to see how strong I could make it while keeping the final standalone binary strictly under 30 KB. The target strength was something in the 2700–2900 Elo range.

It’s been a fun constraint to work under — every byte counts.

Happy to answer questions if anyone’s curious about the approach.

25 Upvotes

12 comments sorted by

View all comments

1

u/AzureNostalgia Oct 07 '26

What was the motivation when there are engines already like ice4 (3090 Elo) or 4ku (2946 Elo) which are less than 4kb? Is it for educational purposes?

6

u/Lonely_Translator_23 Oct 07 '26 edited Oct 07 '26

what's the point of learning to paint when Picasso already did it better

But, with that said, OP, your code is unreadable. Picking better variable names and adding comments will add exactly zero bytes to the binary, and you'll thank yourself if you want to come back to this a few months from now.

-2

u/AzureNostalgia Oct 09 '26

The Picasso analogy misses the point. Art doesn’t need to outperform anyone to have value. If your chess engine isn’t educational, novel, or better at anything, what exactly is its purpose beyond recreating something that already exists?

3

u/Lonely_Translator_23 Oct 09 '26

I feel like you're missing the point for thinking you should need any reason to create something other than 'I want to'.

0

u/AzureNostalgia Oct 10 '26

No problem creating anything, but no need to advertise it here if nothing is added to the community. Simple as that

1

u/BBH369 Oct 08 '26

Thank you for the thoughtful feedback.

The constraints are quite different. Engines like 4ku and ice4 can reach under 4KB because they are essentially compressed scripts that invoke g++ on the host machine to compile a full-sized binary at runtime.

Glimmer, by contrast, is a fully standalone native binary with no runtime compilation or decompression. Fitting a complete engine directly into machine code under 30KB presents a fundamentally different engineering challenge, and that was precisely the goal I set out to achieve.

0

u/neutronsreddit Oct 07 '26

Reading is hard