mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43: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,
|
MAIN_TT,
|
||||||
CAPTURE_INIT,
|
CAPTURE_INIT,
|
||||||
GOOD_CAPTURE,
|
GOOD_CAPTURE,
|
||||||
KILLER,
|
|
||||||
QUIET_INIT,
|
QUIET_INIT,
|
||||||
GOOD_QUIET,
|
GOOD_QUIET,
|
||||||
BAD_CAPTURE,
|
BAD_CAPTURE,
|
||||||
|
@ -97,7 +96,7 @@ MovePicker::MovePicker(const Position& p,
|
||||||
continuationHistory(ch),
|
continuationHistory(ch),
|
||||||
pawnHistory(ph),
|
pawnHistory(ph),
|
||||||
ttMove(ttm),
|
ttMove(ttm),
|
||||||
killer{km, 0},
|
killer(km),
|
||||||
depth(d) {
|
depth(d) {
|
||||||
assert(d > 0);
|
assert(d > 0);
|
||||||
|
|
||||||
|
@ -184,6 +183,8 @@ void MovePicker::score() {
|
||||||
m.value += (*continuationHistory[3])[pc][to];
|
m.value += (*continuationHistory[3])[pc][to];
|
||||||
m.value += (*continuationHistory[5])[pc][to];
|
m.value += (*continuationHistory[5])[pc][to];
|
||||||
|
|
||||||
|
m.value += (m == killer) * 65536;
|
||||||
|
|
||||||
// bonus for checks
|
// bonus for checks
|
||||||
m.value += bool(pos.check_squares(pt) & to) * 16384;
|
m.value += bool(pos.check_squares(pt) & to) * 16384;
|
||||||
|
|
||||||
|
@ -270,16 +271,6 @@ top:
|
||||||
++stage;
|
++stage;
|
||||||
[[fallthrough]];
|
[[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 :
|
case QUIET_INIT :
|
||||||
if (!skipQuiets)
|
if (!skipQuiets)
|
||||||
{
|
{
|
||||||
|
@ -294,7 +285,7 @@ top:
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
|
|
||||||
case GOOD_QUIET :
|
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))
|
if ((cur - 1)->value > -7998 || (cur - 1)->value <= quiet_threshold(depth))
|
||||||
return *(cur - 1);
|
return *(cur - 1);
|
||||||
|
@ -323,7 +314,7 @@ top:
|
||||||
|
|
||||||
case BAD_QUIET :
|
case BAD_QUIET :
|
||||||
if (!skipQuiets)
|
if (!skipQuiets)
|
||||||
return select<Next>([&]() { return *cur != killer; });
|
return select<Next>([]() { return true; });
|
||||||
|
|
||||||
return Move::none();
|
return Move::none();
|
||||||
|
|
||||||
|
|
|
@ -184,8 +184,8 @@ class MovePicker {
|
||||||
const CapturePieceToHistory* captureHistory;
|
const CapturePieceToHistory* captureHistory;
|
||||||
const PieceToHistory** continuationHistory;
|
const PieceToHistory** continuationHistory;
|
||||||
const PawnHistory* pawnHistory;
|
const PawnHistory* pawnHistory;
|
||||||
Move ttMove;
|
Move ttMove, killer;
|
||||||
ExtMove killer, *cur, *endMoves, *endBadCaptures, *beginBadQuiets, *endBadQuiets;
|
ExtMove * cur, *endMoves, *endBadCaptures, *beginBadQuiets, *endBadQuiets;
|
||||||
int stage;
|
int stage;
|
||||||
int threshold;
|
int threshold;
|
||||||
Depth depth;
|
Depth depth;
|
||||||
|
|
Loading…
Add table
Reference in a new issue