Regarding options ponder flag

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
User avatar
hgm
Posts: 22310
Joined: Fri Mar 10, 2006 9:06 am
Location: Amsterdam
Full name: H G Muller
Contact:

Re: Regarding options ponder flag

Post by hgm » Wed Dec 06, 2017 4:12 pm

Well, I think you should leave Ponder set for the entire game if it is a ponder game. Also during commands other than 'go ponder'. It informs the engine of whether future moves can be expected to use extra time over what is now on the clock, because they get ponder hits.

Worst defect of UCI is that there is o way to know whether the egine supports 'searchmoves' with the 'go' command.

elcabesa
Posts: 678
Joined: Sun May 23, 2010 11:32 am
Contact:

Re: Regarding options ponder flag

Post by elcabesa » Wed Dec 06, 2017 4:47 pm

as stated by hgm, simply send option ponder befor the start of the game, not before every go command :)

LocutusOfPenguin
Posts: 20
Joined: Thu Sep 28, 2017 4:52 pm
Location: Karlsruhe, Germany
Contact:

Re: Regarding options ponder flag

Post by LocutusOfPenguin » Wed Dec 06, 2017 4:50 pm

indeed.
i only put engines inside which supports all features of picochess incl. "alternative move" => searchmoves needed.
My beloved chess engine dev's are sometimes abit "behind" :roll: on implementing all uci features.

OK, now i know how to deal with this flag. Thanks again.
(forbit analysis on a non-ponder-flag engine was too hard - my problem)
Create a dedicated chess computer based on tiny ARM computers with the DGT e-board on www.picochess.com

Ras
Posts: 951
Joined: Tue Aug 30, 2016 6:19 pm
Contact:

Re: Regarding options ponder flag

Post by Ras » Wed Dec 06, 2017 5:28 pm

elcabesa wrote:Go infinite and go ponder are for different feature, but probably have similar result.
There is an important difference. From the UCI spec concerning the ponder move:
However, if the engine decides to ponder on a different move, it should not display any mainlines as they are likely to be misinterpreted by the GUI because the GUI expects the engine to ponder on the suggested move.
Consequence: using ponder for analysis runs the risk of suddenly not getting PVs anymore. Therefore, ponder should not be used for analysis.

Ras
Posts: 951
Joined: Tue Aug 30, 2016 6:19 pm
Contact:

Re: Regarding options ponder flag

Post by Ras » Wed Dec 06, 2017 5:35 pm

hgm wrote:Worst defect of UCI is that there is o way to know whether the egine supports 'searchmoves' with the 'go' command.
This isn't a UCI defect, but an engine defect because 'searchmoves' is not optional with UCI, and engines not implementing it are not UCI-conforming. Actually, they are not UCI engines.

For dealing with these engines, there is a workaround how you can determine whether 'searchmoves' is supported: send a position where some moves lead to being mated in 1 and other moves are fine. Then send searchmoves with only the self-mating moves allowed. If the engine returns a best move that is in the 'searchmoves' list, it supports this command, and otherwise, it doesn't.

Fulvio
Posts: 91
Joined: Fri Aug 12, 2016 6:43 pm

Re: Regarding options ponder flag

Post by Fulvio » Wed Dec 06, 2017 7:39 pm

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...

elcabesa
Posts: 678
Joined: Sun May 23, 2010 11:32 am
Contact:

Re: Regarding options ponder flag

Post by elcabesa » Wed Dec 06, 2017 8:14 pm

Fulvio wrote:
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

Fulvio
Posts: 91
Joined: Fri Aug 12, 2016 6:43 pm

Re: Regarding options ponder flag

Post by Fulvio » Wed Dec 06, 2017 8:34 pm

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?

elcabesa
Posts: 678
Joined: Sun May 23, 2010 11:32 am
Contact:

Re: Regarding options ponder flag

Post by elcabesa » Wed Dec 06, 2017 8:45 pm

Fulvio wrote:
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.

Fulvio
Posts: 91
Joined: Fri Aug 12, 2016 6:43 pm

Re: Regarding options ponder flag

Post by Fulvio » Wed Dec 06, 2017 8:58 pm

elcabesa wrote: 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?

Post Reply