question: private final int tradeBonus ( Position pos ) { final int wM = pos . wMtrl ; final int bM = pos . bMtrl ; final int wPawn = pos . wMtrlPawns ; final int bPawn = pos . bMtrlPawns ; final int deltaScore = wM - bM ; int pBonus = 0 ; pBonus += interpolate ( ( deltaScore > 0 ) ? wPawn : bPawn , 0 , - 30 * deltaScore / 100 , 6 * pV , 0 ) ; pBonus += interpolate ( ( deltaScore > 0 ) ? bM : wM , 0 , 30 * deltaScore / 100 , qV + 2 * rV + 2 * bV + 2 * nV , 0 ) ; return pBonus ; }
target:  Implement the "when ahead trade pieces, when behind trade pawns" rule. 