Author: Sune Fischer
Date: 15:48:55 04/19/04
Go up one level in this thread
On April 19, 2004 at 18:25:59, Andrew Wagner wrote:
>Perhaps some pseudo code will help:
>
>Search(int LeafDistance, int alpha, int beta)
>.
>.
>.
>int HashFlag = HashFlagAlpha; //a constant
>if (ProbeHash(LeafDistance, alpha, beta, &hashscore, &hash_move))
>{
> return(hashscore);
>}
>
>.
>.
>.
>
>Gen_Moves();
>for (i = 0; i < NumMoves; i++)
>{
> Make_Move(move(i));
> val = -Search(LeafDistance -1, -beta, -alpha);
> takeback();
> if (val >= beta)
> {
> RecordHash(LeafDistance, beta, HashFlagBeta, move(i));
> return(beta);
> }
> if (val > alpha)
> {
> //Add move to PV
> alpha = val;
hashflag = HashFlagExact; // remember this one!
It would be buggy if you store exact scores as alpha entries.
> }
>}
>RecordHash(LeafDistance, alpha, hashflag, Nothing);
>return(alpha);
>
>
>So, Dr. Hyatt, what you're calling a LOWER flag is (I think) what I'm calling
>HashFlagBeta, and what you're calling UPPER, I call HashFlagAlpha, becuase those
>were the bounds that were exceeded. Personally, I hate this terminology...I wish
>we'd use more friendly terminology like AtLeastThisScore or LessThanThisScore.
Yes I think it is unfortunate with the upper meaning bad score and lower meaning
good score.
>I
>think when I rewrite Trueno I'm going to do that, now that I understand
>alphabeta a little better. But that's neither here nor there...how does this
>look? Andrew
Do that, but you still have to get used to the upper and lower stuff, it's too
much tradition.
-S.
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.