exact transposition table entries
Moderator: Ras
-
- Posts: 349
- Joined: Sat Aug 06, 2016 8:31 pm
- Location: United States
exact transposition table entries
My understanding is when an Exact type hash entry is found with adequate depth, it can be compared against beta to return a cutoff, and it can be compared with alpha to get a move and score. Shouldn't it also work to return alpha in the case that neither of those conditions is met? I tried this and it made my engine play much worse.
-
- Posts: 12721
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: exact transposition table entries
If it hasn't met adequate depth, then you may be doing a zero ply search instead of what you requested. That unintentional pruning is rather savage, wouldn't you admit?zenpawn wrote:My understanding is when an Exact type hash entry is found with adequate depth, it can be compared against beta to return a cutoff, and it can be compared with alpha to get a move and score. Shouldn't it also work to return alpha in the case that neither of those conditions is met? I tried this and it made my engine play much worse.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
-
- Posts: 2929
- Joined: Sat Jan 22, 2011 12:42 am
- Location: NL
Re: exact transposition table entries
If you have an exact entry of sufficient depth, you should be able to return the score regardless of alpha and beta (modified for fail hard/fail soft).
Only in the case where the score is a bound do you need to compare against alpha and beta. If you do not have sufficient depth you do not return regardless of bounds (you need to search).
Only in the case where the score is a bound do you need to compare against alpha and beta. If you do not have sufficient depth you do not return regardless of bounds (you need to search).
-
- Posts: 349
- Joined: Sat Aug 06, 2016 8:31 pm
- Location: United States
Re: exact transposition table entries
I'm referring to the case where I have an Exact type entry with sufficient depth. When both score >= beta and score > alpha are not met, it would seem I should then be able to return alpha.Dann Corbit wrote: If it hasn't met adequate depth, then you may be doing a zero ply search instead of what you requested. That unintentional pruning is rather savage, wouldn't you admit?
-
- Posts: 349
- Joined: Sat Aug 06, 2016 8:31 pm
- Location: United States
Re: exact transposition table entries
That's what I thought too. Since I use fail hard, I return beta if score >= beta, score if score > alpha, and to date have just fallen through and tried the move first otherwise. But, it occurred to me since it's an exact score of sufficient depth, I should know that it's already going to be worse than alpha and can save time by just returning alpha right there. Unfortunately, for some reason, this causes my engine to play much worse.Evert wrote:If you have an exact entry of sufficient depth, you should be able to return the score regardless of alpha and beta (modified for fail hard/fail soft).
Only in the case where the score is a bound do you need to compare against alpha and beta. If you do not have sufficient depth you do not return regardless of bounds (you need to search).
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: exact transposition table entries
Too complicated. When you get an EXACT match, you return that score as if the current search had been executed and that was the final best score. The cutoff stuff should happen after you return. EXACT means "no searching or decisions need to be made here, just return the score and we are done."zenpawn wrote:My understanding is when an Exact type hash entry is found with adequate depth, it can be compared against beta to return a cutoff, and it can be compared with alpha to get a move and score. Shouldn't it also work to return alpha in the case that neither of those conditions is met? I tried this and it made my engine play much worse.
-
- Posts: 349
- Joined: Sat Aug 06, 2016 8:31 pm
- Location: United States
Re: exact transposition table entries
I'm using fail hard though, not fail soft.bob wrote: Too complicated. When you get an EXACT match, you return that score as if the current search had been executed and that was the final best score. The cutoff stuff should happen after you return. EXACT means "no searching or decisions need to be made here, just return the score and we are done."
Edit: Just tested this way and got the same results as my test of returning alpha should the other two conditions fail, so apparently it's equivalent. Not sure why it plays so much worse when the alpha case is not allowed to fall through.