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
Midge 0.2, a new open source NNUE engine (UCI, Windows and Linux)
Moderator: Ras
-
Hellothere
- Posts: 6
- Joined: Tue Nov 17, 2026 12:18 pm
- Full name: Ryan Chen
-
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)
Hi Ryan,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
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
CCRL testing group
-
Hellothere
- Posts: 6
- Joined: Tue Nov 17, 2026 12:18 pm
- Full name: Ryan Chen
Re: Midge 0.2, a new open source NNUE engine (UCI, Windows and Linux)
Hi Gabor, thanks for taking a look!
EvalFile is only for loading a different network file. At startup Midge loads midge_net.bin from the executable's folder (or the working folder), and "<none>" just means it is using that one. So for testing, leave EvalFile at <none> and keep midge_net.bin next to the exe.
To be sure the net is in use: after "uci" the engine prints "info string net loaded". If it ever says "NOT loaded", the file wasn't found, and setting EvalFile to the full path of midge_net.bin fixes it (useful if a GUI starts engines from a different folder).
Ryan
EvalFile is only for loading a different network file. At startup Midge loads midge_net.bin from the executable's folder (or the working folder), and "<none>" just means it is using that one. So for testing, leave EvalFile at <none> and keep midge_net.bin next to the exe.
To be sure the net is in use: after "uci" the engine prints "info string net loaded". If it ever says "NOT loaded", the file wasn't found, and setting EvalFile to the full path of midge_net.bin fixes it (useful if a GUI starts engines from a different folder).
Ryan
-
madushan1996
- Posts: 13
- Joined: Sat Aug 08, 2026 3:08 am
- Location: Kurunegala, Sri Lanka
- Full name: Madushan Dissanayake
Re: Midge 0.2, a new open source NNUE engine (UCI, Windows and Linux)
I ran a 30 game short test agaist my engine(Which has an approx strength of 3600 elo under ccrl blitz scale) ,
In the first run , I only downloaded the binary file and ran the match and it scored 0 out of 10, then I saw the eval file was not embedded . So I downloaded the eval file and placed the both .exe file and .bin file in the same folder. Then ran this short 30 game match. I think its strength is around 3400 on ccrl blitz scale.
Midge 0.2 :- 7½
NARC Genesys 5.1 dev-repfix:- 22½
30 of 30 games
+2 =11 -17 for Midge 0.2
Elo difference: -191
95% CI: -316 to -99
Likelihood A is stronger: 0%
Score: 25.0%
Draw rate: 37%
Pairs: LL 4 · LD 7 · DD/WL 4 · WD 0 · WW 0
Elo by pairs: -191 (95% CI: -291 to -113)
1 min + 0.6 s
GM2700+.pgn (2.6 MB)
In the first run , I only downloaded the binary file and ran the match and it scored 0 out of 10, then I saw the eval file was not embedded . So I downloaded the eval file and placed the both .exe file and .bin file in the same folder. Then ran this short 30 game match. I think its strength is around 3400 on ccrl blitz scale.
Midge 0.2 :- 7½
NARC Genesys 5.1 dev-repfix:- 22½
30 of 30 games
+2 =11 -17 for Midge 0.2
Elo difference: -191
95% CI: -316 to -99
Likelihood A is stronger: 0%
Score: 25.0%
Draw rate: 37%
Pairs: LL 4 · LD 7 · DD/WL 4 · WD 0 · WW 0
Elo by pairs: -191 (95% CI: -291 to -113)
1 min + 0.6 s
GM2700+.pgn (2.6 MB)
-
Hellothere
- Posts: 6
- Joined: Tue Nov 17, 2026 12:18 pm
- Full name: Ryan Chen
Re: Midge 0.2, a new open source NNUE engine (UCI, Windows and Linux)
Thanks a lot for testing it, and for sharing the games. Thank you for finding the issue with the eval file not being embedded. The next build will have the net built into the exe and will say clearly if it is ever running without one.
The 30 games are a really useful reference point. If you ever run a longer match, I’d would like to see the result.
The 30 games are a really useful reference point. If you ever run a longer match, I’d would like to see the result.