Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Bug-free fail soft must pass return_type

Author: Vasik Rajlich

Date: 02:54:02 06/19/05

Go up one level in this thread


On June 19, 2005 at 03:06:35, rasjid chan wrote:

>Vasik,
>
>How do you resolve this simplest of case:-
>We have:-
>1) absearch has a rep3 that FH with 0 > beta;
>2) Assume for the node below, all other moves also fail low.
>
>Now at the node after returning from rep3():-
>Consider code-block A.
>
> int absearch(int alpha, int beta){
>   int best, alpha0 = alpha;
>
>  score = -absearch();
>  //score== 0 from rep3
>
>  if (score>alpha){
>   alpha = score;
>   ...
>  }else if (alpha == alpha0){
>/*code-block A*/
>
>  //if we DO NOT pass down return_type, we do this:-
>   if (score>best)
>     best = score;
>   }
>
> If all other moves also fail low with score below 0, then
> best = 0; we finally return best(0) which is an error.
>
>  //if we PASS DOWN return_type, we do this:-
>   if (return_type == REP3)
>     best = alpha;
>   }

I don't understand the purpose of these four lines. If you just remove them,
you'll get the behavior you want.

> If all other moves also fail low with score < alpha , then
> best = alpha; we finally return best(alpha) which is CORRECT.
>

If you had removed those four lines above, then you would be returning best,
which is 0 - which is the correct fail-soft value.

> This is similar to the cases of forward-prunning, lazy evaluation, etc
> when we CANNOT fail low and soft at the same time.
>  }
>

It's not that you can't fail soft, it's that your fail-soft value won't be as
soft as you would like.

Let's do another crazy position :)

[D] rnb1kbnr/p1p2p1p/3p4/4p3/1pP1P1p1/2N2N2/PP1P1PPP/R1BQKB1R w KQkq - 0 1

Here, white is up a queen. Let's say that our alpha-beta window is 0.00. A very
likely continuation of the search will be 1. (null) bxc3 2. (null) gxf3 3. null
and white fails high with a score of around +3 (queen vs two pieces).

You're still failing soft here - just not as aggressively as you would like.

Vas

>
>   return ....
> }
>
>
> Have I mixed up darkness with the light.
>
> Best Regards
> Rasjid



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.