AAI_2025_Capstone_Chronicles_Combined
Evaluating Deep Learning Model Convergence in Chess via Nash Equilibria
4
The dataset in its raw form is not suitable for input in a neural network, so a chess environment implementation that converts .PGNs into viable tensor inputs was created. The pipeline does the following: ● Convert a .PGN file into a list of FEN (Forsyth–Edwards Notation) positions with the accompanying game result. Note, there are several positions (hundreds) in a single chess game that all share the same result. ● For each position, I compute an importance coefficient relative to the distance from the final position. For example, the final position of the game has an importance of 1. The first position of the game has (0.99)^(n_moves) importance. Chess is a very sharp game, so the game result itself may misalign with evaluation of a position. For example, grandmasters often play long theoretically drawn lines for the first 10 to 20 moves of the game, but decisive game results still occur. This myopic importance computation is crucial to combatting this misclassification effect and is used in Alpha Zero (find citation) and prior chess position classification works. ● Finally, the FEN strings are converted into 8x8x36 tensors that encode important features of the board state. These features include piece locations and types, castling rights, en passant squares, and possible squares for pseudo-legal moves for each piece type. Also, this tensor is always created from the perspective of the “hero”, the player whose turn it is. So, horizontal flipping takes place on black to move. There is a final plane that computes material imbalance using traditional chess heuristic weights for pieces. The game result is converted to a simple 3-class one-hot vector (hero win, draw, hero loss). Chess is a perfect information game, meaning that all possible information available to the player is shown in the current position state. However, chess’s rules are somewhat complex.
78
Made with FlippingBook - Share PDF online