value > beta

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Robert Pope
Posts: 523
Joined: Sat Mar 25, 2006 7:27 pm

value > beta

Post by Robert Pope » Wed Jun 10, 2015 9:27 pm

When adding transposition tables to my program, I was referencing some other codes for comparison. For beta cutoffs, Bruce Moreland's web page has
if (val >= beta) {
RecordHash(depth, beta, hashfBETA);
return beta;
}

But CPW uses
if ( val > beta ) {
tt_save(depth, beta, TT_BETA, bestmove);
info_pv( beta );
return beta;
}


This isn't fail-soft vs. fail-hard, is it? Is one of these clearly correct, and the other wrong, or is it dependent on something else?

bob
Posts: 20923
Joined: Mon Feb 27, 2006 6:30 pm
Location: Birmingham, AL

Re: value > beta

Post by bob » Wed Jun 10, 2015 10:03 pm

Robert Pope wrote:When adding transposition tables to my program, I was referencing some other codes for comparison. For beta cutoffs, Bruce Moreland's web page has
if (val >= beta) {
RecordHash(depth, beta, hashfBETA);
return beta;
}

But CPW uses
if ( val > beta ) {
tt_save(depth, beta, TT_BETA, bestmove);
info_pv( beta );
return beta;
}


This isn't fail-soft vs. fail-hard, is it? Is one of these clearly correct, and the other wrong, or is it dependent on something else?
>= is correct.

the > beta is not so good for PVS, since most of the time alpha/beta don't change (null-window search).

User avatar
lucasart
Posts: 3196
Joined: Mon May 31, 2010 11:29 am
Full name: lucasart
Contact:

Re: value > beta

Post by lucasart » Thu Jun 11, 2015 1:07 am

CPW is really not an example to follow…
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.

Robert Pope
Posts: 523
Joined: Sat Mar 25, 2006 7:27 pm

Re: value > beta

Post by Robert Pope » Thu Jun 11, 2015 2:44 am

Thanks, I had it right in my program, but whenever I see something different, I start to wonder.

Sven
Posts: 3966
Joined: Thu May 15, 2008 7:57 pm
Location: Berlin, Germany
Full name: Sven Schüle
Contact:

Re: value > beta

Post by Sven » Sat Jun 13, 2015 8:31 pm

Robert Pope wrote:When adding transposition tables to my program, I was referencing some other codes for comparison. For beta cutoffs, Bruce Moreland's web page has
if (val >= beta) {
RecordHash(depth, beta, hashfBETA);
return beta;
}

But CPW uses
if ( val > beta ) {
tt_save(depth, beta, TT_BETA, bestmove);
info_pv( beta );
return beta;
}


This isn't fail-soft vs. fail-hard, is it? Is one of these clearly correct, and the other wrong, or is it dependent on something else?
CPW has:

Code: Select all

if ( val > beta ) { // should be >=, see post
so the correction is already known there.

syzygy
Posts: 5000
Joined: Tue Feb 28, 2012 10:56 pm

Re: value > beta

Post by syzygy » Sat Jun 13, 2015 9:52 pm

Sven Schüle wrote:CPW has:

Code: Select all

if ( val > beta ) { // should be >=, see post
so the correction is already known there.
And these lines are in search_root(). The main Search() function correctly has:

Code: Select all

 if ( val >= beta ) {

Post Reply