Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: PV length ???

Author: Antonio Dieguez

Date: 09:43:02 10/26/02

Go up one level in this thread


On October 26, 2002 at 12:27:46, José Carlos wrote:

>On October 26, 2002 at 12:07:16, Antonio Dieguez wrote:
>
>>>>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.


>  I don't quite follow. He's talking about the null window searches after the
>pv. He's searching [alpha,alpha+1] so he might fail high with alpha+1 or
>alpha+500, and beta isn't useful here at all. All you know if you fail high is
>"I've found a move that seems to be better than my current pv".

I don't quite follow you... I think that is what we call fail-hard or fail-soft
alphabeta right? we can return a score greater than beta whenever the real score
if at least this score, and something like that with alpha if we don't force the
score to be at least alpha.

so one could even write

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

if (aux>alpha)
{
    if (aux>=beta)
    {....return aux }
    alpha=aux
...
}
etc.

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.