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?
value > beta
Moderators: hgm, Rebel, chrisw
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: value > beta
>= is correct.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?
the > beta is not so good for PVS, since most of the time alpha/beta don't change (null-window search).
-
- Posts: 3232
- Joined: Mon May 31, 2010 1:29 pm
- Full name: lucasart
Re: value > beta
CPW is really not an example to follow…
Theory and practice sometimes clash. And when that happens, theory loses. Every single time.
-
- Posts: 558
- Joined: Sat Mar 25, 2006 8:27 pm
Re: value > beta
Thanks, I had it right in my program, but whenever I see something different, I start to wonder.
-
- Posts: 4052
- Joined: Thu May 15, 2008 9:57 pm
- Location: Berlin, Germany
- Full name: Sven Schüle
Re: value > beta
CPW has: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?
Code: Select all
if ( val > beta ) { // should be >=, see post
-
- Posts: 5563
- Joined: Tue Feb 28, 2012 11:56 pm
Re: value > beta
And these lines are in search_root(). The main Search() function correctly has:Sven Schüle wrote:CPW has:so the correction is already known there.Code: Select all
if ( val > beta ) { // should be >=, see post
Code: Select all
if ( val >= beta ) {