The ChessAIThon project (2025-1-ES01-KA220-VET-000354329) is co-funded by the European Union. The views and opinions expressed in this publication are those of the author(s) only and do not necessarily reflect those of the European Union or the Spanish Service for the Internationalisation of Education (SEPIE). Neither the European Union nor the National Agency SEPIE can be held responsible for them.
Table of Contents
The challenge for AI is not only evaluating the position but also predicting the next move efficiently and legally. Students must understand move encoding.
Strategy (Machine Language): To simplify the prediction problem for the CNN (a classification problem), the optimal move is transformed from textual notation (UCI, eg, 'e2e4') into a single numerical index between 0 and 4095 . This number is calculated using the function np.ravel_multi_index , which combines the starting square and the type of move.