1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00
BadFish/src
Lucas Braesch e88ef801af Better document razoring
Use ralpha instead of rbeta

* rbeta is confusing people. It took THREE attempts to code razoring
at PV nodes correctly in a recent test, because of the rbeta trick.
Unnecessary tricks should be avoided.

* The more correct and self-documenting way of doing this, is to say
that we use a zero window around alpha-margin, not beta-margin.
The fact that, because we only do it at PV nodes, alpha happens to be
beta-1 and that the current stuff with rbeta works, may be correct,
but is confusing.

Remove the misleading and partially erroneous comment about returning
v + margin:

* comments should explain what the code does, not what it could have done.

* this comment is partially wrong in saying that v+margin is "logical",
  and that it is "surprising" that is doesn't work.

From a theoretical perspective, at least 3 ways of doing this are equally
defendable:

1/ fail hard: return alpha: The most conservative. We bet that the search
will fail low, but we don't know by how much and don't want to take risks.

2/ aggressive fail soft: return v (what the current code does). This
corresponds to normal fail soft, with the added assumption that we don't
care about the reduction effect (see below point 3/)

3/ conservative fail soft: return v + margin. If the reduced search (qsearch)
gives us a score <= v, we bet that the non reduced search will give us a
score <= v + margin.

* Saying that 2/ is "logical" implies that 1/ and 3/ are not, which is
arguably wrong. Besides, experimental results tell us that 2/ beats 3/,
and that's not something we can argue against: experimental results are
the only trusted metric.

* Also, with the benefit of hindsight, I don't think the fact that 2/ is
better than 3/ is surprising at all. The point is that it is YOUR turn to
move, and you are assuming that by NOT playing (and letting the opponent
capture your hanging pieces in QS) you cannot generally GAIN razor_margin(depth).

No functional change.
2014-02-03 21:37:14 +01:00
..
benchmark.cpp Assorted grammar fixes 2014-01-07 14:30:41 +09:00
bitbase.cpp Assorted grammar fixes 2014-01-07 14:30:41 +09:00
bitboard.cpp Update copyright year 2014-01-02 01:49:18 +01:00
bitboard.h Assorted grammar fixes 2014-01-07 14:30:41 +09:00
bitcount.h Update copyright year 2014-01-02 01:49:18 +01:00
book.cpp Assorted grammar fixes 2014-01-07 14:30:41 +09:00
book.h Update copyright year 2014-01-02 01:49:18 +01:00
endgame.cpp Simplify pawnless endgame evaluation 2014-01-18 17:22:54 +01:00
endgame.h Simplify pawnless endgame evaluation 2014-01-18 17:22:54 +01:00
evaluate.cpp Retire grain size code 2014-01-08 23:22:17 +09:00
evaluate.h Update copyright year 2014-01-02 01:49:18 +01:00
main.cpp Update copyright year 2014-01-02 01:49:18 +01:00
Makefile Do not set default value for architeture in Makefile 2014-01-25 11:29:32 +01:00
material.cpp Simplify pawnless endgame evaluation 2014-01-18 17:22:54 +01:00
material.h Update copyright year 2014-01-02 01:49:18 +01:00
misc.cpp Update copyright year 2014-01-02 01:49:18 +01:00
misc.h Update copyright year 2014-01-02 01:49:18 +01:00
movegen.cpp Update copyright year 2014-01-02 01:49:18 +01:00
movegen.h Update copyright year 2014-01-02 01:49:18 +01:00
movepick.cpp Grammar fix in MovePicker::next_move 2014-01-26 23:09:22 +01:00
movepick.h Introduce 'follow up' moves 2014-01-14 09:24:35 +01:00
notation.cpp Update copyright year 2014-01-02 01:49:18 +01:00
notation.h Update copyright year 2014-01-02 01:49:18 +01:00
pawns.cpp Ad-hoc shelter rule 2014-01-12 22:48:08 +01:00
pawns.h Update copyright year 2014-01-02 01:49:18 +01:00
platform.h Update copyright year 2014-01-02 01:49:18 +01:00
position.cpp Small simplification to Position::see 2014-01-19 11:16:34 +01:00
position.h Rename Position::hidden_checkers to check_blockers 2014-01-12 04:10:46 +09:00
psqtab.h H-file penalty and center bonus 2014-02-03 21:23:49 +01:00
rkiss.h Update copyright year 2014-01-02 01:49:18 +01:00
search.cpp Better document razoring 2014-02-03 21:37:14 +01:00
search.h Introduce 'follow up' moves 2014-01-14 09:24:35 +01:00
thread.cpp Update copyright year 2014-01-02 01:49:18 +01:00
thread.h Update copyright year 2014-01-02 01:49:18 +01:00
timeman.cpp Fix +M0 score when low on time 2014-01-19 11:09:44 +01:00
timeman.h Update copyright year 2014-01-02 01:49:18 +01:00
tt.cpp Increase max hash size to 16GB 2014-01-18 18:22:32 +01:00
tt.h Increase max hash size to 16GB 2014-01-18 18:22:32 +01:00
types.h Reduce VALUE_KNOWN_WIN to 10000 2014-01-27 20:09:51 +01:00
uci.cpp Update copyright year 2014-01-02 01:49:18 +01:00
ucioption.cpp Increase max hash size to 16GB 2014-01-18 18:22:32 +01:00
ucioption.h Update copyright year 2014-01-02 01:49:18 +01:00