Continue search on ponder hit
authorH.G.Muller <hgm@hgm-xboard.(none)>
Thu, 6 Mar 2014 16:43:19 +0000 (17:43 +0100)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Thu, 6 Mar 2014 23:11:17 +0000 (00:11 +0100)
commit21a60b5aae737b538480c4d8beee575b3d9a8e35
tree3f9925a0f528eb2eee77bf84e8d7fdba7042b4ed
parent3d8fafcd8eb7ca223e5b0db8d2f7df38eb28af83
Continue search on ponder hit

The usermove command is now examined during ponder search, commparing
the move with the hint move (stored in a new static variable for the
purpose). If there is a ponder hit, the ponder search, which was started
in BACKGROUND_MODE, is switched to FOREGROUND_MODE, and a ResponseTime
is calculated, so that it will pay attention to the clock, and play
a move once it times out. This is recognized by setting the hint-move
text to "hit", which then suppresses retraction of the hint move.
 The if-statement at the top of InputMove is now turned into a 'while',
so that a move produced after a ponder hit will immediately be followed
by pondering over the next move. A ponder miss (or non-move command)
will terminate this loop, through backlogging the command (as will
a failure to produce a hint move).
 The way the thinking time is calculated after a ponder hit might
have to be revised. For now SetTimeControl is called after a ponder hit
when the computer has zero moves left.
gnushogi/commondsp.c
gnushogi/gnushogi.h
gnushogi/search.c
gnushogi/tcontrl.c