mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Simplify Away Refutation Stage
Simplify away killer stage to a constant bonus given to the killer move during quiet move scoring. Passed Non-regression STC (Against then-pending PR #5472): LLR: 2.93 (-2.94,2.94) <-1.75,0.25> Total: 106176 W: 27685 L: 27539 D: 50952 Ptnml(0-2): 410, 12765, 26637, 12821, 455 https://tests.stockfishchess.org/tests/view/668dd0835034141ae5999e8f Passed Non-regression LTC: LLR: 2.95 (-2.94,2.94) <-1.75,0.25> Total: 92472 W: 23426 L: 23276 D: 45770 Ptnml(0-2): 55, 10376, 25215, 10544, 46 https://tests.stockfishchess.org/tests/view/669019e45034141ae5999fd2 closes https://github.com/official-stockfish/Stockfish/pull/5476 Bench 1459677
This commit is contained in:
parent
42aae5fe8b
commit
3df09c04d7
2 changed files with 11 additions and 20 deletions
|
@ -34,7 +34,6 @@ enum Stages {
|
|||
MAIN_TT,
|
||||
CAPTURE_INIT,
|
||||
GOOD_CAPTURE,
|
||||
KILLER,
|
||||
QUIET_INIT,
|
||||
GOOD_QUIET,
|
||||
BAD_CAPTURE,
|
||||
|
@ -97,7 +96,7 @@ MovePicker::MovePicker(const Position& p,
|
|||
continuationHistory(ch),
|
||||
pawnHistory(ph),
|
||||
ttMove(ttm),
|
||||
killer{km, 0},
|
||||
killer(km),
|
||||
depth(d) {
|
||||
assert(d > 0);
|
||||
|
||||
|
@ -184,6 +183,8 @@ void MovePicker::score() {
|
|||
m.value += (*continuationHistory[3])[pc][to];
|
||||
m.value += (*continuationHistory[5])[pc][to];
|
||||
|
||||
m.value += (m == killer) * 65536;
|
||||
|
||||
// bonus for checks
|
||||
m.value += bool(pos.check_squares(pt) & to) * 16384;
|
||||
|
||||
|
@ -270,16 +271,6 @@ top:
|
|||
++stage;
|
||||
[[fallthrough]];
|
||||
|
||||
case KILLER :
|
||||
// increment it before so if we aren't stuck here indefinitely
|
||||
++stage;
|
||||
|
||||
if (killer != ttMove && killer != Move::none() && !pos.capture_stage(killer)
|
||||
&& pos.pseudo_legal(killer))
|
||||
return killer;
|
||||
|
||||
[[fallthrough]];
|
||||
|
||||
case QUIET_INIT :
|
||||
if (!skipQuiets)
|
||||
{
|
||||
|
@ -294,7 +285,7 @@ top:
|
|||
[[fallthrough]];
|
||||
|
||||
case GOOD_QUIET :
|
||||
if (!skipQuiets && select<Next>([&]() { return *cur != killer; }))
|
||||
if (!skipQuiets && select<Next>([]() { return true; }))
|
||||
{
|
||||
if ((cur - 1)->value > -7998 || (cur - 1)->value <= quiet_threshold(depth))
|
||||
return *(cur - 1);
|
||||
|
@ -323,7 +314,7 @@ top:
|
|||
|
||||
case BAD_QUIET :
|
||||
if (!skipQuiets)
|
||||
return select<Next>([&]() { return *cur != killer; });
|
||||
return select<Next>([]() { return true; });
|
||||
|
||||
return Move::none();
|
||||
|
||||
|
|
|
@ -184,12 +184,12 @@ class MovePicker {
|
|||
const CapturePieceToHistory* captureHistory;
|
||||
const PieceToHistory** continuationHistory;
|
||||
const PawnHistory* pawnHistory;
|
||||
Move ttMove;
|
||||
ExtMove killer, *cur, *endMoves, *endBadCaptures, *beginBadQuiets, *endBadQuiets;
|
||||
int stage;
|
||||
int threshold;
|
||||
Depth depth;
|
||||
ExtMove moves[MAX_MOVES];
|
||||
Move ttMove, killer;
|
||||
ExtMove * cur, *endMoves, *endBadCaptures, *beginBadQuiets, *endBadQuiets;
|
||||
int stage;
|
||||
int threshold;
|
||||
Depth depth;
|
||||
ExtMove moves[MAX_MOVES];
|
||||
};
|
||||
|
||||
} // namespace Stockfish
|
||||
|
|
Loading…
Add table
Reference in a new issue