Midge 0.2, a new open source NNUE engine (UCI, Windows and Linux)

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

Moderator: Ras

Hellothere
Posts: 4
Joined: Tue Nov 17, 2026 12:18 pm
Full name: Ryan Chen

Midge 0.2, a new open source NNUE engine (UCI, Windows and Linux)

Post by Hellothere »

Hi all,

I'd like to introduce Midge, a UCI chess engine I wrote from scratch in C++. Version 0.2 is the first public release, and I'd be grateful if CCRL, CEGT or any other testers would like to include it.

Download (Windows and Linux builds plus the network): https://github.com/rc397/mayfly-chess/r ... /midge-0.2
Source (GPL-3.0): https://github.com/rc397/mayfly-chess/tree/main/midge

What it is
- PVS alpha-beta search with a small NNUE network: 768x2 inputs, one 512 unit layer per side, squared clipped ReLU, 8 output buckets by piece count, int16 with SIMD.
- The code and the network structure are my own. No code or weights from any other engine.
- The network was trained with my own trainer on about 300 million positions from Leela Chess Zero self-play training games, labelled with Leela's own search value for each position (details in nets/NETS.md).
- UCI options: Threads, Hash, Ponder, MoveOverhead, EvalFile. Not supported yet: tablebases, MultiPV, Chess960.
- Builds: x86-64-v3 (AVX2 and BMI2) for Windows and Linux, plus a plain x86-64 Windows build for older CPUs. Keep midge_net.bin in the same folder as the executable.

My own tests (one thread each, Intel i7-12700H laptop)
- Critter 1.6a, 180 s + 3 s, 100 games from 50 openings played from both sides: +75 =21 -4, 85.5%, about +308 Elo (95% interval +243 to +397). No time losses.
- Stress tests with 1 to 64 threads and very short clocks (620 games): no time losses, no crashes, no illegal moves.

These are a few matches on one machine, not rating list numbers, which is exactly why I'd like to see it tested properly.

Midge has an older sibling, MayFly, a transformer engine with its own Lichess bot. Both are in the same repository.

Thanks,
Ryan
User avatar
Gabor Szots
Posts: 1631
Joined: Sat Jul 21, 2018 7:43 am
Location: Budapest, Hungary
Full name: Gabor Szots

Re: Midge 0.2, a new open source NNUE engine (UCI, Windows and Linux)

Post by Gabor Szots »

Hellothere wrote: ↑Wed Nov 18, 2026 11:40 am Hi all,

I'd like to introduce Midge, a UCI chess engine I wrote from scratch in C++. Version 0.2 is the first public release, and I'd be grateful if CCRL, CEGT or any other testers would like to include it.

Download (Windows and Linux builds plus the network): https://github.com/rc397/mayfly-chess/r ... /midge-0.2
Source (GPL-3.0): https://github.com/rc397/mayfly-chess/tree/main/midge

What it is
- PVS alpha-beta search with a small NNUE network: 768x2 inputs, one 512 unit layer per side, squared clipped ReLU, 8 output buckets by piece count, int16 with SIMD.
- The code and the network structure are my own. No code or weights from any other engine.
- The network was trained with my own trainer on about 300 million positions from Leela Chess Zero self-play training games, labelled with Leela's own search value for each position (details in nets/NETS.md).
- UCI options: Threads, Hash, Ponder, MoveOverhead, EvalFile. Not supported yet: tablebases, MultiPV, Chess960.
- Builds: x86-64-v3 (AVX2 and BMI2) for Windows and Linux, plus a plain x86-64 Windows build for older CPUs. Keep midge_net.bin in the same folder as the executable.

My own tests (one thread each, Intel i7-12700H laptop)
- Critter 1.6a, 180 s + 3 s, 100 games from 50 openings played from both sides: +75 =21 -4, 85.5%, about +308 Elo (95% interval +243 to +397). No time losses.
- Stress tests with 1 to 64 threads and very short clocks (620 games): no time losses, no crashes, no illegal moves.

These are a few matches on one machine, not rating list numbers, which is exactly why I'd like to see it tested properly.

Midge has an older sibling, MayFly, a transformer engine with its own Lichess bot. Both are in the same repository.

Thanks,
Ryan
Hi Ryan,

There is an option called Eval file whith a default value of none. What is it, does it have some future use? I gather it has nothing to do with midge_net, has it?
Gabor Szots
CCRL testing group