Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Limit extensions

Author: Robert Hyatt

Date: 10:19:11 07/06/04

Go up one level in this thread


On July 06, 2004 at 12:30:48, Jeff GAZET wrote:

>Hi,
>
>i'm not sure about the way to limit extensions into the search tree.
>I think some code will be easier to understand than my english. Example :
>
>search(int depth,int alpha,int beta...)
>{
>int base_extended=0, extended;
>
>if(InCheck(side)) {depth++; base_extended+=ONEPLY;}
>
>foreach(move)
>   {
>   extended=0;
>
>   if(is_pawnn_push_7(move)) {depth++; extended+=ONEPLY;}
>   if(is_recapture(move)) {depth++; extended+=ONEPLY;}
>
>   if(extended>ONEPLY) {extended=ONEPLY;}
>   if(base_extended+extended>TWOPLY) {extended=0;}

With fractional extensions, I believe it works best like this:

extended=0;
if (something) extended+=ext1;
if (something_else) extended+=ext2;
...
etc.
...

extended=Max(extended,one_ply);

If you extend more than one ply you run the risk of reaching a position where
your search will be non-terminating.  Your code runs the risk of not extending
enough.  IE if your first extension is one ply and the last above is 1/2 ply, if
the 1/2 ply extension is triggered, that is all you will extend.  Add 'em up and
limit them to 1 ply total should be better...




>
>   domove()
>   score=-search(...);
>   undomove()
>
>   if(extended) {depth-=extended;}
>   }
>}
>
>Is that right ?
>
>Regards.



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.