summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2022-08-20 16:11:54 +0300
committereug-vs <eugene@eug-vs.xyz>2022-08-20 16:11:54 +0300
commit5deeb35149ca72445b502586c583ea15a4186117 (patch)
treef3d3562872a41e7fcd2f759ceef41114e748ed89
parent9af05c593f57060d2532d80556ab1bc306660dc0 (diff)
downloadc-chess-5deeb35149ca72445b502586c583ea15a4186117.tar.gz
feat: tweak coefficients
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index e3b043c..b446fd6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -444,7 +444,7 @@ int compute_positioning_score(int* board, int color) {
multiplier = 2;
break;
case KING:
- multiplier = -1; // Discourage king in center (encourage castle)
+ multiplier = -5; // Discourage king in center (encourage castle)
// TODO: encourage king in center after opponent has low material <= 6
break;
default:
@@ -473,7 +473,7 @@ int compute_score(int* board) {
int positioning_score = compute_positioning_score(board, WHITE) - compute_positioning_score(board, BLACK);
int normalized_positioning = positioning_score / 7;
- return material_advantage + coverage_score + positioning_score;
+ return 3 * material_advantage + coverage_score + positioning_score;
}
int list_available_moves(Move* moves, int* board, int color) {