Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to compare the current_material with the root_material?

Author: Daniel Shawul

Date: 00:43:20 05/15/05

Go up one level in this thread


On May 14, 2005 at 18:34:42, Alvaro Jose Povoa Cardoso wrote:

>Hi,
>I want to compare the current material with the root material to see if I can
>make an extention or a reduction.
>Suppose that I have two variables: root_material wich is global, and
>current_material wich is local to the search() function.
>root_material is computed after making a move at the root and setting
>current_move(root ply) and before calling search().
>The root ply = 1.
>
>Now, I do I setup a current_material variable at the current ply so that I can
>compare the two?
>
>In search() wich is correct?
>
>int current_material, root_mat;
>makemove(wtm, ply)
>  current_material=ComputeMaterialScore(); root_mat=root_material;
>  if (wtm==0) {current_material=-current_material; root_mat=-root_mat};
>unmakemove(wtm, ply)
>
>   OR
>
>int current_material, root_mat;
>makemove(wtm, ply)
>  current_material=ComputeMaterialScore(); root_mat=root_material;
>  if ((ply & 1)==0) {current_material=-current_material; root_mat=-root_mat};
>unmakemove(wtm, ply)
>
>
>so that I can do:
>
>if (current_material < root_mat) {reduce depth};
>if (current_material > root_mat) {extend depth};
>
  the extension overlaps with null move. Null move
will immediatley give a cutoff if we are well ahead.
  And you better use some margin for the reduction
    if(current_material + MARGIN < root_mat)
           reduce;
daniel

>Best regards,
>Alvaro Cardoso



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.