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

Discussion of anything and everything relating to chess playing software and machines.

Moderator: Ras

BB12963
Posts: 2
Joined: Fri Oct 09, 2026 1:47 pm
Full name: Bui Hoang Bach

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

Post by BB12963 »

Hi everyone,

I’ve been messing around with a tiny experimental chess engine written in pure C called Glimmer.

The whole idea was to see how strong I could push it while keeping the final binary strictly under 30 KB. I was aiming for something in the 2700–2900 Elo range.

Unlike those ultra-minimal engines that pack themselves into self-extracting shell scripts and then call the host’s compiler at runtime, Glimmer is a real standalone native binary — just pure machine code, nothing else.

It’s been a really fun (and sometimes painful) constraint to work under. Every single byte counts.
https://github.com/BH12963/Glimmer
Happy to answer questions if anyone’s curious about how I approached it!
User avatar
Graham Banks
Posts: 46562
Joined: Sun Feb 26, 2006 10:52 am
Location: Auckland, NZ

Re: [Release] Glimmer - A chess engine under 30,000 bytes (estimated 2700–2900 Elo)

Post by Graham Banks »

Please provide exes.
gbanksnz at gmail.com
User avatar
Tibono
Posts: 193
Joined: Sat Aug 01, 2015 6:16 pm
Location: France
Full name: Eric Bonneau

Re: [Release] Glimmer - A chess engine under 30,000 bytes (estimated 2700–2900 Elo)

Post by Tibono »

from Github page: Glimmer stays deliberately Linux-only and ELF-native. No Windows builds are provided or supported.
Regards,
Eric
User avatar
Jim Ablett
Posts: 2630
Joined: Fri Jul 14, 2006 7:56 am
Location: London, England
Full name: Jim Ablett

Re: [Release] Glimmer - A chess engine under 30,000 bytes (estimated 2700–2900 Elo)

Post by Jim Ablett »

I've compiled it in Windows for size rather than speed using Tiny C compiler (keeping authors original intent)
Executable size 23700 bytes.

https://fromsmash.com/Glimmer10JA

Jim.
BB12963
Posts: 2
Joined: Fri Oct 09, 2026 1:47 pm
Full name: Bui Hoang Bach

Re: [Release] Glimmer - A chess engine under 30,000 bytes (estimated 2700–2900 Elo)

Post by BB12963 »

Hi Jim,
Thanks a lot for taking the time to compile it!
I just downloaded the file and checked the size on Linux:

Code: Select all

$ wc -c glimmer_10_64_ja.exe
243200 glimmer_10_64_ja.exe
So it’s actually 243,200 bytes (~237.5 KB), not 23,700 bytes. Looks like there was a small mix-up between 237.5 KB and 23,700 bytes.
Since Glimmer’s hard rule is strictly under 30,000 bytes, a 243 KB binary unfortunately breaks the project’s core constraint. This kind of confirms what I was worried about from the start — the Windows PE format overhead and runtime baggage make it pretty much impossible to stay under 30 KB without some really extreme PE hacks.
That’s why Glimmer is staying strictly Linux ELF-native for now (24,824 bytes).
If Graham still wants to try the 243 KB Windows build just to check playing strength, that’s totally fine — but the real size-constrained achievement only exists on the Linux version.
Best regards,
taychoe
Posts: 19
Joined: Wed Jul 02, 2025 6:28 pm
Full name: Tay Choe

Re: [Release] Glimmer - A chess engine under 30,000 bytes (estimated 2700–2900 Elo)

Post by taychoe »

If you strip Jim's build, it goes down to 67072 bytes. You do strip the compile as shown in your makefile. I was able to build a 29696-byte exe using the makefile below. It goes down to 29184 bytes if I use -march=x86-64-v3.

Code: Select all

all:
    clang *.c -o glimmer10_x64_clang2218_llvm_ucrt_x86-64-v2 \
    -Oz -fno-asynchronous-unwind-tables -fno-unwind-tables \
    -fno-stack-protector -fno-ident -fomit-frame-pointer -fno-pie \
    -ffunction-sections -fdata-sections -s \
    -march=x86-64-v2
I used Jim's modified source in the compile.