SnowballSH / Avalanche

UCI Chess Engine written in Zig.
MIT License
71 stars 4 forks source link

Avalanche v1.4.0 connection stalls #26

Closed tissatussa closed 1 year ago

tissatussa commented 1 year ago

playing in CuteChess (v1.3.0-beta4) GUI the newest compiled Avalanche v1.4.0 has an error :

avalanche-v1 4 0-connection-stalls

White just played Qh8+ and Black has only one move, but its connection stalled .. the last move 24.Qh8+ isn't even displayed by CuteChess !?

[ i'm on Xubuntu 22.04 ]

tissatussa commented 1 year ago

btw. sorry i posted this Issue several times .. i got a 500 error while submitting and tried again .. i closed those extra Issues now ..

tissatussa commented 1 year ago

and here's the ZIPped log file : CuteChess-GUI-log.zip

SnowballSH commented 1 year ago

It's alright! I haven't used cutechess for a while so thank you for the issue. I'll take a look when I get home. Do the compiled binaries in release work? I develop the engine on a Mac (aarch64) and I cross-compiled to other architectures. I haven't implemented a "bench"-like command so the current CI doesn't really test the engine either... so thanks a lot for the issue.

tissatussa commented 1 year ago

sorry, i mixed up : the error came while using your Avalanche-x86_64-linux-haswell-1.4.0.1 asset .. i'm not able to compile your ZIG code because i have 0.11.0-dev.3031+f40539e5d installed .. i remember in some other Issue you explained how to use a different ZIG version, but i didn't try yet ..

SnowballSH commented 1 year ago

Oh ok. New zig versions don't work because they migrated to a self-hosted compiler after 0.10. I will investigate the Linux binary as it seems the CCRL team ran the windows binaries fine. Thanks 👍

tissatussa commented 1 year ago

i often try to compile new versions of chess engines .. programmers use many languages .. ZIG is unknown to me, so i prefer to use a default ZIG version on my Linux installation .. same for Rust Nightly : i prefer a default Rust, otherwise i pick the asset binary (if available).

i guess this error is hard to reproduce .. my gut feeling : Avalanche gets 'confused' when having only 1 legal move.

SnowballSH commented 1 year ago

Hmm. Avalanche should search a very low depth if there is one legal move. Thanks for the insight.

tissatussa commented 1 year ago

another error : i just let the same Avalanche v1.4.0 NN play a second game with the same opponent :

avalanche-v1 4 0-illegal-move

here's the ZIPped log : CuteChess-GUI-log2.zip

White just played Qh5+ and this time Avalanche had more than one legal moves !?

btw. this game i set ponder ON

SnowballSH commented 1 year ago

Avalanche doesn't support pondering as of right now. Thanks for a second log. Will take a look when I get home.

tissatussa commented 1 year ago

Avalanche doesn't support pondering

nevermind, CuteChess will only use this setting when the engine can handle it.

SnowballSH commented 1 year ago

I cannot reproduce this on my mac. I inputted the same commands and it worked normally... I'll try again in a few days on my WSL.

tissatussa commented 1 year ago

I'm only using Linux .. these Issues came while using CuteChess v1.3.0-beta4 but i will use v1.2.0 (last stable) to test some more .. maybe this is the cause, i don't know .. until now i had no problems with the CuteChess beta version.

tissatussa commented 1 year ago

I also just discovered that Avalanche v1.4.0 is not working properly in SCID (v5.0.0) : the engine stops after depth 1 .. i encounter more engines fail to run in SCID .. it seems their UCI protocols don't match .. CuteChess has less such failures ..

SnowballSH commented 1 year ago

There is an issue with the UCI protocol for v1.4.0. I think it is fixed now. I'll release next version as soon as I finish threading.

tissatussa commented 1 year ago

Sounds good ! I guess it's hard / impossible to reproduce the error .. did my log files help ?

SnowballSH commented 1 year ago

They probably will once I get WSL working. Thanks.

tissatussa commented 1 year ago

i'm not familiar with WSL .. i just read it's "Windows Subsystem for Linux" .. OK, but what about the "issue with the UCI protocol" ? Do you think the errors are related to Linux ? I don't think so ..

SnowballSH commented 1 year ago

Haven't taken a look yet. I think the issue is fixed in the master branch. (It is unrelated to OS, just a bug in code) But thanks for all the logs.

SnowballSH commented 1 year ago

Hi, Can you try again with the latest release? I fixed a few communication issues and tested on Linux and windows. Sorry for the delay.

tissatussa commented 1 year ago

having ZIG v0.11.0 .. i just figured out how to use the older ZIG version v0.10.1, and now compiling of the newest cloned source went well : i get a v1.5.0 binary of 2.5 Mb and it runs fine CuteChess !

SnowballSH commented 1 year ago

Great to hear! Thanks for trying out my engine.