SnowballSH / Avalanche

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

Responding to isready during a search #17

Closed Tearth closed 2 years ago

Tearth commented 2 years ago

Hi, I'm using your engine as my regular sparring partner for Inanis - I really like it! One thing I've found: sometimes cutechess-cli prints a warning that Avalanche (1.1.0, latest version) is not responding to a ping, which is apparently because it doesn't respond "pong" when receiving "isready" command during a search. According to http://wbec-ridderkerk.nl/html/UCIProtocol.html:

  • isready this is used to synchronize the engine with the GUI. When the GUI has sent a command or multiple commands that can take some time to complete, this command can be used to wait for the engine to be ready again or to ping the engine to find out if it is still alive. E.g. this should be sent after setting the path to the tablebases as this can take some time. This command is also required once before the engine is asked to do any search to wait for the engine to finish initializing. This command must always be answered with "readyok" and can be sent also when the engine is calculating in which case the engine should also immediately answer with "readyok" without stopping the search.

That's almost exactly the same issue I had last time, it's very easy to omit by accident.

SnowballSH commented 2 years ago

Hi Tearth! Thank you for opening this issue. I wouldn't have started working on this engine if you haven't started Cosette or Inanis 😀 Thanks for pointing this mistake out -- I didn't read the website carefully... I'll fix it as soon as possible.

Tearth commented 2 years ago

Glad to hear, good luck with the further work!

SnowballSH commented 2 years ago

I think I just fixed it. :>

Tearth commented 2 years ago

Thanks!