diff options
| author | Scott Gasch <[email protected]> | 2026-09-20 08:13:57 -0700 |
|---|---|---|
| committer | Scott Gasch <[email protected]> | 2026-09-20 08:13:57 -0700 |
| commit | 8c0d66f13f08cb5e760d787a878260ad67d17c13 (patch) | |
| tree | f779fb622a18e0d676da76736d9826ddda5dfdb9 /src/recogn.c | |
| parent | b70be6fde0fef0694e404e16d70f00c73dd971a2 (diff) | |
Makes recogn.c use g_iDrawScore. Some refactoring in the pawn
hash / _EvalPawn including some scoring changes. Self-play
positive.
Diffstat (limited to 'src/recogn.c')
| -rw-r--r-- | src/recogn.c | 27 |
1 files changed, 11 insertions, 16 deletions
diff --git a/src/recogn.c b/src/recogn.c index c573f8f..7b7ba84 100644 --- a/src/recogn.c +++ b/src/recogn.c @@ -88,10 +88,7 @@ Return value: return(x); } - #ifdef DEBUG - - static FLAG _TablebasesSaySideWins(IN SEARCHER_THREAD_CONTEXT *ctx, IN ULONG uSide) @@ -136,7 +133,6 @@ _TablebasesSayDrawOrWin(IN SEARCHER_THREAD_CONTEXT *ctx, return TRUE; } - static FLAG _SanityCheckRecognizers(IN SEARCHER_THREAD_CONTEXT *ctx, IN SCORE iScore, @@ -210,7 +206,6 @@ Parameters: Return value: - #ifdef DEBUG static FLAG **/ @@ -254,7 +249,7 @@ Return value: **/ { - *piScore = 0; + *piScore = g_iDrawScore[ctx->sPosition.uToMove]; return(RECOGN_EXACT); } @@ -300,7 +295,7 @@ Return value: if ((CORNER_DISTANCE(KingPosition(pos, WHITE)) != 0) && (CORNER_DISTANCE(KingPosition(pos, BLACK)) != 0)) { - *piScore = 0; + *piScore = g_iDrawScore[pos->uToMove]; return(RECOGN_EXACT); } } @@ -335,7 +330,7 @@ Return value: (WhiteSqBishopCount(pos, uStrong) == 0) || (WhiteSqBishopCount(pos, uStrong) == uBishops)) { - *piScore = 0; + *piScore = g_iDrawScore[pos->uToMove]; return(RECOGN_EXACT); } @@ -441,7 +436,7 @@ Return value: if ((CORNER_DISTANCE(KingPosition(pos, WHITE)) != 0) && (CORNER_DISTANCE(KingPosition(pos, BLACK)) != 0)) { - *piScore = 0; + *piScore = g_iDrawScore[pos->uToMove]; return(RECOGN_EXACT); } return(UNRECOGNIZED); @@ -478,7 +473,7 @@ Return value: { return(UNRECOGNIZED); } - *piScore = 0; + *piScore = g_iDrawScore[pos->uToMove]; return(RECOGN_EXACT); } @@ -546,7 +541,7 @@ Return value: { return(UNRECOGNIZED); } - *piScore = 0; + *piScore = g_iDrawScore[pos->uToMove]; return(RECOGN_EXACT); } @@ -715,7 +710,7 @@ Return value: // This is at least a draw for the side with the pawn and at best a // draw for the side with the knight // - *piScore = 0; + *piScore = g_iDrawScore[pos->uToMove]; if (pos->uToMove == uStrong) { return(RECOGN_UPPER); @@ -862,7 +857,7 @@ Return value: #endif at_best_draw_for_strong: - *piScore = 0; + *piScore = g_iDrawScore[pos->uToMove]; if (pos->uToMove == uStrong) { return(RECOGN_UPPER); @@ -870,7 +865,7 @@ Return value: return(RECOGN_LOWER); draw: - *piScore = 0; + *piScore = g_iDrawScore[pos->uToMove]; return(RECOGN_EXACT); } @@ -1086,7 +1081,7 @@ Return value: if (FastCountBits(pos->bbPawns[uStrong]) > 1) { - *piScore = 0; + *piScore = g_iDrawScore[pos->uToMove]; if (pos->uToMove == uStrong) { return(RECOGN_LOWER); @@ -1193,7 +1188,7 @@ Return value: // strong side but we don't know -- the logic is ugly. This is // still at best drawn for the weak side though. // - *piScore = 0; + *piScore = g_iDrawScore[pos->uToMove]; if (pos->uToMove == uStrong) { return(RECOGN_LOWER); |
