Search found 12 matches

by Miyagi403
Fri Feb 24, 2012 4:22 am
Forum: Programming and Technical Discussions
Topic: Using a Transposition Table with Zobrist Keys
Replies: 29
Views: 16339

Re: Using a Transposition Table with Zobrist Keys

Just to make sure I'm being clear, I'm using a single alpha-beta function

int alphabeta(int alpha, int beta, int depth)
{

// TT Retrieval

for (all moves)
{
score = -alphabeta (-beta, -alpha, depth -1);

if (score > alpha)
alpha = score;
if (alpha >= beta)
return alpha;
}

// TT Storage ...
by Miyagi403
Fri Feb 24, 2012 3:58 am
Forum: Programming and Technical Discussions
Topic: Using a Transposition Table with Zobrist Keys
Replies: 29
Views: 16339

Re: Using a Transposition Table with Zobrist Keys

and, in the case of UPPER, if you cannot fail-low and return alpha right then and there, do you adjust alpha or beta to the entry value?

and, in the case of LOWER, if you cannot fail-high and return beta right then and there, do you adjust alpha or beta to the entry value?
by Miyagi403
Fri Feb 24, 2012 3:51 am
Forum: Programming and Technical Discussions
Topic: Using a Transposition Table with Zobrist Keys
Replies: 29
Views: 16339

Re: Using a Transposition Table with Zobrist Keys

Hey everyone,

I have been coding for a long time now, trying different versions of alphabeta with a TT, and am close to being done. I'm still a little confused about one thing:

If you are at a root node, and you retrieve an UPPER bound from the TT, and if you find that
"UPPER BOUND FROM TABLE ...
by Miyagi403
Wed Feb 22, 2012 10:28 pm
Forum: Programming and Technical Discussions
Topic: Using a Transposition Table with Zobrist Keys
Replies: 29
Views: 16339

Re: Using a Transposition Table with Zobrist Keys

hyatt wrote: All 3 get done at the same exact place, namely at the TOP of search, before you do any searching at all, even before you try null-move search...
I thought you wrote earlier that you do it when you are ready to return a value. But now you're saying before you begin searching? Confused.
by Miyagi403
Wed Feb 22, 2012 2:07 pm
Forum: Programming and Technical Discussions
Topic: Using a Transposition Table with Zobrist Keys
Replies: 29
Views: 16339

Re: Using a Transposition Table with Zobrist Keys

Cool got it. As for hash table additions, I know when to do the UPPER and LOWER ones (alpha and beta cutoffs), but for the EXACT, do I do it where I have it right now (when a < score < b) or when I return a value, i.e. at the end of the function. I would assume the latter, and I'm going to try that ...
by Miyagi403
Wed Feb 22, 2012 6:11 am
Forum: Programming and Technical Discussions
Topic: Using a Transposition Table with Zobrist Keys
Replies: 29
Views: 16339

Re: Using a Transposition Table with Zobrist Keys

Every time I think I understand, I realize I'm still kind of confused. Below is the code which should be the final draft. I have kept it in 2-function form, just because I've gotten used to it, and is easier for me to understand while I learn how to include the TT in it. I have also again attached ...
by Miyagi403
Wed Feb 22, 2012 4:11 am
Forum: Programming and Technical Discussions
Topic: Using a Transposition Table with Zobrist Keys
Replies: 29
Views: 16339

Re: Using a Transposition Table with Zobrist Keys

I think I get it. If i get an EXACT value for a node from the TT, then I can use that value as the score for that node, and do the two checks:

1) beta cutoff for alphabetamax(), which is v >= beta OR
alpha cutoff for alphabetamin(), which is v <= alpha
2) alpha < v < beta for both alphabetamax ...
by Miyagi403
Wed Feb 22, 2012 12:04 am
Forum: Programming and Technical Discussions
Topic: Using a Transposition Table with Zobrist Keys
Replies: 29
Views: 16339

Re: Using a Transposition Table with Zobrist Keys

I just don't see how we can return from an EXACT case, because we know the retrieved value is between the current alpha and beta values (we tested that), but what about the rest of the moves that are siblings (same parent) to that move? What if we might find a value that is better than that value ...
by Miyagi403
Tue Feb 21, 2012 11:05 pm
Forum: Programming and Technical Discussions
Topic: Using a Transposition Table with Zobrist Keys
Replies: 29
Views: 16339

Re: Using a Transposition Table with Zobrist Keys

So I read your reply, and have been trying to write some C++ like code to make sure I have the correct structure and algorithm for storing/retrieving entries, and what to do in all of the cases.

I wrote a few comments which say "Should I return here?" during the EXACT case, because I'm still not ...
by Miyagi403
Tue Feb 21, 2012 6:52 pm
Forum: Programming and Technical Discussions
Topic: Using a Transposition Table with Zobrist Keys
Replies: 29
Views: 16339

Re: Using a Transposition Table with Zobrist Keys

But if I am correct about just checking to make sure the node types are the same, how would you know the node you are about to search is a PV, Cut, or All node unless you actually searched it. Or am I just not understanding something basic?