4ku is an open source C++ engine designed to fit into 4,096 bytes. The recently released v1.0 has an approximate CCRL Blitz strength of 2600, and finished second in the TCEC S23 4K bonus match.
Source code, releases, and further information can be found at https://github.com/kz04px/4ku
4ku
Moderator: Ras
-
- Posts: 685
- Joined: Sat Jun 08, 2013 10:07 am
- Location: France
- Full name: Roland Chastain
Re: 4ku
Very very impressive! Congratulations.
How is it possible to make a 4k executable? It sounds incredible.
Compiled and tested successfully here (Mageia, GCC 10.4.0). Works with Cute Chess.
It's a pity that it doesn't support the go movetime xxx command, otherwise I would have included it in my chess GUI.
How is it possible to make a 4k executable? It sounds incredible.
Compiled and tested successfully here (Mageia, GCC 10.4.0). Works with Cute Chess.
It's a pity that it doesn't support the go movetime xxx command, otherwise I would have included it in my chess GUI.

-
- Posts: 379
- Joined: Sat Jun 13, 2015 10:08 am
- Location: Poland
- Full name: Dariusz Domagała
Re: 4ku
Unbelievable... so small in size and such power ?!
I will try to compile this engine for Mac and test it
I will try to compile this engine for Mac and test it

Regards, Darius
https://chessengeria.eu
https://chessengeria.eu
-
- Posts: 1265
- Joined: Sat Jul 05, 2014 7:54 am
- Location: Southwest USA
Re: 4ku
GediminasMasaitis wrote: ↑Wed Jan 04, 2023 12:55 am 4ku is an open source C++ engine designed to fit into 4,096 bytes. The recently released v1.0 has an approximate CCRL Blitz strength of 2600, and finished second in the TCEC S23 4K bonus match.
Source code, releases, and further information can be found at https://github.com/kz04px/4ku
Well Done!! Bravo!! Smaller Is Always Better in my Book!!



-
- Posts: 2701
- Joined: Tue Aug 30, 2016 8:19 pm
- Full name: Rasmus Althoff
Re: 4ku
It's not about 4k of executable code, but 4k of C++ source code. The "normal" 4ku version has 36.5k, but is well readable, and then that gets stripped and compressed with additional tools to produce unreadable source code that fits in the 4k limit, though also some UCI features get removed in the process.
But still, that's two highly impressive feats: 2600 Elo with only 36.5k of readable C++ code, and also compressing that to below 4k and still have it compile and play chess well.
Rasmus Althoff
https://www.ct800.net
https://www.ct800.net