SebLague / Chess-Coding-Adventure

A work-in-progress chess bot written in C#
https://youtu.be/U4ogK0MIzqk
MIT License
1.44k stars 301 forks source link

KingEnd is in the PieceSquareTable with values but... #11

Open robertkjr3d opened 2 years ago

robertkjr3d commented 2 years ago

You have a kingmiddle and KingEnd... Also the Evaluation section choses when to call the Endgame. What I don't understand is when the AI ever 'evaluates' using the 'kingEnd' numbers. Is this part currently being ignored? I'm thinking the Evaluation section (Evaluation.cs), when it changes the 'EndgamePhaseWeight' also needs to use the (KingEnd) (PieceSquareTable.cs).

robertkjr3d commented 2 years ago

You obviously got your code from here: https://www.adamberent.com/wp-content/uploads/2019/02/GuideToProgrammingChessEngine.pdf But missed the part with: if (endGamePhase) { score += KingTableEndGame[index]; }

k-tten commented 1 year ago

@robertkjr3d In his new video I believe he states that he left it out explicitly because it made the program perform worse for a mysterious reason.