I implemented PVS and I already had a working TT. So I tried to get the two working together.
I tried to figure it out by myself but I'm still in trouble.
What I have:
- a PVS function
- a different PVS function for null-window search
If the search fails high in the null-window function, I set a L_BOUND in the TT.
If I search all the nodes in the null-window function, I set a U_BOUND.
If the search fails high in the PVS function, I set a L_BOUND.
...and, this one doesn't work: if I search through all the nodes in the PVS, I set a PRECISE_EVAL in the TT. If I only comment this one, everything works fine. If I don't comment it, the TT becomes corrupt.
Am I setting something wrong? Or am I using the resulting PRECISE_EVAL in the wrong way? If I get to a node and there's a PRECISE_EVAL with the sufficient depth, I return the TT score. Is this wrong?
PVS & Transposition tables
Moderator: Ras
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: PVS & Transposition tables
That's wrong. If you fail high in the null-move search, you are done and are fixing to return. So storing a L_BOUND entry is OK. But on the fail-low, you are _not_ done so why are you storing anything at all there???andretaff wrote:I implemented PVS and I already had a working TT. So I tried to get the two working together.
I tried to figure it out by myself but I'm still in trouble.
What I have:
- a PVS function
- a different PVS function for null-window search
If the search fails high in the null-window function, I set a L_BOUND in the TT.
If I search all the nodes in the null-window function, I set a U_BOUND.
That is also wrong. If you search all moves, and the best score is still <= alpha, then you store U_BOUND since this is an upper-bound on the search, not an exact value.
If the search fails high in the PVS function, I set a L_BOUND.
...and, this one doesn't work: if I search through all the nodes in the PVS, I set a PRECISE_EVAL in the TT. If I only comment this one, everything works fine. If I don't comment it, the TT becomes corrupt.
Am I setting something wrong? Or am I using the resulting PRECISE_EVAL in the wrong way? If I get to a node and there's a PRECISE_EVAL with the sufficient depth, I return the TT score. Is this wrong?
Re: PVS & Transposition tables
Bob, thank you for your answer.
Again, thanks for your assistance.
I think I wasn't clear. If I fail high in a null-window search, I store a L_BOUND, ok. But If I fail low in all nodes in a null-window search, I am done, right? Then I store that value as U_BOUND.bob wrote: That's wrong. If you fail high in the null-move search, you are done and are fixing to return. So storing a L_BOUND entry is OK. But on the fail-low, you are _not_ done so why are you storing anything at all there???
Hm... now I think I understand what's happening. But when do I store an exact value?That is also wrong. If you search all moves, and the best score is still <= alpha, then you store U_BOUND since this is an upper-bound on the search, not an exact value.
Again, thanks for your assistance.
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: PVS & Transposition tables
No. If you search and fail high on the null-move, you are going to return from this instance of search and not search anything else here. But if you do the complete null-move search without failing high, then you are not done. You now drop into the normal search. If you store a score with the current depth, that can break the search below this point.andretaff wrote:Bob, thank you for your answer.
I think I wasn't clear. If I fail high in a null-window search, I store a L_BOUND, ok. But If I fail low in all nodes in a null-window search, I am done, right? Then I store that value as U_BOUND.bob wrote: That's wrong. If you fail high in the null-move search, you are done and are fixing to return. So storing a L_BOUND entry is OK. But on the fail-low, you are _not_ done so why are you storing anything at all there???
Only when you (a) search all moves and (b) the best score is > alpha and < beta, which is _very_ infrequent if you are using PVS.Hm... now I think I understand what's happening. But when do I store an exact value?That is also wrong. If you search all moves, and the best score is still <= alpha, then you store U_BOUND since this is an upper-bound on the search, not an exact value.
Again, thanks for your assistance.