LocutusOfPenguin wrote:
Analyse im doing with "go infinite" Brain with "go ponder".
When pondering, are you sending 2 "go" for each move, right?
>> setoption name Ponder value true
>> ucinewgame
>> isready
wait for readyok
>> position startpos moves
>> go movetime 1000
after 1 second the engine replies:
<< bestmove d2d4 ponder d7d5
and immediately the GUI sends:
>> position startpos moves d2d4 d7d5
>> go ponder
When the user moves:
>> stop
wait for bestmove
>> ponderhit (if the user played the ponder move) or position
>> go movetime 1000
etc...
NO, it doesn't work this way
it work in the following way:
< messages from gui to engine
> messages from engine to gui
# my comments
# the game start and the gui ask the engineA to "go"
< position startpos moves e2e4 e7e5
< go wtime 50000 btime 50000
# the engineA start searching and printing his information, then after some time it print his best move and stop thinking:
> bestmove g1f3 ponder b8c6
#the gui make the engineB start thinking, and tell the engineA to ponder
< position startpos moves e2e4 e7e5 g1f3 b8c6
< go wtime 49900 btime 48700 ponder
# the engineA start poindering on the position specificed by the gui and print info about his search..
# now there are 2 possibility
# case A: the engineB play b8c6 by printing bestmove b8c6
# the gui send to the engine a the following comand:
< ponderhit
# now the engine know that he has searched the right move and he continue his search in a standard way, stopping when he want.
# the engineA eventually stop thinking and print his bestmove
> bestmove f1c4 ponder g8f6
# case b: the engineB play another move ,let's say it play g8f6
# in this case the gui send the stop command to the engine, which should not send his bestmove, setup the new position and send the go command
< stop
< position startpos moves e2e4 e7e5 g1f3 g8f6
< go wtime 49900 btimer 45000
# the engineA start the new search after a pondermiss
elcabesa wrote:
< position startpos moves e2e4 e7e5 g1f3 b8c6
< go wtime 49900 btime 48700 ponder
< ponderhit
< stop
< position startpos moves e2e4 e7e5 g1f3 g8f6
< go wtime 49900 btimer 45000
So your thesis is that in case of a ponderhit the engine do not have the rights to know the correct clock time?
I don't understand your question.
he know his clock time, the gui has alread sent it in the previous go command
go wtime 49900 btime 48700 ponder
the previous go message has the following meaning
1) start pondering
2) your time on the clock when the black player has finished his search willl be 49900
3) the time of black player when i sent him the go command is 48700, white doesn't know how much residual time black has when he'll receive ponderhit, but he can estimate it.
That's exactly my question.
If you are playing a 1 sec x move game on a network do you want him to estimate it?
Why can't we simply tell him the correct time?
Are you trying to penalize him because it guessed the correct move?
I don't want to penalize anyone, I'm just explaining the UCI protocol.
I was partially wrong, I read again the UCI protocol specification, and an engine MUST reply with a bestmove after EVERY stop command, even if he was pondering on a wrong move.
this is an example of a game between Vajolet and Ice using Cutechess as GUI.
Fulvio wrote:So your thesis is that in case of a ponderhit the engine do not have the rights to know the correct clock time?
Indeed. This definitely is a design flaw in UCI. You have to send it the opponent's clock time with the go-ponder command, when it is not yet known. (Of course your own time was known then, as your clock is not running during ponder.)
A sensible design would have had the clock times on the 'ponderhit' command.