Page 1 of 1

value > beta

Posted: Wed Jun 10, 2015 11:27 pm
by Robert Pope
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?

Re: value > beta

Posted: Thu Jun 11, 2015 12:03 am
by bob
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).

Re: value > beta

Posted: Thu Jun 11, 2015 3:07 am
by lucasart
CPW is really not an example to follow…

Re: value > beta

Posted: Thu Jun 11, 2015 4:44 am
by Robert Pope
Thanks, I had it right in my program, but whenever I see something different, I start to wonder.

Re: value > beta

Posted: Sat Jun 13, 2015 10:31 pm
by Sven
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.

Re: value > beta

Posted: Sat Jun 13, 2015 11:52 pm
by syzygy
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 ) {