4ku

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

Moderator: Ras

GediminasMasaitis
Posts: 3
Joined: Wed Apr 14, 2021 3:53 pm
Full name: Gediminas Masaitis

4ku

Post by GediminasMasaitis »

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
User avatar
Roland Chastain
Posts: 685
Joined: Sat Jun 08, 2013 10:07 am
Location: France
Full name: Roland Chastain

Re: 4ku

Post by Roland Chastain »

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. :)
Qui trop embrasse mal étreint.

Author of Eschecs, a simple UCI chess GUI written in Pascal.
User avatar
Dariusz
Posts: 379
Joined: Sat Jun 13, 2015 10:08 am
Location: Poland
Full name: Dariusz Domagała

Re: 4ku

Post by Dariusz »

Unbelievable... so small in size and such power ?!
I will try to compile this engine for Mac and test it :wink:
Regards, Darius
https://chessengeria.eu
supersharp77
Posts: 1265
Joined: Sat Jul 05, 2014 7:54 am
Location: Southwest USA

Re: 4ku

Post by supersharp77 »

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!! :) 8-) :wink:
User avatar
Ras
Posts: 2701
Joined: Tue Aug 30, 2016 8:19 pm
Full name: Rasmus Althoff

Re: 4ku

Post by Ras »

Roland Chastain wrote: Wed Jan 04, 2023 6:43 pmHow is it possible to make a 4k executable?
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