Torom / BotLi

Lichess Bot
GNU Affero General Public License v3.0
45 stars 82 forks source link

Add NNUE Eval for fsf #39

Closed FatFritz2 closed 2 years ago

FatFritz2 commented 2 years ago

How do I add NNUE files in Dockerfile to make fairy stockfish stronger because its making too much blunders image And can it uses more than 1 eval file at once? Thank

Torom commented 2 years ago

Download the NNUEs from here: https://fairy-stockfish.github.io/nnue/#current-best-nnue-networks, put them next to the engine and adjust the uci_options of the variant engine accordingly: https://github.com/ianfab/Fairy-Stockfish/wiki/Settings#evalfile

FatFritz2 commented 2 years ago

Ok let me see what would happen Can I download multiple nnues and add it next to the engine and adjust uci_options? Because i am running the bot on Heroku

FatFritz2 commented 2 years ago

Does this work on Heroku i mean ?

Torom commented 2 years ago

I guess so, why don't you just give it a try?

FatFritz2 commented 2 years ago

Uh ok let me try one and if works i will report to u

FatFritz2 commented 2 years ago

Uh where should I place those NNUE files: Directly on BotLi or in engines folder???

Torom commented 2 years ago

Download the NNUEs from here: https://fairy-stockfish.github.io/nnue/#current-best-nnue-networks, put them next to the engine and adjust the uci_options of the variant engine accordingly: https://github.com/ianfab/Fairy-Stockfish/wiki/Settings#evalfile

So in the engines folder.

FatFritz2 commented 2 years ago

Oh thanks, I see no engines right there so is it fine to put it there?

FatFritz2 commented 2 years ago

What I can't add those files. Its way too heavy

Torom commented 2 years ago

I originally meant that you download the NNUEs in the Dockerfile. But you can also upload them to your repo.

FatFritz2 commented 2 years ago

I can't upload it . Cuz its way too Heavy. Github does not allow me to upload all those files :(

Torom commented 2 years ago

Add this to your Dockerfile:

RUN wget "https://drive.google.com/u/0/uc?id=1r5o5jboZRqND8picxuAbA0VXXMJM1HuS&export=download" -O engines/3check-313cc226a173.nnue

RUN wget "https://drive.google.com/u/0/uc?id=1SBLSmQmfrsxFHa3ntAhfYXyL3CoVSSL2&export=download" -O engines/antichess-689c016df8e0.nnue

RUN wget "https://drive.google.com/u/0/uc?id=14CYA7qV1Jsh5g-lpg46-tz9Whp8zN0aI&export=download" -O engines/atomic-e801e22d2c32.nnue

RUN wget "https://drive.google.com/u/0/uc?id=168vawXrj2fEeRSLuWaL2pB7GXgQelE-c&export=download" -O engines/crazyhouse-be2e41920378.nnue

RUN wget "https://drive.google.com/u/0/uc?id=16BQztGqFIS1n_dYtmdfFVE2EexF-KagX&export=download" -O engines/horde-28173ddccabe.nnue

RUN wget "https://drive.google.com/u/0/uc?id=1x25r_1PgB5XqttkfR494M4rseiIm0BAV&export=download" -O engines/kingofthehill-978b86d0e6a4.nnue

RUN wget "https://drive.google.com/u/0/uc?id=1Tiq8FqSu7eiekE2iaWQzSdJPg-mhvLzJ&export=download" -O engines/racingkings-636b95f085e3.nnue

And this to your uci_options of the variant engine:

EvalFile: "3check-313cc226a173.nnue:antichess-689c016df8e0.nnue:atomic-e801e22d2c32.nnue:crazyhouse-be2e41920378.nnue:horde-28173ddccabe.nnue:kingofthehill-978b86d0e6a4.nnue:racingkings-636b95f085e3.nnue"
FatFritz2 commented 2 years ago

Thanks A lot

FatFritz2 commented 2 years ago

OMG YAY IT WORKS THANKS A LOT I guess my bot would be much better now

FatFritz2 commented 2 years ago

Btw after adding,Heroku stated those lines: 2022-08-05T17:08:18.050083+00:00 heroku[worker.1]: Process running mem=538M(105.1%) 2022-08-05T17:08:18.051817+00:00 heroku[worker.1]: Error R14 (Memory quota exceeded) 2022-08-05T17:08:38.162694+00:00 heroku[worker.1]: Process running mem=538M(105.2%) 2022-08-05T17:08:38.164575+00:00 heroku[worker.1]: Error R14 (Memory quota exceeded) 2022-08-05T17:08:59.517992+00:00 heroku[worker.1]: Process running mem=539M(105.4%) 2022-08-05T17:08:59.526197+00:00 heroku[worker.1]: Error R14 (Memory quota exceeded) And can I ask u can I add multiple NNUE files for stockfish and do i need to use Use NNUE: true for fsf?

Torom commented 2 years ago

That is interesting, probably fairy-stockfish loads all NNUEs at once, and that is then too much for Heroku. You can reduce the Hash of fairy-stockfish even more, with the few nps it doesn't need much hash, I'm sure 128 are enough too.

FatFritz2 commented 2 years ago

Oh let me see then

FatFritz2 commented 2 years ago

Do I need to use Use NNUE: true function?

Torom commented 2 years ago

No, True is the default.

FatFritz2 commented 2 years ago

Ah ok I got it now thanks

FatFritz2 commented 2 years ago

Btw, can you help me figuring nnue files with the stockfish build pls

Torom commented 2 years ago

Btw, can you help me figuring nnue files with the stockfish build pls

No.

FatFritz2 commented 2 years ago

oh fine anyway thanks for helping me have a good night :D