hgm wrote:I don't think this has been sufficiently tested, and the ponder-hit statistics is misleading. There is always a fair number of 'easy moves' in a game, where there basically all alternatives are immediately losing. (E.g. recaptures.) Of course these will give you ponder hits. But usually the opponent also moves quickly on them, so the ponder hit gains you very little thinking time.
Note that in-between implementations are also possible. Shokidoki first ponders the position until a certain depth is reached (which can be reached immediately through a hash hit in the root), and then freezes the best move, so that the remaining ponder time is spent on that move only. This also solves the problem in situations where you do not have a ponder move (e.g. because the previous move was a 'single legal move' situation where you did not search at all, but just played the move).
Crafty is never without a ponder move. It has three options.
(1) ponder move from PV (normal case).
(2) if none, probe hash table and ponder best move returned.
(3) if that fails, switch sides, do what I call a "puzzling" search (puzzling over which move to ponder) for 1/10th the normal target time, and then switch back to the normal side and ponder that move.
The last option sounds similar to what you described. But given a choice, I'll take the PV move any time, since it has had more effort expended searching it (compared to 1/10th the normal time for (3) above)
BTW, Crafty has another option for pondering while still in book. In "tournament mode" I generate the root move list, which is the set of legal moves in this position. I then exclude any of those moves that are found with a book probe. From the remaining set, I again do the 1/10th normal time search to choose the best, then ponder that. I did this back in the days of Cray Blitz even, the idea being that if I play a move that takes my opponent out of book, in many cases his move is reasonably obvious. If his best move is a book move, I will have a reply instantly, already, so I try to find the best non-book move, and then ponder that, so that if he plays a non-book move there's a pretty good chance he will play the move I am pondering and I still move very quickly after he does.