Skip to content

Commit

Permalink
Bench: 28419588
Browse files Browse the repository at this point in the history
  • Loading branch information
TerjeKir committed Nov 20, 2023
1 parent 3524a97 commit 42dcd90
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/evaluate.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const int PieceValue[2][PIECE_NB] = {
};

// Bonus for being the side to move
const int Tempo = 18;
const int Tempo = 19;

// Misc bonuses and maluses
const int PawnDoubled = S(-11,-48);
Expand Down Expand Up @@ -137,9 +137,9 @@ const int Mobility[4][28] = {
};

// KingSafety [pt-2]
const int AttackPower[4] = { 32, 20, 22, 69 };
const int CheckPower[4] = { 70, 42, 91, 68 };
const int CountModifier[8] = { 0, 0, 63, 120, 95, 124, 124, 128 };
const int AttackPower[4] = { 36, 19, 22, 72 };
const int CheckPower[4] = { 71, 39, 80, 74 };
const int CountModifier[8] = { 0, 0, 63, 126, 96, 124, 124, 128 };


// Evaluates pawns
Expand Down Expand Up @@ -335,7 +335,7 @@ INLINE int EvalKings(const Position *pos, EvalInfo *ei, const Color color) {
}

// King safety
ei->attackPower[!color] += (count - 3) * 9;
ei->attackPower[!color] += (count - 3) * 8;

int danger = ei->attackPower[!color]
* CountModifier[MIN(7, ei->attackCount[!color])];
Expand Down Expand Up @@ -505,7 +505,7 @@ static int ScaleFactor(const Position *pos, const int eval) {

int strongPawnCount = PopCount(strongPawns);
int x = 8 - strongPawnCount;
int pawnScale = 133 + 2 * x - x * x;
int pawnScale = 128 - x * x;

// Scale down when there aren't pawns on both sides of the board
if (!(strongPawns & QueenSideBB) || !(strongPawns & KingSideBB))
Expand Down

0 comments on commit 42dcd90

Please sign in to comment.