Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: aspiration search question

Author: Daniel Shawul

Date: 02:22:41 05/13/04

Go up one level in this thread


On May 13, 2004 at 05:13:10, José Carlos wrote:

>On May 13, 2004 at 04:56:23, Daniel Shawul wrote:
>
>>On May 13, 2004 at 04:20:02, José Carlos wrote:
>>
>>>On May 13, 2004 at 03:35:00, Daniel Shawul wrote:
>>>
>>>>Hello
>>>>
>>>>My search is fail soft(i return the actual score)
>>>>when i fail high at the root i widen the window by 3 pawns (300).
>>>>
>>>>                 if(score<=r_alpha)
>>>>		 {
>>>>			  r_beta=r_alpha;
>>>>			  r_alpha=score-300; //r_alpha = -MATESCORE;
>>>>		 }
>>>>		 else if(score>=r_beta)
>>>>		 {
>>>>			  r_alpha=r_beta;
>>>>			  r_beta=score + 300; //r_beta = MATESCORE;
>>>>		 }
>>>>If the search fail's high at 1.75 score but the real score was 10
>>>>i get a score of 4.75 (1.75 + 3) in the next iteration. Why? my search is fail
>>>>soft and the score returned should be independent of beta. If i change the 200
>>>>to 300,score returned is 4.75??
>>
>>   a correction (1.75 + 2) = 3.75
>>
>>>
>>>  Are you sure you're doing fail soft? I mean, you need some extra logic, like
>>>starting off with -INFINITE in alpha nodes and increase the best score even in
>>>fail lows. You also need to make sure of returning true bounds in qsearch. Also,
>>>if you do some kind of forward prunning depeding on alpha and beta you won't be
>>>able to return true scores.
>>
>>  i do futility pruning and other purnings but i always return
>>   (score + margin) in all of the cases. Not alpha.
>>
>>for example in the following test position
>>        rnb2rk1/ppq2p1p/4p1p1/3pP1B1/3P1Q2/2b2N2/P1P2PPP/2RK1B1R w - - 8 14
>>
>> 1&         34   -0.31    0.05  1. Qxf7+?
>> 1          36   -0.10    0.05  1. Bd3
>> 2         138   -0.44    0.09  1. Bb5
>> 2         172   -0.24    0.09  1. Bf6
>> 3         447    0.10    0.14  1. Bf6 Qa5
>> 3         679    0.16    0.16  1. Bh6!
>> 3         781    0.18    0.16  1. Bh6 Rd8
>> 4        1899    0.15    0.20  1. Bh6 Rd8 2. Qf6 Nc6
>> 5        3778    0.47    0.27  1. Bh6 Re8 2. Qf6
>> 6       10330    0.71    0.33  1. Bh6 Rd8 2. Qf6
>> 7       26798    1.06    0.44  1. Bh6!
>> 7       86808    1.48    0.63  1. Bh6 Qe7 2. Bxf8 Qxf8 3. Qf6 Nd7
>> 8      208184    1.20    0.95  1. Bh6 Qe7 2. Bxf8 Qxf8 3. Bd3 Nd7
>>                                4. Ng5 Qg7
>> 9      684592    1.40    2.27  1. Bh6 Nd7 2. Ng5 a6 3. f3
>>10     3253930    1.42    9.00  1. Bh6 Qe7 2. Qe3 Qb4 3. Bxf8 Kxf8
>>                                4. Qh6+ Kg8 5. Bd3 f6
>>10     5270072    1.75   15.05  1. Bf6!
>>10    11120355    3.75   33.33  1. Bf6!     //here score is 1.75+2=3.75
>>                            //full window opened
>>10    32259429   12.82   87.59  1. Bf6 Qxe5 2. Nxe5 Nd7 3. Nxd7 Bd2
>>                                4. Kxd2 Bxd7 5. c4
>>11&   32784106   12.47   89.17  1. Bf6? Qxe5
>>
>>   if i change margin to 3,the result will be something like this
>>10    11120355    4.75   33.33  1. Bf6!
>>10    32259429   12.82   87.59  1. Bf6 Qxe5 2. Nxe5 Nd7 3. Nxd7 Bd2
>>                                4. Kxd2 Bxd7 5. c4
>>11&   32784106   12.47   89.17  1. Bf6? Qxe5
>>
>>   I am very very sure i don't return alpha/beta anywhere in my search.
>>I also tried turning off hashtable ,nullmove,iid etc but no success.
>>
>>best
>>daniel
>
>  I don't find the effect you present here any strange. I can be caused by many
>things:
>  - Null move: you can cutoff with a much lower score than true score cause you
>allow the opponent two moves in a row.
>  - Hashing: cutting off by a stored bound from a different depth
>  - Move ordering: if you search moves a, b and c with scores +1, +2, +10 you'll
>cutoff with beta <= +1 in the first move, with beta <= +2 in the second.
>  - Forward pruning: if score > beta + margin and (some conditions) return(beta
>+ margin) or return(beta)-not true score-.
>  - Lazy cutoffs
>  Etc...

    I do all of the things you said above but there is no return (alpha) or
return (beta) in my search. The search somehow converges to beta. What i store
in hashtables is score. Infact i tried turning off hashtable, null move ,  and
pruning techniques but it all comes back to beta.


>
>  If all of that is disabled, then make sure you have something like (simplified
>search, and also in qsearch):
>
>search(alpha,beta,depth)
>{
>  int best = -INFINITY; // Make sure you start with -INF, not with alpha
>  int score;
>
>  while(all moves)
>  {
>    score = -search();
>    if (score >= beta)
>      return(score);
>    if (score >= best)
>      best = score; // update this even when score <= alpha
>  }
>
>  return(best)
>}

    That is exactly what i do in my search.

>
>  José C.



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.