From 03371b847296bb4ba70a4cc048a7abd8f0930c9b Mon Sep 17 00:00:00 2001 From: eug-vs Date: Wed, 31 Aug 2022 05:18:45 +0300 Subject: fix: correct pawn evaluation --- src/main.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index b78d207..2e29417 100644 --- a/src/main.c +++ b/src/main.c @@ -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; -- cgit v1.2.3