kelseyde / calvin-chess-engine

A superhuman chess engine written in Java.
https://lichess.org/@/Calvin_Bot
13 stars 0 forks source link

small NN !? #153

Open tissatussa opened 1 month ago

tissatussa commented 1 month ago

i'm wondering : the .jar of Calvin v4.3.0 is only 580 Kb but it contains a NN !? How is this possible ? I know some other NN engines with small file size, but your .jar file beats them all ..

kelseyde commented 1 month ago

Hi!

I guess in comparison to other engines my net is very small (512 hidden layer neurons, no input or output buckets).

The main reason 4.3.0 is such a small jar though, is that I removed all external dependencies (before I was using Jackson for json parsing the config params, and Lombok for reducing boilerplate code). So the release is really just the application + the nnue file.

You can see that by comparing with 4.2.0, which was a whopping 7.5MB...

Anyway thanks for showing an interest in Calvin!

tissatussa commented 1 month ago

..the release is really just the application + the nnue file

so, i guess the NN will be around 400 Kb and that's impressive to reach 3200+ rating ! If ever a tournament will be arranged for NN engines below 1 Mb file size, Calvin will be at the top !

You can see that by comparing with 4.2.0, which was a whopping 7.5MB...

yes, that's the reason i created this Issue!

kelseyde commented 1 month ago

I didn't realise that Calvin was an outlier in that regard, interesting to know 😄

I guess it will change soon as I want to increase my NN size further, but I'm finding as the net grows it is getting prohibitively slow. Java can't really compete with all the C++/Rust engines when it comes to speed...

The strongest Java engine Serendipity has a huge net and is still hundreds of elo stronger than Calvin though, so there must be a way!