diff options
author | eug-vs <eugene@eug-vs.xyz> | 2022-08-31 05:18:45 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2022-08-31 05:19:13 +0300 |
commit | 03371b847296bb4ba70a4cc048a7abd8f0930c9b (patch) | |
tree | 96fcb0dcc7b936e88ef9e373c208cbdc88944f7b | |
parent | 64a1d2a38bdb6c0b7361af05f955ea55eafffbb3 (diff) | |
download | c-chess-03371b847296bb4ba70a4cc048a7abd8f0930c9b.tar.gz |
fix: correct pawn evaluation
-rw-r--r-- | src/main.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -348,8 +348,6 @@ int evaluate_pawn(int piece, int rank) { int color = piece % 2; if (color == 0) { switch (rank) { - case 7: - return 9; case 6: return 5; case 5: @@ -359,8 +357,6 @@ int evaluate_pawn(int piece, int rank) { } } else { switch (rank) { - case 0: - return 9; case 1: return 5; case 2: @@ -387,7 +383,7 @@ int compute_material_advantage(int* board, int color) { counter += INFINITY * sign; break; case PAWN: - counter += evaluate_pawn(piece, rank) * sign; + counter += 10 * evaluate_pawn(piece, rank) * sign; break; case KNIGHT: counter += 30 * sign; |