I don't understand why this is so complicate.
If the engine finish early, it just have to do a blocking readline until it receives "stop":
Code: Select all
if infinite or ponder:
repeat:
line = readline
if line == "stop": break
if line == "ponderhit" AND NOT infinite: break;
if line == "isready": send "readyok"
send "bestmove"
Ignoring unknown tokens is a common method to allow future expansions without breaking compatibility (for example https://developers.google.com/protocol- ... 3#unknowns).syzygy wrote: ↑Tue Jan 03, 2023 3:11 am I agree that ignoring unknown/unexpected tokens in the "go" command (and in the other direction in the "info" command) makes sense, and most engines probably do this. A non-trivial question would be whether a "fixed" UCI spec should allow the GUI to add non-standard parameters to the "go" command. I would tend to say "no".
However the problem with UCI is that it uses a varible number of tokens (for example "infinite" is single, "depth" is composed of 2 tokens and "wdl" of 4 tokens). It is difficult to be sure that all the tokens of a new field would be correctly ignored.
In my opinion it is better to continue to use options like UCI_showWDL to advertise new capabilities.