Author: Pham Hong Nguyen
Date: 19:22:28 08/29/04
Go up one level in this thread
On August 29, 2004 at 12:13:33, Rick Bischoff wrote:
>Hello,
>
>I think I am missing some core piece of knoweldge here-- Let me explain the
>situation.
>
>Let HASH_BAD = INFINITY = 16384
>Let MATE = 8000
>
>Stack Trace:
>
>0: call alphabeta(depth = 8, -HASH_BAD, HASH_BAD)
>1: alphabeta makes some move "m"
>2: alphabeta(depth = 7, -HASH_BAD, HASH_BAD) makes the null move
>2: alphabeta(depth = 4, -HASH_BAD, -HASH_BAD + 1)
>3: alphabeta continues drilling down the left most path of the tree.. so we
>eventually reach...
>
>
>x: alphabeta(depth = 0, -HASH_BAD, -HASH_BAD + 1) calls quiescent(-HASH_BAD,
>-HASH_BAD+1)
>
>Now quiescent does a static evaluation, finds that it is better than
>beta=-HASH_BAD+1 (how could it not be!) and returns beta... So we return to
>frame "x" of the stack trace and it stores -HASH_BAD+1 into the hash table.
>
>I assume this is a bad thing-- I have some debugging flags set so that the
>program halts if i try to store a value outside of (-MATE, MATE).
>
>What I am doing wrong?
No, you are just doing a strange thing and having a bug.
It is strange because you use larger boundaries for search functions than
commond values of [-MATE, +MATE] (I have used them well once, but then change to
usual ones for simpleness). You need to make sure that your alpha, beta are
quickly updated into the right range before they are used to return from these
functions. You also need to check if you mix up of use between MATE and INFINITY
in many places (say, hash value, null move).
I suggest that you check every return value from alphabeta and quiescent to make
sure that they are in the range of [-MATE, +MATE].
For example, an added line as following may help:
if (alpha<-MATE || alpha>+MATE) printf("Bug in function A, line 123\n");
return alpha;
Pham
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.