Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: PV length ???

Author: Antonio Dieguez

Date: 09:07:16 10/26/02

Go up one level in this thread


>>score = -alphabeta(board, -alpha-1, -alpha, depth-1);
>>
>>if(score > alpha && score < beta)
>                  ^^^^^^^^^^^^^^^
>
>  Don't use beta there. You just want to know you're above the pv score (which
>is alpha now).

if I am not mistaken it depends on the exact writing.

he can write

make...
score = -alphabeta(board, -alpha-1, -alpha, depth-1);
if(score > alpha && score < beta)
{
    unmake & make(depends on the program)
    score = -alphabeta(board, -beta, -alpha+1, depth-1);
}

unmake

if (score>alpha)
{
    blabla
    if (score>=beta)
    { update killer; update hash; etc. }
}

-------------------
or he can write something like this?

make
score = -alphabeta(board, -alpha-1, -alpha, depth-1);
if(score > alpha)
{
    if (score>=beta)
    { unmake; update killer; update hash; return beta; }
    unmake & make(depends on the program)
    score = -alphabeta(board, -beta, -alpha+1, depth-1);
    unmake
    if (score>alpha) // 'cause it could fail low right?
    {
        if (score>=beta)
        { update killer; update hash; return beta; }
        etc.
    }
}

I have written the first option, I think I can't make it prettier with the
second option or something else but may be you can write it better off corse.

Ah if the search always return alpha or beta then that can change things.


antonio's usefull post.



This page took 0.01 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.