7 #define PcPcOnSqAny(k,i,j) ( i >= j ? PcPcOnSq(k,i,j) : PcPcOnSq(k,j,i) )
9 static int CONV doacapt( const tree_t * restrict ptree, int pc, int turn,
10 int hand_index, const int list0[52],
11 const int list1[52], int nlist );
12 static int CONV doapc( const tree_t * restrict ptree, int pc, int sq,
13 const int list0[52], const int list1[52], int nlist );
14 static int CONV ehash_probe( uint64_t current_key, unsigned int hand_b,
15 int * restrict pscore );
16 static void CONV ehash_store( uint64_t key, unsigned int hand_b, int score );
17 static int CONV calc_difference( const tree_t * restrict ptree, int ply,
18 int turn, int list0[52], int list1[52],
19 int * restrict pscore );
20 static int CONV make_list( const tree_t * restrict ptree,
21 int * restrict pscore,
22 int list0[52], int list1[52] );
24 #if defined(INANIWA_SHIFT)
25 static int inaniwa_score( const tree_t * restrict ptree );
29 eval_material( const tree_t * restrict ptree )
33 itemp = PopuCount( BB_BPAWN ) + (int)I2HandPawn( HAND_B );
34 itemp -= PopuCount( BB_WPAWN ) + (int)I2HandPawn( HAND_W );
35 material = itemp * p_value[15+pawn];
37 itemp = PopuCount( BB_BLANCE ) + (int)I2HandLance( HAND_B );
38 itemp -= PopuCount( BB_WLANCE ) + (int)I2HandLance( HAND_W );
39 material += itemp * p_value[15+lance];
41 itemp = PopuCount( BB_BKNIGHT ) + (int)I2HandKnight( HAND_B );
42 itemp -= PopuCount( BB_WKNIGHT ) + (int)I2HandKnight( HAND_W );
43 material += itemp * p_value[15+knight];
45 itemp = PopuCount( BB_BSILVER ) + (int)I2HandSilver( HAND_B );
46 itemp -= PopuCount( BB_WSILVER ) + (int)I2HandSilver( HAND_W );
47 material += itemp * p_value[15+silver];
49 itemp = PopuCount( BB_BGOLD ) + (int)I2HandGold( HAND_B );
50 itemp -= PopuCount( BB_WGOLD ) + (int)I2HandGold( HAND_W );
51 material += itemp * p_value[15+gold];
53 itemp = PopuCount( BB_BBISHOP ) + (int)I2HandBishop( HAND_B );
54 itemp -= PopuCount( BB_WBISHOP ) + (int)I2HandBishop( HAND_W );
55 material += itemp * p_value[15+bishop];
57 itemp = PopuCount( BB_BROOK ) + (int)I2HandRook( HAND_B );
58 itemp -= PopuCount( BB_WROOK ) + (int)I2HandRook( HAND_W );
59 material += itemp * p_value[15+rook];
61 itemp = PopuCount( BB_BPRO_PAWN );
62 itemp -= PopuCount( BB_WPRO_PAWN );
63 material += itemp * p_value[15+pro_pawn];
65 itemp = PopuCount( BB_BPRO_LANCE );
66 itemp -= PopuCount( BB_WPRO_LANCE );
67 material += itemp * p_value[15+pro_lance];
69 itemp = PopuCount( BB_BPRO_KNIGHT );
70 itemp -= PopuCount( BB_WPRO_KNIGHT );
71 material += itemp * p_value[15+pro_knight];
73 itemp = PopuCount( BB_BPRO_SILVER );
74 itemp -= PopuCount( BB_WPRO_SILVER );
75 material += itemp * p_value[15+pro_silver];
77 itemp = PopuCount( BB_BHORSE );
78 itemp -= PopuCount( BB_WHORSE );
79 material += itemp * p_value[15+horse];
81 itemp = PopuCount( BB_BDRAGON );
82 itemp -= PopuCount( BB_WDRAGON );
83 material += itemp * p_value[15+dragon];
90 evaluate( tree_t * restrict ptree, int ply, int turn )
92 int list0[52], list1[52];
93 int nlist, score, sq_bk, sq_wk, k0, k1, l0, l1, i, j, sum;
96 ptree->neval_called++;
98 if ( ptree->save_eval[ply] != INT_MAX )
100 return (int)ptree->save_eval[ply] / FV_SCALE;
103 if ( ehash_probe( HASH_KEY, HAND_B, &score ) )
105 score = turn ? -score : score;
106 ptree->save_eval[ply] = score;
108 return score / FV_SCALE;
111 list0[ 0] = f_hand_pawn + I2HandPawn(HAND_B);
112 list0[ 1] = e_hand_pawn + I2HandPawn(HAND_W);
113 list0[ 2] = f_hand_lance + I2HandLance(HAND_B);
114 list0[ 3] = e_hand_lance + I2HandLance(HAND_W);
115 list0[ 4] = f_hand_knight + I2HandKnight(HAND_B);
116 list0[ 5] = e_hand_knight + I2HandKnight(HAND_W);
117 list0[ 6] = f_hand_silver + I2HandSilver(HAND_B);
118 list0[ 7] = e_hand_silver + I2HandSilver(HAND_W);
119 list0[ 8] = f_hand_gold + I2HandGold(HAND_B);
120 list0[ 9] = e_hand_gold + I2HandGold(HAND_W);
121 list0[10] = f_hand_bishop + I2HandBishop(HAND_B);
122 list0[11] = e_hand_bishop + I2HandBishop(HAND_W);
123 list0[12] = f_hand_rook + I2HandRook(HAND_B);
124 list0[13] = e_hand_rook + I2HandRook(HAND_W);
126 list1[ 0] = f_hand_pawn + I2HandPawn(HAND_W);
127 list1[ 1] = e_hand_pawn + I2HandPawn(HAND_B);
128 list1[ 2] = f_hand_lance + I2HandLance(HAND_W);
129 list1[ 3] = e_hand_lance + I2HandLance(HAND_B);
130 list1[ 4] = f_hand_knight + I2HandKnight(HAND_W);
131 list1[ 5] = e_hand_knight + I2HandKnight(HAND_B);
132 list1[ 6] = f_hand_silver + I2HandSilver(HAND_W);
133 list1[ 7] = e_hand_silver + I2HandSilver(HAND_B);
134 list1[ 8] = f_hand_gold + I2HandGold(HAND_W);
135 list1[ 9] = e_hand_gold + I2HandGold(HAND_B);
136 list1[10] = f_hand_bishop + I2HandBishop(HAND_W);
137 list1[11] = e_hand_bishop + I2HandBishop(HAND_B);
138 list1[12] = f_hand_rook + I2HandRook(HAND_W);
139 list1[13] = e_hand_rook + I2HandRook(HAND_B);
141 if ( calc_difference( ptree, ply, turn, list0, list1, &score ) )
143 ehash_store( HASH_KEY, HAND_B, score );
144 score = turn ? -score : score;
145 ptree->save_eval[ply] = score;
147 return score / FV_SCALE;
150 nlist = make_list( ptree, &score, list0, list1 );
152 sq_wk = Inv( SQ_WKING );
155 for ( i = 0; i < nlist; i++ )
159 for ( j = 0; j <= i; j++ )
163 assert( k0 >= l0 && k1 >= l1 );
164 sum += PcPcOnSq( sq_bk, k0, l0 );
165 sum -= PcPcOnSq( sq_wk, k1, l1 );
170 score += MATERIAL * FV_SCALE;
171 #if defined(INANIWA_SHIFT)
172 score += inaniwa_score( ptree );
175 ehash_store( HASH_KEY, HAND_B, score );
177 score = turn ? -score : score;
179 ptree->save_eval[ply] = score;
183 #if ! defined(MINIMUM)
184 if ( abs(score) > score_max_eval )
186 out_warning( "A score at evaluate() is out of bounce." );
195 void CONV ehash_clear( void ) { memset( ehash_tbl, 0, sizeof(ehash_tbl) ); }
198 static int CONV ehash_probe( uint64_t current_key, unsigned int hand_b,
199 int * restrict pscore )
201 uint64_t hash_word, hash_key;
203 hash_word = ehash_tbl[ (unsigned int)current_key & EHASH_MASK ];
205 #if ! defined(__x86_64__)
206 hash_word ^= hash_word << 32;
209 current_key ^= (uint64_t)hand_b << 21;
210 current_key &= ~(uint64_t)0x1fffffU;
212 hash_key = hash_word;
213 hash_key &= ~(uint64_t)0x1fffffU;
215 if ( hash_key != current_key ) { return 0; }
217 *pscore = (int)( (unsigned int)hash_word & 0x1fffffU ) - 0x100000;
223 static void CONV ehash_store( uint64_t key, unsigned int hand_b, int score )
228 hash_word ^= (uint64_t)hand_b << 21;
229 hash_word &= ~(uint64_t)0x1fffffU;
230 hash_word |= (uint64_t)( score + 0x100000 );
232 #if ! defined(__x86_64__)
233 hash_word ^= hash_word << 32;
236 ehash_tbl[ (unsigned int)key & EHASH_MASK ] = hash_word;
241 calc_difference( const tree_t * restrict ptree, int ply, int turn,
242 int list0[52], int list1[52], int * restrict pscore )
245 int nlist, diff, from, to, sq, pc;
247 #if defined(INANIWA_SHIFT)
248 if ( inaniwa_flag ) { return 0; }
251 if ( ptree->save_eval[ply-1] == INT_MAX ) { return 0; }
252 if ( I2PieceMove(MOVE_LAST) == king ) { return 0; }
254 assert( MOVE_LAST != MOVE_PASS );
258 from = I2From(MOVE_LAST);
259 to = I2To(MOVE_LAST);
261 BBOr( bb, BB_BOCCUPY, BB_WOCCUPY );
272 list0[nlist ] = aikpp[15+pc] + sq;
273 list1[nlist++] = aikpp[15-pc] + Inv(sq);
277 list0[nlist ] = aikpp[15+pc] + to;
278 list1[nlist++] = aikpp[15-pc] + Inv(to);
280 diff = doapc( ptree, pc, to, list0, list1, nlist );
283 if ( from >= nsquare )
288 pc = From2Drop(from);
289 hand = turn ? HAND_B : HAND_W;
293 case pawn: hand_index = I2HandPawn(hand); break;
294 case lance: hand_index = I2HandLance(hand); break;
295 case knight: hand_index = I2HandKnight(hand); break;
296 case silver: hand_index = I2HandSilver(hand); break;
297 case gold: hand_index = I2HandGold(hand); break;
298 case bishop: hand_index = I2HandBishop(hand); break;
299 default: hand_index = I2HandRook(hand); break;
302 diff += doacapt( ptree, pc, turn, hand_index, list0, list1, nlist );
304 list0[ 2*(pc-1) + 1 - turn ] += 1;
305 list1[ 2*(pc-1) + turn ] += 1;
308 diff -= doacapt( ptree, pc, turn, hand_index, list0, list1, nlist );
311 int pc_cap = UToCap(MOVE_LAST);
317 pc = pc_cap & ~promote;
318 hand = turn ? HAND_B : HAND_W;
319 pc_cap = turn ? -pc_cap : pc_cap;
320 diff += turn ? p_value_ex[15+pc_cap] * FV_SCALE
321 : -p_value_ex[15+pc_cap] * FV_SCALE;
325 case pawn: hand_index = I2HandPawn(hand); break;
326 case lance: hand_index = I2HandLance(hand); break;
327 case knight: hand_index = I2HandKnight(hand); break;
328 case silver: hand_index = I2HandSilver(hand); break;
329 case gold: hand_index = I2HandGold(hand); break;
330 case bishop: hand_index = I2HandBishop(hand); break;
331 default: hand_index = I2HandRook(hand); break;
334 diff += doacapt( ptree, pc, turn, hand_index, list0, list1, nlist );
336 list0[ 2*(pc-1) + 1 - turn ] -= 1;
337 list1[ 2*(pc-1) + turn ] -= 1;
340 diff -= doacapt( ptree, pc, turn, hand_index, list0, list1, nlist );
342 list0[nlist ] = aikpp[15+pc_cap] + to;
343 list1[nlist++] = aikpp[15-pc_cap] + Inv(to);
345 diff -= doapc( ptree, pc_cap, to, list0, list1, nlist );
348 pc = I2PieceMove(MOVE_LAST);
349 if ( I2IsPromote(MOVE_LAST) )
351 diff += ( turn ? p_value_pm[7+pc] : -p_value_pm[7+pc] ) * FV_SCALE;
354 pc = turn ? pc : -pc;
356 list0[nlist ] = aikpp[15+pc] + from;
357 list1[nlist++] = aikpp[15-pc] + Inv(from);
359 diff -= doapc( ptree, pc, from, list0, list1, nlist );
363 diff += turn ? ptree->save_eval[ply-1] : - ptree->save_eval[ply-1];
372 make_list( const tree_t * restrict ptree, int * restrict pscore,
373 int list0[52], int list1[52] )
377 int nlist, sq, n2, i, score, sq_bk0, sq_wk0, sq_bk1, sq_wk1;
383 sq_bk1 = Inv(SQ_WKING);
384 sq_wk1 = Inv(SQ_BKING);
386 score += kkp[sq_bk0][sq_wk0][ kkp_hand_pawn + I2HandPawn(HAND_B) ];
387 score += kkp[sq_bk0][sq_wk0][ kkp_hand_lance + I2HandLance(HAND_B) ];
388 score += kkp[sq_bk0][sq_wk0][ kkp_hand_knight + I2HandKnight(HAND_B) ];
389 score += kkp[sq_bk0][sq_wk0][ kkp_hand_silver + I2HandSilver(HAND_B) ];
390 score += kkp[sq_bk0][sq_wk0][ kkp_hand_gold + I2HandGold(HAND_B) ];
391 score += kkp[sq_bk0][sq_wk0][ kkp_hand_bishop + I2HandBishop(HAND_B) ];
392 score += kkp[sq_bk0][sq_wk0][ kkp_hand_rook + I2HandRook(HAND_B) ];
394 score -= kkp[sq_bk1][sq_wk1][ kkp_hand_pawn + I2HandPawn(HAND_W) ];
395 score -= kkp[sq_bk1][sq_wk1][ kkp_hand_lance + I2HandLance(HAND_W) ];
396 score -= kkp[sq_bk1][sq_wk1][ kkp_hand_knight + I2HandKnight(HAND_W) ];
397 score -= kkp[sq_bk1][sq_wk1][ kkp_hand_silver + I2HandSilver(HAND_W) ];
398 score -= kkp[sq_bk1][sq_wk1][ kkp_hand_gold + I2HandGold(HAND_W) ];
399 score -= kkp[sq_bk1][sq_wk1][ kkp_hand_bishop + I2HandBishop(HAND_W) ];
400 score -= kkp[sq_bk1][sq_wk1][ kkp_hand_rook + I2HandRook(HAND_W) ];
404 while ( BBTest(bb) ) {
408 list0[nlist] = f_pawn + sq;
409 list2[n2] = e_pawn + Inv(sq);
410 score += kkp[sq_bk0][sq_wk0][ kkp_pawn + sq ];
416 while ( BBTest(bb) ) {
420 list0[nlist] = e_pawn + sq;
421 list2[n2] = f_pawn + Inv(sq);
422 score -= kkp[sq_bk1][sq_wk1][ kkp_pawn + Inv(sq) ];
426 for ( i = 0; i < n2; i++ ) { list1[nlist-i-1] = list2[i]; }
430 while ( BBTest(bb) ) {
434 list0[nlist] = f_lance + sq;
435 list2[n2] = e_lance + Inv(sq);
436 score += kkp[sq_bk0][sq_wk0][ kkp_lance + sq ];
442 while ( BBTest(bb) ) {
446 list0[nlist] = e_lance + sq;
447 list2[n2] = f_lance + Inv(sq);
448 score -= kkp[sq_bk1][sq_wk1][ kkp_lance + Inv(sq) ];
452 for ( i = 0; i < n2; i++ ) { list1[nlist-i-1] = list2[i]; }
457 while ( BBTest(bb) ) {
461 list0[nlist] = f_knight + sq;
462 list2[n2] = e_knight + Inv(sq);
463 score += kkp[sq_bk0][sq_wk0][ kkp_knight + sq ];
469 while ( BBTest(bb) ) {
473 list0[nlist] = e_knight + sq;
474 list2[n2] = f_knight + Inv(sq);
475 score -= kkp[sq_bk1][sq_wk1][ kkp_knight + Inv(sq) ];
479 for ( i = 0; i < n2; i++ ) { list1[nlist-i-1] = list2[i]; }
484 while ( BBTest(bb) ) {
488 list0[nlist] = f_silver + sq;
489 list2[n2] = e_silver + Inv(sq);
490 score += kkp[sq_bk0][sq_wk0][ kkp_silver + sq ];
496 while ( BBTest(bb) ) {
500 list0[nlist] = e_silver + sq;
501 list2[n2] = f_silver + Inv(sq);
502 score -= kkp[sq_bk1][sq_wk1][ kkp_silver + Inv(sq) ];
506 for ( i = 0; i < n2; i++ ) { list1[nlist-i-1] = list2[i]; }
511 while ( BBTest(bb) ) {
515 list0[nlist] = f_gold + sq;
516 list2[n2] = e_gold + Inv(sq);
517 score += kkp[sq_bk0][sq_wk0][ kkp_gold + sq ];
523 while ( BBTest(bb) ) {
527 list0[nlist] = e_gold + sq;
528 list2[n2] = f_gold + Inv(sq);
529 score -= kkp[sq_bk1][sq_wk1][ kkp_gold + Inv(sq) ];
533 for ( i = 0; i < n2; i++ ) { list1[nlist-i-1] = list2[i]; }
538 while ( BBTest(bb) ) {
542 list0[nlist] = f_bishop + sq;
543 list2[n2] = e_bishop + Inv(sq);
544 score += kkp[sq_bk0][sq_wk0][ kkp_bishop + sq ];
550 while ( BBTest(bb) ) {
554 list0[nlist] = e_bishop + sq;
555 list2[n2] = f_bishop + Inv(sq);
556 score -= kkp[sq_bk1][sq_wk1][ kkp_bishop + Inv(sq) ];
560 for ( i = 0; i < n2; i++ ) { list1[nlist-i-1] = list2[i]; }
565 while ( BBTest(bb) ) {
569 list0[nlist] = f_horse + sq;
570 list2[n2] = e_horse + Inv(sq);
571 score += kkp[sq_bk0][sq_wk0][ kkp_horse + sq ];
577 while ( BBTest(bb) ) {
581 list0[nlist] = e_horse + sq;
582 list2[n2] = f_horse + Inv(sq);
583 score -= kkp[sq_bk1][sq_wk1][ kkp_horse + Inv(sq) ];
587 for ( i = 0; i < n2; i++ ) { list1[nlist-i-1] = list2[i]; }
592 while ( BBTest(bb) ) {
596 list0[nlist] = f_rook + sq;
597 list2[n2] = e_rook + Inv(sq);
598 score += kkp[sq_bk0][sq_wk0][ kkp_rook + sq ];
604 while ( BBTest(bb) ) {
608 list0[nlist] = e_rook + sq;
609 list2[n2] = f_rook + Inv(sq);
610 score -= kkp[sq_bk1][sq_wk1][ kkp_rook + Inv(sq) ];
614 for ( i = 0; i < n2; i++ ) { list1[nlist-i-1] = list2[i]; }
619 while ( BBTest(bb) ) {
623 list0[nlist] = f_dragon + sq;
624 list2[n2] = e_dragon + Inv(sq);
625 score += kkp[sq_bk0][sq_wk0][ kkp_dragon + sq ];
631 while ( BBTest(bb) ) {
635 list0[nlist] = e_dragon + sq;
636 list2[n2] = f_dragon + Inv(sq);
637 score -= kkp[sq_bk1][sq_wk1][ kkp_dragon + Inv(sq) ];
641 for ( i = 0; i < n2; i++ ) { list1[nlist-i-1] = list2[i]; }
643 assert( nlist <= 52 );
650 static int CONV doapc( const tree_t * restrict ptree, int pc, int sq,
651 const int list0[52], const int list1[52], int nlist )
654 int index_b = aikpp[15+pc] + sq;
655 int index_w = aikpp[15-pc] + Inv(sq);
656 int sq_bk = SQ_BKING;
657 int sq_wk = Inv(SQ_WKING);
660 for( i = 0; i < 14; i++ )
662 sum += PcPcOnSq( sq_bk, index_b, list0[i] );
663 sum -= PcPcOnSq( sq_wk, index_w, list1[i] );
666 for( i = 14; i < nlist; i++ )
668 sum += PcPcOnSqAny( sq_bk, index_b, list0[i] );
669 sum -= PcPcOnSqAny( sq_wk, index_w, list1[i] );
676 sum += kkp[sq_bk][sq_wk][ aikkp[pc] + sq ];
679 sq_bk = Inv(SQ_WKING);
680 sq_wk = Inv(SQ_BKING);
681 sum -= kkp[sq_bk][sq_wk][ aikkp[-pc] + Inv(sq) ];
689 doacapt( const tree_t * restrict ptree, int pc, int turn, int hand_index,
690 const int list0[52], const int list1[52], int nlist )
692 int i, sum, sq_bk, sq_wk, index_b, index_w;
694 index_b = 2*(pc-1) + 1 - turn;
695 index_w = 2*(pc-1) + turn;
697 sq_wk = Inv(SQ_WKING);
700 for( i = 14; i < nlist; i++ )
702 sum += PcPcOnSq( sq_bk, list0[i], list0[index_b] );
703 sum -= PcPcOnSq( sq_wk, list1[i], list1[index_w] );
706 for( i = 0; i <= 2*(pc-1); i++ )
708 sum += PcPcOnSq( sq_bk, list0[index_b], list0[i] );
709 sum -= PcPcOnSq( sq_wk, list1[index_w], list1[i] );
712 for( i += 1; i < 14; i++ )
714 sum += PcPcOnSq( sq_bk, list0[i], list0[index_b] );
715 sum -= PcPcOnSq( sq_wk, list1[i], list1[index_w] );
720 sum += PcPcOnSq( sq_bk, list0[index_w], list0[index_b] );
721 sum -= PcPcOnSq( sq_wk, list1[index_w], list1[index_w] );
724 sum += kkp[sq_bk][sq_wk][ aikkp_hand[pc] + hand_index ];
727 sum += PcPcOnSq( sq_bk, list0[index_b], list0[index_b] );
728 sum -= PcPcOnSq( sq_wk, list1[index_b], list1[index_w] );
729 sq_bk = Inv(SQ_WKING);
730 sq_wk = Inv(SQ_BKING);
731 sum -= kkp[sq_bk][sq_wk][ aikkp_hand[pc] + hand_index ];
738 #if defined(INANIWA_SHIFT)
740 inaniwa_score( const tree_t * restrict ptree )
744 if ( ! inaniwa_flag ) { return 0; }
747 if ( inaniwa_flag == 2 ) {
749 if ( BOARD[B9] == -knight ) { score += 700 * FV_SCALE; }
750 if ( BOARD[H9] == -knight ) { score += 700 * FV_SCALE; }
752 if ( BOARD[A7] == -knight ) { score += 700 * FV_SCALE; }
753 if ( BOARD[C7] == -knight ) { score += 400 * FV_SCALE; }
754 if ( BOARD[G7] == -knight ) { score += 400 * FV_SCALE; }
755 if ( BOARD[I7] == -knight ) { score += 700 * FV_SCALE; }
757 if ( BOARD[B5] == -knight ) { score += 700 * FV_SCALE; }
758 if ( BOARD[D5] == -knight ) { score += 100 * FV_SCALE; }
759 if ( BOARD[F5] == -knight ) { score += 100 * FV_SCALE; }
760 if ( BOARD[H5] == -knight ) { score += 700 * FV_SCALE; }
762 if ( BOARD[E3] == pawn ) { score += 200 * FV_SCALE; }
763 if ( BOARD[E4] == pawn ) { score += 200 * FV_SCALE; }
764 if ( BOARD[E5] == pawn ) { score += 200 * FV_SCALE; }
768 if ( BOARD[B1] == knight ) { score -= 700 * FV_SCALE; }
769 if ( BOARD[H1] == knight ) { score -= 700 * FV_SCALE; }
771 if ( BOARD[A3] == knight ) { score -= 700 * FV_SCALE; }
772 if ( BOARD[C3] == knight ) { score -= 400 * FV_SCALE; }
773 if ( BOARD[G3] == knight ) { score -= 400 * FV_SCALE; }
774 if ( BOARD[I3] == knight ) { score -= 700 * FV_SCALE; }
776 if ( BOARD[B5] == knight ) { score -= 700 * FV_SCALE; }
777 if ( BOARD[D5] == knight ) { score -= 100 * FV_SCALE; }
778 if ( BOARD[F5] == knight ) { score -= 100 * FV_SCALE; }
779 if ( BOARD[H5] == knight ) { score -= 700 * FV_SCALE; }
781 if ( BOARD[E7] == -pawn ) { score -= 200 * FV_SCALE; }
782 if ( BOARD[E6] == -pawn ) { score -= 200 * FV_SCALE; }
783 if ( BOARD[E5] == -pawn ) { score -= 200 * FV_SCALE; }