diff options
Diffstat (limited to 'src/chess.h')
| -rwxr-xr-x | src/chess.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/chess.h b/src/chess.h index 630f090..9b6303d 100755 --- a/src/chess.h +++ b/src/chess.h @@ -1652,6 +1652,18 @@ typedef struct _PIECE_DATA extern PIECE_DATA g_PieceData[8]; #define PIECE_VALUE_OVER_100(p) (g_PieceData[PIECE_TYPE(p)].uValueOver100) + +// _ScoreAllMoves / _ScoreQSearchMoves{InclChecks,NoChecks} (generate.c) bake +// a flat +120 move-ordering bias plus small MVV-LVA tie-break nudges into +// winning/even captures'/promotions' iValue -- harmless for sorting, but +// wrong once the value is used on the eval axis (compared against +// material-scale margins). Back it out to recover the pure SEE/ +// material-diff value. ComputeMoveScore() (searchsup.c) already does this; +// _ShouldWeConsiderThisMove() (search.c) reads iValue raw and needs it too. +#define MOVE_SCORE_ORDERING_BIAS(mv) \ + (PIECE_VALUE_OVER_100((mv).pCaptured) + 120 + \ + PIECE_VALUE_OVER_100((mv).pPromoted) - \ + PIECE_VALUE_OVER_100((mv).pMoved)) extern ULONG PieceValueOver100(PIECE p); |
