It could hurt I think if the current search window is different from the previous search window. Modern engines don't use pure alpha-beta anymore. There are lots of heuristics relying on the value of the window, any change on the window may change the principal variation as well. I think that the result of the search with the current window is more accurate than the result of the previous iteration with a different window, therefore it would be better to continue the search with the current window than to do the cutoff. It's just my theory and I could be wrong.bob wrote:I hate to point this out, but it sounds like you have a bug if this weakens your program. What is a TT hit? The result from a previous search of this same position. I don't see how using that could hurt. I don't expect it to help a lot with PVS because so few nodes are searched with anything but a null-window, but I don't see any rational way it could hurt.Edsel Apostol wrote:It's a design trade-off. A simple solution for a bit of inefficiency.bob wrote:Yes, but your "fix" is not so good. You ignore any hash hit in the PV that would stop the search. Why throw out good information like that, it hurts efficiency?Edsel Apostol wrote:I think his problem is incomplete PV. He tried various ways to collect the PV (one of them is using the exact nodes from the main TT, others are triangular array, etc) but still fails to display the PV at it's full length from time to time. I'm suggesting ways on how it can be solved. That's what we've been doing in our engine and we don't have that truncated PV issue.bob wrote:Seemed to me he was describing a problem trying to construct the PV from the hash table. The above don't help that at all. Perhaps I misunderstood his question?Edsel Apostol wrote:You can try the following:
-don't do null move in the PV nodes
-don't do cutoff from the hash table in the PV nodes, just use the hash move
-store the principal variation to the hash table after every iteration in case the PV positions stored in it has been overwritten already
My solution uses all available information, and doesn't return short PVs either. There is no measurable overhead in my PV storing approach, and I don't give up any search efficiency by not honoring TT entries with sufficient depth, when at a PV node.
You can actually eliminate ALL search instability by throwing the TT out completely, or else just using it to store a best move, but no bound/score/draft, etc.
In my limited testing in our engine, returning exact score in PV nodes from hash table if it is outside the alpha and beta window makes it weaker. If I limit it to return exact score if it satisfies (score > alpha && score < beta), then it is at least at par with the one without the cut-offs. So performance-wise they are at par, with the disadvantage that the principal variation is broken at times.
I think the reason why it behaves that way is that with the new search window (previous iteration lets say is -20, 20, now lets say it's 0, 40) the search may stumble upon a better continuation, which wouldn't happen if it is being cut-off at PV nodes when an exact score from a different search window is encountered.
Of course, YMMV with Crafty. It may have more stable search than ours to take advantage of doing cut-offs in PV nodes.
I don't see how your example can happen, however. A true score is a "constant" for a position. Alpha/Beta guarantees to return the same score that a pure minimax search would return. Hashing can sometimes let you find a better move due to searching deeper via tree grafting, but it should not make you choose a worse move, that would be defective.
Anyways, I've checked the latest Crafty and it seems to return a hash hit for exact nodes even if the score is outside the current alpha/beta window? Have you tested to return a hash hit only if the exact score from hash table satisfies (score > alpha and score < beta)?