Add some Crazyhouse eval terms
authorH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 14 May 2017 19:34:42 +0000 (21:34 +0200)
committerH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 14 May 2017 19:34:42 +0000 (21:34 +0200)
Encourage development of Rooks and Bishops in Crazyhouse. Probably this term
should be disabled in other variants, but it is unlikely to trigger there.

dropper.c

index 90fc7b2..0dec015 100644 (file)
--- a/dropper.c
+++ b/dropper.c
@@ -751,6 +751,10 @@ Evaluate (int stm, int rights)
     }
     if(k < boardEnd - killZone) score += 100;
     score *= 5;
+    score -= ((board[   0] == WHITE+3 && board[0*22+1] && board[1*22]) + (board[     7] == WHITE+3 && board[     6] && board[1*22+7]))*25;
+    score += ((board[7*22] == BLACK+3 && board[7*22+1] && board[6*22]) + (board[7*22+7] == BLACK+3 && board[7*22+6] && board[6*22+7]))*25;
+    score -= ((board[     2] == WHITE+2 && board[1*22+1] && board[1*22+3]) + (board[     5] == WHITE+2 && board[1*22+6] && board[1*22+4]))*15;
+    score += ((board[7*22+2] == BLACK+2 && board[6*22+1] && board[6*22+3]) + (board[7*22+5] == BLACK+2 && board[6*22+6] && board[6*22+4]))*15;
     score += rightsScore[rights];
     return stm == WHITE ? score + 15*b - 9*w : -score - 15*w + 9*b;
 }