Evaluation estimates position score from the side to move's perspective. Returns centipawns (100 = 1 pawn).
Material: piece values. P=100, N=320, B=330, R=500, Q=900, K=20000. Sum of own pieces minus opponent pieces.
Piece-square tables: bonus/penalty for each piece on each square. Center squares worth more for knights/bishops. King safety in opening (kingside castling), centrality in endgame.
Pawn structure: doubled pawns (penalty), isolated pawns (penalty), passed pawns (bonus proportional to advancement), backward pawns, pawn chains.
Mobility: count of legal moves for each piece. More mobility = better position. Weight by piece type.
King safety: pawn shield in front of castled king. Open files near king = danger. Attacker count near king.
Center control: bonus for pieces/pawns controlling central squares (e4, d4, e5, d5).
Tapered eval: interpolate between middlegame and endgame weights based on remaining material. Game phase = sum of piece values on board.
Shannon's formula (1949): f(p) = 200(K-K') + 9(Q-Q') + 5(R-R') + 3(B-B'+N-N') + 1(P-P') - 0.5(D-D'+S-S'+I-I') + 0.1(M-M')