mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 01:29:36 +00:00
Retire EasyMoveMargin
Use a value related to PawnValue instead. This is a different patch from previous one because could affect game play and skill levels, although in a mostly unmeasurable way. Indeed thresold has been raised so easy move is a bit harder to trigger and skill level is a bit more prone to blunders. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
561eb34aea
commit
bd7a0d4ce4
1 changed files with 2 additions and 6 deletions
|
@ -88,10 +88,6 @@ namespace {
|
||||||
return (Depth) Reductions[PvNode][std::min(int(d) / ONE_PLY, 63)][std::min(mn, 63)];
|
return (Depth) Reductions[PvNode][std::min(int(d) / ONE_PLY, 63)][std::min(mn, 63)];
|
||||||
}
|
}
|
||||||
|
|
||||||
// Easy move margin. An easy move candidate must be at least this much better
|
|
||||||
// than the second best move.
|
|
||||||
const Value EasyMoveMargin = Value(0x150);
|
|
||||||
|
|
||||||
// This is the minimum interval in msec between two check_time() calls
|
// This is the minimum interval in msec between two check_time() calls
|
||||||
const int TimerResolution = 5;
|
const int TimerResolution = 5;
|
||||||
|
|
||||||
|
@ -450,7 +446,7 @@ namespace {
|
||||||
&& ( (bestMoveNeverChanged && pos.captured_piece_type())
|
&& ( (bestMoveNeverChanged && pos.captured_piece_type())
|
||||||
|| Time::now() - SearchTime > (TimeMgr.available_time() * 40) / 100))
|
|| Time::now() - SearchTime > (TimeMgr.available_time() * 40) / 100))
|
||||||
{
|
{
|
||||||
Value rBeta = bestValue - EasyMoveMargin;
|
Value rBeta = bestValue - 2 * PawnValueMg;
|
||||||
(ss+1)->excludedMove = RootMoves[0].pv[0];
|
(ss+1)->excludedMove = RootMoves[0].pv[0];
|
||||||
(ss+1)->skipNullMove = true;
|
(ss+1)->skipNullMove = true;
|
||||||
Value v = search<NonPV>(pos, ss+1, rBeta - 1, rBeta, (depth - 3) * ONE_PLY);
|
Value v = search<NonPV>(pos, ss+1, rBeta - 1, rBeta, (depth - 3) * ONE_PLY);
|
||||||
|
@ -1494,7 +1490,7 @@ split_point_start: // At split points actual search starts from here
|
||||||
int s = RootMoves[i].score;
|
int s = RootMoves[i].score;
|
||||||
|
|
||||||
// Don't allow crazy blunders even at very low skills
|
// Don't allow crazy blunders even at very low skills
|
||||||
if (i > 0 && RootMoves[i-1].score > s + EasyMoveMargin)
|
if (i > 0 && RootMoves[i-1].score > s + 2 * PawnValueMg)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
// This is our magic formula
|
// This is our magic formula
|
||||||
|
|
Loading…
Add table
Reference in a new issue