1) Telepath searches on its time to say 20 ply and submits a move for play.
2) Telepath notes the 2nd move in the PV as the expected opponent move.
3) Telepath makes the expected ponder move on its internal board and starts a search for unlimited time until opponent moves.
4) The opponent makes a move:
4a) Ponder miss: Telepath effectively performs a takeback and then makes the opponents move and restarts the search as normal.
4b) Ponder Hit:
4b1) Not enough search (opponent quick move): Continue searching until satisfied.
4b2) Enough time: Make move.
(here I should test for failing low and possibly extend search).
Ok, so I don't see how this algorithm would come back with no move at all after a ponder hit as HGM states happens sometimes. Secondly, I don't see the need for a quick search to find a ponder move to ponder. In this case, the opponents choices (steps 1 & 2) have been considered at 19 ply, so a quick 5 ply search seems to be a waste.
Sometimes the search does not come back with a move, and then it also does not have a PV, and no ponder move. (Supposing you take the second move of the PV as a ponder move.) Whether that search itself was a ponder hit or not doesn't have anything to do with it.
This can for instance happen if the first iteration gives you a hash hit that is so deep that the next iteration can't even finish the search of the first move in time, before it is aborted.
hgm wrote:Sometimes the search does not come back with a move, and then it also does not have a PV, and no ponder move. (Supposing you take the second move of the PV as a ponder move.) Whether that search itself was a ponder hit or not doesn't have anything to do with it.
This can for instance happen if the first iteration gives you a hash hit that is so deep that the next iteration can't even finish the search of the first move in time, before it is aborted.
Ok, I see what you mean now. I don't do that in the primary search so that is not a problem for me. I've thought about that, but ruled it out.
I don't do LMR for the root. Given that, the search tree beneath the 3rd move (my intended response to the ponder move) is not the same when that position is at the root. That is why I ruled that out.
It is not so much a matter of LMR as of hash cutoffs. If your best move in the root leads to a 19-ply hash entry, and you cannot finish at least one move of the 20-ply search, you will only have a one-move PV, and no ponder move.
hgm wrote:Sometimes the search does not come back with a move, and then it also does not have a PV, and no ponder move. (Supposing you take the second move of the PV as a ponder move.) Whether that search itself was a ponder hit or not doesn't have anything to do with it.
This can for instance happen if the first iteration gives you a hash hit that is so deep that the next iteration can't even finish the search of the first move in time, before it is aborted.
Ok, I see what you mean now. I don't do that in the primary search so that is not a problem for me. I've thought about that, but ruled it out.
I don't do LMR for the root. Given that, the search tree beneath the 3rd move (my intended response to the ponder move) is not the same when that position is at the root. That is why I ruled that out.
I don't see this problem either. When I start a ponder search, I have a PV from the real search. I just trim the first two moves, and keep the rest. I start the ponder search at 1 ply shallower than the previous search (I already have the score for a 2-ply shallower search).
I can't start a search and get no PV back, because I have no way for a search to terminate without backing up the best move at the root, which can't be a hash hit since I don't probe at the root...
Seems like a whacky way of doing this if you really could do a search and get nada back...
hgm wrote:Sometimes the search does not come back with a move, and then it also does not have a PV, and no ponder move. (Supposing you take the second move of the PV as a ponder move.) Whether that search itself was a ponder hit or not doesn't have anything to do with it.
This can for instance happen if the first iteration gives you a hash hit that is so deep that the next iteration can't even finish the search of the first move in time, before it is aborted.
Ok, I see what you mean now. I don't do that in the primary search so that is not a problem for me. I've thought about that, but ruled it out.
I don't do LMR for the root. Given that, the search tree beneath the 3rd move (my intended response to the ponder move) is not the same when that position is at the root. That is why I ruled that out.
I don't see this problem either. When I start a ponder search, I have a PV from the real search. I just trim the first two moves, and keep the rest. I start the ponder search at 1 ply shallower than the previous search (I already have the score for a 2-ply shallower search).
I can't start a search and get no PV back, because I have no way for a search to terminate without backing up the best move at the root, which can't be a hash hit since I don't probe at the root...
Seems like a whacky way of doing this if you really could do a search and get nada back...
hgm wrote:It is not so much a matter of LMR as of hash cutoffs. If your best move in the root leads to a 19-ply hash entry, and you cannot finish at least one move of the 20-ply search, you will only have a one-move PV, and no ponder move.
I have three ways to get a ponder move in Crafty.
1. 2nd move from the PV, if there is one.
2. Probe the hash table. If no hit,
3. Do a short search for opponent to find a move to ponder
hgm wrote:It is not so much a matter of LMR as of hash cutoffs. If your best move in the root leads to a 19-ply hash entry, and you cannot finish at least one move of the 20-ply search, you will only have a one-move PV, and no ponder move.
I have three ways to get a ponder move in Crafty.
1. 2nd move from the PV, if there is one.
2. Probe the hash table. If no hit,
3. Do a short search for opponent to find a move to ponder
bob wrote:I can't start a search and get no PV back, because I have no way for a search to terminate without backing up the best move at the root, which can't be a hash hit since I don't probe at the root...
You can get a hash hit at the root PV daughter, if you probe there. Then your PV would only be one move long. (Unless you hash it, of course, but not many engines do.)
bob wrote:I can't start a search and get no PV back, because I have no way for a search to terminate without backing up the best move at the root, which can't be a hash hit since I don't probe at the root...
You can get a hash hit at the root PV daughter, if you probe there. Then your PV would only be one move long. (Unless you hash it, of course, but not many engines do.)
Please correct me if I'm wrong, as this is a bit of a corner case that involves clock management. But isn't it also possible to have a "PV" be only one move long because of a fail high? Then, because of severe time pressure, you make that move anyway because the search with a wider window hasn't finished yet and just hope for the best? At least, that's a possibility in my engine.
Of course, Bob's other ways of getting a move to ponder with will still apply here. So I'm just talking about the case of a one-move PV.