Skip to content

Commit

Permalink
Bench: 27831406
Browse files Browse the repository at this point in the history
  • Loading branch information
TerjeKir committed Jan 4, 2025
1 parent 54e8064 commit fd3824c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/history.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "types.h"


#define QuietEntry(move) (&thread->history[thread->pos.stm][fromSq(move)][toSq(move)])
#define QuietEntry(move) (&thread->history[ColorOf(piece(move))][fromSq(move)][toSq(move)])
#define PawnEntry(move) (&thread->pawnHistory[PawnStructure(&thread->pos)][piece(move)][toSq(move)])
#define NoisyEntry(move) (&thread->captureHistory[piece(move)][toSq(move)][PieceTypeOf(capturing(move))])
#define ContEntry(offset, move) (&(*(ss-offset)->continuation)[piece(move)][toSq(move)])
Expand Down
5 changes: 5 additions & 0 deletions src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,11 @@ static int AlphaBeta(Thread *thread, Stack *ss, int alpha, int beta, Depth depth
if (!isTerminal(ttScore) && TTScoreIsMoreInformative(ttBound, ttScore, eval))
eval = ttScore;

if (ss->ply > 1 && (ss-1)->move && !moveIsCapture((ss-1)->move)) {
int bonus = CLAMP(-10 * ((ss-1)->staticEval + ss->staticEval), -1024, 1024) + 512;
QuietHistoryUpdate((ss-1)->move, bonus);
}

// Improving if not in check, and current eval is higher than 2 plies ago
bool improving = !inCheck && eval > (ss-2)->staticEval;

Expand Down

0 comments on commit fd3824c

Please sign in to comment.