Computer Chess Club Archives


Search

Terms

Messages

Subject: Changing alpha / beta based upon hash?

Author: Steve Maughan

Date: 09:37:07 12/30/00


In my program I have the following lines of code after the hash probe:

        if (CurrentHash.Bound = HASH_LOWERBOUND) then
        begin
          if (CurrentHash.Value >= Beta) then
          begin
            result := CurrentHash.Value;
            exit;
          end
          //increase the value of alpha if lower bound is greater
          else if CurrentHash.Value > Alpha then
          begin
            alpha := CurrentHash.Value;
            PVLength := Ply;
          end;
        end;
        if (CurrentHash.Bound = HASH_UPPERBOUND) then
        begin
          if (CurrentHash.Value <= Alpha) then
          begin
            result := CurrentHash.Value;
            exit;
          end
          //see if beta can be lowered
          else if CurrentHash.Value < Beta then
          begin
            Beta := CurrentHash.Value;
          end;
        end;

The bit that I'm not sure about and having problems with is the section that
adjusts the value of alpha and beta based upon the hash results.  I'm getting
odd PVs and different values returned when I activate this section.

Is it valid to raise the value of Alpha when the depth is sufficient and the
lowerbound is greater than Alpha?  What happens to the PV?  I'm just cutting it
off at the moment (i.e. PVLength := Ply).

Likewise, is it valid to lower beta based on an upperbound?  Again what happens
to the PV?  At the moment I'm doing nothing as I cannot see that it's logical to
cut it off.

All help and suggestions appreciated!

Regards,

Steve

BTW the code is written in Object Pascal / Delphi!



This page took 0.01 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.