#define KSHIELD\r
#define XFORTRESS\r
#define PAWNBLOCK\r
+#define TANDEM 100 /* bonus for pairs of attacking light steppers */\r
#define KYLIN 100 /* extra end-game value of Kylin for promotability */\r
#define PROMO 0 /* extra bonus for 'vertical' piece when it actually promotes (diagonal pieces get half) */\r
\r
#endif\r
\r
#ifdef PAWNBLOCK\r
- // penalty for blocking own P or GB: 20 by slider, 10 by other, but 50 if only retreat mode is straight back\r
+ // penalty for blocking own P or GB: 20 by slider, 10 by other, but 50 if only RETRACT mode is straight back\r
for(i=last[WHITE]; i > 1 && p[i].value<=50; i-=2) {\r
if((f = p[i].pos) != ABSENT) { // P present,\r
if((j = board[f + BW])&1) // square before it white (odd) piece\r
}\r
#endif\r
\r
+#ifdef TANDEM\r
+ if(zone > 0) {\r
+ int rw = BW*(BH-1-zone), rb = BW*zone, h=0;\r
+ for(f=0; f<BH; f++) {\r
+ if(p[board[rw+f]].pst == PST_ADVANCE) {\r
+ h += (p[board[rw+f-BW]].pst == PST_ADVANCE);\r
+ if(f > 0) h += (p[board[rw+f-BW-1]].pst == PST_ADVANCE);\r
+ if(f+1 < BH) h += (p[board[rw+f-BW+1]].pst == PST_ADVANCE);\r
+ }\r
+ if(p[board[rb+f]].pst == PST_ADVANCE) {\r
+ h -= (p[board[rb+f+BW]].pst == PST_RETRACT);\r
+ if(f > 0) h -= (p[board[rb+f+BW-1]].pst == PST_RETRACT);\r
+ if(f+1 < BH) h -= (p[board[rb+f+BW+1]].pst == PST_RETRACT);\r
+ }\r
+ }\r
+ score += h*TANDEM;\r
+ }\r
+#endif\r
+\r
return difEval - (filling*filling*promoDelta >> 16) + (stm ? score : -score);\r
}\r
\r