Ras wrote: ↑Sun Jun 16, 2019 8:47 am
When I look at alouette.pas, the parser for the "go" command is not really implementing the UCI spec. The order of arguments is not specified, but you rely on it in utils.pas. Also, the case where wtime, btime, winc, binc AND movestogo is given seems to be missing.
I'd suggest that you do a WordPresent or so on every possible argument, and if it's present, get its position dynamically, and the following argument then must be the integer parameter. At the end, figure out which configuration it is.
Thank you for looking into
Alouette code. Well seen. Indeed these functions would need to be rewritten. Thank you for the idea.
Ras wrote: ↑Sun Jun 16, 2019 8:47 am
Also, the UCI parser doesn't contain the 'stop' command so that the engine can't possibly react to it. Yes, 'stop' needs to be evaluated while the engine is calculating its move. 'isready' the same. I'm not good enough at Pascal to see whether you're running the UCI parser and engine calculator in different threads so that the move calculation won't block the evaluation of UCI input.
Yes, that was the origin of the problem. I don't know why I imagined that the 'stop' command was only used in association with 'go infinite'.
I made a quick modification, to remember that I have to solve the problem:
Code: Select all
if LCmd = 'stop' then
begin
Ecrire('bestmove 1234');
end else
Cute Chess no longer sends 'connection stalls' message, but 'illegal move 1234'.
Yes, I have a separated thread for best move computation. So technically the engine is always able to answer to user commands, but in the current state of the program there is no provisional best move, to be returned when the 'stop' command is received. I have to think how I will make that.