Code: Select all
// Calculate the current phase
int gamePhaseOpening = Math.Max(boardState.CurrentGamePhase, EvaluationConstants.phaseResolution);
int gamePhaseEnding = EvaluationConstants.phaseResolution - gamePhaseOpening;
// Calculate the scores from PST tables (white minus black score)
int scoreOpening = boardState.PSTValues[Color.White][GamePhase.Opening] - boardState.PSTValues[Color.Black][GamePhase.Opening];
int scoreEnding = boardState.PSTValues[Color.White][GamePhase.Ending] - boardState.PSTValues[Color.Black][GamePhase.Ending];
// Tapered evaluation (https://www.chessprogramming.org/Tapered_Eval)
int score = ((scoreOpening * gamePhaseOpening) + (scoreEnding * gamePhaseEnding)) / EvaluationConstants.phaseResolution;
Such small mistake that leads to massive decrease in strength... At least this mistake was fairly simple to find
Do you have any examples of small or hard-to-find mistakes which lead to large consequences?