Conthist #79

Merged
rektdie merged 13 commits from conthist into main 2025-07-20 13:06:45 +02:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit 2181d446bf - Show all commits

No files matched your search

+4 -4
View File
@@ -25,7 +25,7 @@ void InitLMRTable() {
static int ScoreMove(Board &board, Move &move, int ply, SearchContext* ctx) { static int ScoreMove(Board &board, Move &move, int ply, SearchContext* ctx) {
TTEntry *current = ctx->TT.GetRawEntry(board.hashKey); TTEntry *current = ctx->TT.GetRawEntry(board.hashKey);
if (current->hashKey == board.hashKey && current->bestMove == move) { if (current->hashKey == board.hashKey && current->bestMove == move) {
return 200000; return 100000;
} }
if (move.IsCapture()) { if (move.IsCapture()) {
@@ -36,12 +36,12 @@ static int ScoreMove(Board &board, Move &move, int ply, SearchContext* ctx) {
targetType = Pawn; targetType = Pawn;
} }
return 120000 * ((SEE(board, move, -100))) + moveScoreTable[attackerType][targetType]; return 50000 * ((SEE(board, move, -100))) + moveScoreTable[attackerType][targetType];
} else { } else {
if (ctx->killerMoves[0][ply] == move) { if (ctx->killerMoves[0][ply] == move) {
return 110000; return 21000;
} else if (ctx->killerMoves[1][ply] == move) { } else if (ctx->killerMoves[1][ply] == move) {
return 100000; return 20000;
} else { } else {
// Max 16384 // Max 16384
int historyScore = ctx->history[board.sideToMove][move.MoveFrom()][move.MoveTo()]; int historyScore = ctx->history[board.sideToMove][move.MoveFrom()][move.MoveTo()];
+1 -1
View File
@@ -43,7 +43,7 @@ public:
int clampedBonus = std::clamp(bonus, -MAX_HISTORY, MAX_HISTORY); int clampedBonus = std::clamp(bonus, -MAX_HISTORY, MAX_HISTORY);
contHistMoves[stm][prevType][prevTo][type][to] += contHistMoves[stm][prevType][prevTo][type][to] +=
clampedBonus - contHistMoves[stm][prevType][prevTo][type][to] * std::abs(clampedBonus) / MAX_HISTORY / 2; clampedBonus - contHistMoves[stm][prevType][prevTo][type][to] * std::abs(clampedBonus) / MAX_HISTORY;
} }
void Clear() { void Clear() {