diff options
Diffstat (limited to 'src/searchsup.c')
| -rw-r--r-- | src/searchsup.c | 26 |
1 files changed, 25 insertions, 1 deletions
diff --git a/src/searchsup.c b/src/searchsup.c index 8d15e57..585bcc6 100644 --- a/src/searchsup.c +++ b/src/searchsup.c @@ -248,7 +248,7 @@ ComputeMoveScore(IN SEARCHER_THREAD_CONTEXT *ctx, ASSERT(uMoveNum < MAX_MOVE_STACK); ASSERT(IS_SAME_MOVE(mv, ctx->sMoveStack.mvf[uMoveNum].mv)); iMoveScore = ctx->sMoveStack.mvf[uMoveNum].iValue; - if (iMoveScore >= SORT_THESE_FIRST) + if ((iMoveScore >= SORT_THESE_FIRST) && IS_CAPTURE_OR_PROMOTION(mv)) { ASSERT(iMoveScore > 0); iMoveScore &= STRIP_OFF_FLAGS; @@ -270,6 +270,30 @@ ComputeMoveScore(IN SEARCHER_THREAD_CONTEXT *ctx, } else { + // All quiet moves (including killer/killer-mate quiet moves, + // which can reach SORT_THESE_FIRST or the killer-tier bits via + // generate.c's ordering bonuses with no relation to a move's + // real eval-axis value) collapse to 0 here -- correct, since + // this function's contract is "estimate the move's value on + // the 100=1-pawn axis," and a quiet move's ordering bonus + // carries no such estimate. + // + // FUTURE WORK: 0 is uniform across every quiet move, which + // throws away signal we plausibly have. Two candidate + // refinements, deliberately not implemented yet (each needs + // its own isolated A/B, not bundled together): + // 1. A small flat bonus (tested at +10: net wash, moved + // solves from confident_quick to hard_quick rather than + // a clear win/loss -- see RESULTS.md) for killer/ + // killer-mate moves, on the theory that a move which + // already caused a cutoff elsewhere in the tree is more + // likely to be good than an untested quiet shuffle. + // 2. eval.c square-delta scoring (e.g. PAWN_CENTRALITY_BONUS/ + // KNIGHT_CENTRALITY_BONUS[cTo]-[cFrom]) for a directional, + // if not strictly accurate, signal on ordinary quiet + // moves -- eval.c's real value is far more than per-square + // tables (mobility, king safety, pawn structure), so this + // would only ever be directionally suggestive, not exact. iMoveScore = MIN0(iMoveScore); } } |
