Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Single Reply Extension

Author: martin fierz

Date: 03:00:21 09/20/04

Go up one level in this thread


On September 20, 2004 at 05:28:54, Renze Steenhuisen wrote:

>Hi all,
>
>I have to confess that this is a very said thing, but I have to ask...
>
>My moveGen() generates pseudo-legal moves, in a similar way as is done in
>Crafty. I want to add the single-reply extension (of course), but I find it hard
>to grasp how to do this efficiently (because I might need to generate more moves
>than needed, right?)
>
>Or someone could please explain in words what is done in Crafty:
>
>        if (tree->in_check[ply] && tree->last[ply]-tree->last[ply-1] == 1) {
>          tree->one_reply_extensions_done++;
>          extended+=onerep_depth;
>        }
>
>What is this "tree->last[]" thing doing exactly?
>
>Thanks!
>
>  Renze

i never studied the crafty code very thoroughly so i might be wrong. i think
tree->last[ply] is the move stack pointer, which means that if the condition
tree->last[ply] - tree->last[ply-1] == 1
is true, there is exactly one move at ply. so basically this doesn't answer your
question how to do it efficiently - it's just part of crafty's housekeeping that
bob is using here. the (efficient) generation of the check evasions is being
done somewhere else (and i have no idea where!)

cheers
  martin



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.