sandermvdb / chess22k

Chessengine written in Java
GNU General Public License v3.0
32 stars 8 forks source link

whitePromotionDistance < blackPromotionDistance - 1 #8

Open bagaturchess opened 5 years ago

bagaturchess commented 5 years ago

Hello, this is a feature request for the pawns evaluation function. In the java file https://github.com/sandermvdb/chess22k/blob/master/src/main/java/nl/s22k/chess/eval/PassedPawnEval.java there is a block: if (whitePromotionDistance < blackPromotionDistance - 1) { score += 350; } else if (whitePromotionDistance > blackPromotionDistance + 1) { score -= 350; } This code doesn't include the score into the endgame part of the eval, which should be not good ... I assume that in endgames it is even more important to handle these cases. Probably the ELO would be more if this is implemented. Also it is good to have a bonus of 175 for promotionDistance == 2, when the pawn cannot be stopped similar to promotionDistance == 1. And another topic: in KPsvKPs endgames would be good to have implemented unstoppable passers logic.