Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Single-response extension

Author: Renze Steenhuisen

Date: 08:01:04 09/14/04

Go up one level in this thread


On September 14, 2004 at 10:35:37, Jeff GAZET wrote:

>Good morning,
Good late-afternoon,

>in the main search, before the moves loop, i have the basic "In Check" extension (which adds one ply).
>If there is only one legal move and the king is in check, this is interesting to
>extend one more ply. But i read that this is a bad idea to extend more than one
>ply, so i limit to one ply max.
>Then, "Single-response extension" is useless in this case :
>
>search(depth,alpha,beta)
>	{
>	int extend=0;
>	...
>	if(InCheck=incheck(side)) extend+=ONEPLY;
>	if(InCheck && side_has_only_one_legal_move) extend+=ONEPLY;
>
>	// limit extensions
>	if(extend>ONEPLY) extend=ONEPLY;
>
>	for(each move) {...}
>	...
>	}
>
>How is it possible to use both "Incheck" and "Single-response" extensions ?

Simply raise extend with all different extensions and call the search
recursively with "depth+LIMIT(extend)-1" where LIMIT simply returns MIN(1,
extend)

>Thanks.
You're welcome

Cheers!

Renze



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.