// bishop, bigger when the center files are blocked with pawns.
Bitboard blocked = pos.pieces(Us, PAWN) & shift<Down>(pos.pieces());
- score -= BishopPawns * pe->pawns_on_same_color_squares(Us, s)
+ score -= BishopPawns * pos.pawns_on_same_color_squares(Us, s)
* (1 + popcount(blocked & CenterFiles));
// Bonus for bishop on a long diagonal which can "see" both center squares
score += RookOnPawn * popcount(pos.pieces(Them, PAWN) & PseudoAttacks[ROOK][s]);
// Bonus for rook on an open or semi-open file
- if (pe->semiopen_file(Us, file_of(s)))
- score += RookOnFile[bool(pe->semiopen_file(Them, file_of(s)))];
+ if (pos.semiopen_file(Us, file_of(s)))
+ score += RookOnFile[bool(pos.semiopen_file(Them, file_of(s)))];
// Penalty when trapped by the king, even more if the king cannot castle
else if (mob <= 3)
int bonus = popcount(safe) + popcount(behind & safe);
int weight = pos.count<ALL_PIECES>(Us)
- - 2 * popcount(pe->semiopenFiles[WHITE] & pe->semiopenFiles[BLACK]);
+ - (16 - pos.count<PAWN>()) / 4;
Score score = make_score(bonus * weight * weight / 16, 0);