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
Use the contrast between traditional brute-force engines (like Stockfish, which analyzes 70 million positions per second) and the Reinforcement Learning (RL) approach guided by a neural network (like AlphaZero, which analyzes only 80 thousand positions per second). This pedagogical exercise demonstrates that selective and intelligent search is often more efficient than exhaustive search. Ask students to discuss why chess, with its immense search space, makes brute force impractical beyond the first few moves. Explain that RL works by rewarding the AI for winning (+1) and penalizing it for losing (-1) in self-play, a fundamental concept for understanding how the AI's strategic decisions evolve without human knowledge.
To make the Convolutional Neural Network (CNN) tangible concept, ask students to perform the transformation of a human-readable FEN into the 77x8x8 matrix . Using a Kaggle or Google Colab Notebook, have them input an FEN string (eg, the initial position) and then use the Python Chess library to render the board visually (in ASCII or graphic). Students should compare this visual representation with the first 13 binary layers of the 77x8x8 matrix generated by their code, providing immediate feedback on the accuracy of their ETL (Extract, Transform, Load) process. This analogy of the board as an "image" allows students to understand why CNNs are the engine of Deep Learning in chess.
Teaching neural networks will certainly be challenging, but tools such as Google Colab and GitHub Copilot can significantly support the process through generative AI.
While concepts like backpropagation, gradient descent, and model architecture can be complex for beginners, interactive environments such as Google Colab make experimentation more accessible by removing setup barriers and allowing students to run and modify code directly in the browser. In addition, AI-assisted coding tools like GitHub Copilot can help generate example snippets, suggest improvements, and accelerate debugging. Used thoughtfully, these tools can lower the entry threshold while still encouraging students to understand the logic behind the generated code rather than relying on it passively.
Emphasize how the AI transforms the complex problem of predicting a move ('e2e4') into a simple classification problem (choosing an index from 0 to 4095 ). You can use the reference example where the move 'e2e4' is mapped to index 820 to illustrate this simplification. Then, show how the Boolean Mask of legal moves is implemented. Explain that this mask is extracted from the 64 legal move layers of the 77x8x8 matrix and multiplied by the CNN's 4096-probability output vector. This acts as a "referee" that nullifies illegal predictions, ensuring the chosen move is always valid.
By compiling the full set of project materials—technical specifications, guidelines, datasets, readings, and examples—into a structured NotebookLM workspace, the team can create a shared knowledge base. This would allow students and instructors to ask contextualized questions and receive answers grounded specifically in the project documentation. Such an approach promotes consistency, reduces confusion, and supports autonomous learning, as participants can quickly clarify doubts without constantly revisiting dispersed documents.
Explain Monte Carlo Tree Search (MCTS) as the AI's intelligent planner, necessary because the CNN lacks the ability to look ahead. The CNN provides the "intuition" (policy network), and the MCTS provides the strategic depth. Show how MCTS does not perform thousands of random simulations, but uses the CNN's probabilities to filter the most promising moves (reducing from ~50 legal moves to only 3-10). This highly selective approach allows MCTS to concentrate on simulating high-quality variations deeply.
Recommend that VET students read the AlphaZero article (or a simplified version). This document serves as the authoritative blueprint explaining the theoretical basis of the 77x8x8 representation and the 0-4096 motion encoding system . By referencing the primary source, students move beyond being mere consumers of code and become informed AI architects who understand the rationale behind the data structures they are implementing.
Further explain why a 30% accuracy score can be considered a "top mark" in AI. In a math test, 3/10 is a fail, but in chess, if the AI guesses one of the three best moves, it is playing like a grandmaster.