Code: Select all
go home
Deuterium:
Code: Select all
go home
info string unknown command go home
Moderators: hgm, Rebel, chrisw
Code: Select all
go home
Code: Select all
go home
info string unknown command go home
I love this one !Ferdy wrote: ↑Mon Jan 18, 2021 5:04 pm An innocent user accidentally sends the command,How does your engine replies to it.Code: Select all
go home
Deuterium:Code: Select all
go home info string unknown command go home
Code: Select all
[...]
uciok
go home
info string Info 2021-01-18 17:58:59-643: Received command : go home
info string Info 2021-01-18 17:58:59-643: uci received command go
info string Info 2021-01-18 17:58:59-643: received parameter home
info string home not implemented
info string Warn 2021-01-18 17:58:59-643: no parameters given for go command, going for a depth 10 search ...
[...]
The specs say this:Ferdy wrote: ↑Mon Jan 18, 2021 5:04 pm An innocent user accidentally sends the command,How does your engine replies to it.Code: Select all
go home
Deuterium:Code: Select all
go home info string unknown command go home
It's exactly what my engine does.* if the engine or the GUI receives an unknown command or token it should just ignore it and try to
parse the rest of the string.
* if the engine receives a command which is not supposed to come, for example "stop" when the engine is
not calculating, it should also just ignore it.
Don't forget your engine is in uci protocol, it is not in CECPxr_a_y wrote: ↑Mon Jan 18, 2021 5:59 pmI love this one !Ferdy wrote: ↑Mon Jan 18, 2021 5:04 pm An innocent user accidentally sends the command,How does your engine replies to it.Code: Select all
go home
Deuterium:Code: Select all
go home info string unknown command go home
Here is Minic's answer
Code: Select all
[...] uciok go home info string Info 2021-01-18 17:58:59-643: Received command : go home info string Info 2021-01-18 17:58:59-643: uci received command go info string Info 2021-01-18 17:58:59-643: received parameter home info string home not implemented info string Warn 2021-01-18 17:58:59-643: no parameters given for go command, going for a depth 10 search ... [...]
Indeed, thanks for the warning, i'll try to make things safer.hgm wrote: ↑Tue Jan 19, 2021 10:10 am That is a risky implementation, which only works if you are sure that you do recognize every CECP command as valid. Otherwise you could get spurious Illegal move error messages when you receive a command you did not bother to implement. And that would wreck things, as the GUI would take back the latest move on reception of that error message, so that engine and GUI would be out of phase from that point on.
Saver is to consider only tokens of which the second character is a digit or @ sign as moves, and the rest as commands.