shithub: moonfish

Download patch

ref: 3d405b7e12f564289fbdb3e4d1da170b7a436b1e
parent: 6da435a4a02d1da9a56458873cfb6ff8d8faedaa
author: zamfofex <zamfofex@twdb.moe>
date: Thu Oct 12 13:58:11 EDT 2023

fix checkmate detection

--- a/search.c
+++ b/search.c
@@ -93,7 +93,7 @@
 	struct moonfish_move *move;
 	int score, best_score;
 	
-	best_score = -50 * moonfish_omega;
+	best_score = -200 * moonfish_omega;
 	
 	for (y = 0 ; y < 8 ; y++)
 	for (x = 0 ; x < 8 ; x++)
@@ -110,7 +110,7 @@
 				continue;
 			}
 			
-			score = -moonfish_search(ctx, -10 * moonfish_omega, 10 * moonfish_omega, 3);
+			score = -moonfish_search(ctx, -100 * moonfish_omega, 100 * moonfish_omega, 3);
 			moonfish_unplay(&ctx->chess, move);
 			
 			if (score > best_score)
--