An Artificial Intelligence Curriculum Based on Historic Board Games for Youth Development
Shatranj.ai offers a specially designed AI course based on historic board games, such as Chess and Shatranj
AI Curriculum Based on Historic Board Games
21 structured lessons covering python, game programming, search algorithms, and modern ai
AI Curriculum Based on Historic Board Games
Lesson 1 – Project and Curriculum Scope and Priorities
Summary: Introduces Shatranj.AI project, Erasmus+ foundations, partner organizations, digital platforms.
- Introduces the Shatranj.AI project, its Erasmus+ foundations, partner organizations, and digital platforms.
- Project vision, Erasmus KA2 context
- Partner institutions and cultural heritage focus
- Overview of platforms (editor, LMS, code tools)
- Teacher roles and student outcomes
- Curriculum structure overview
- Python/Jupyter introduction
Lesson 2 – Computing & Python Setup
Basic computing concepts and Python/Jupyter installation.
Login required to access full content.
- Students learn core computing concepts and set up Python/Jupyter.
- CPU, RAM, I/O basics
- Bits, bytes, binary representation
- JupyterLab installation
- First Python notebook execution
- Variables, simple expressions
- Access to Drive folders
Lesson 3 – Python Data Types
Numbers, strings, lists, and essential data handling in Python.
Login required to access full content.
- Covers Python’s built‑in data types and basic operations.
- Integers, floats, strings, booleans
- Type conversion
- Lists and indexing
- Mutability concepts
- Chess-pieces-as-strings exercises
Lesson 4 – Conditionals, Loops, Control Flow
If/else logic, loops, and control flow fundamentals.
Login required to access full content.
- Introduces logic, loops, and interactive programs.
- If/elif/else logic
- Boolean operations
- For/while loops
- Break/continue
- Simple input programs
Lesson 5 – Functions, Scope, Lambda
Writing functions, parameters, returns, and variable scope.
Login required to access full content.
- Teaches modular code with functions.
- Defining functions
- Parameters and returns
- Local/global scope
- Lambdas
- Small functional project (piece-value calculator)
Lesson 6 – Files, Exceptions, Libraries, Testing
Reading/writing files, handling errors, and using libraries.
Login required to access full content.
- Working with files and robust code.
- File read/write
- Try/except
- Importing libraries
- Simple testing
- Handling invalid inputs
Lesson 7 – OOP, Classes, TicTacToe
Classes, objects, and building a simple TicTacToe game.
Login required to access full content.
- First exposure to OOP.
- Classes and objects
- Attributes and methods
- Game modeling
- TicTacToe implementation
- Debugging OOP code
Lesson 8– Chess & Shatranj Code Foundations
Board representation and basic piece movement logic.
Login required to access full content.
- Students start building engine components.
- Board representations
- Piece movement basics
- UTF-8 rendering
- Chess board editor tools
- Printing and moving pieces
Lesson 9– Chess & Shatranj Code Foundations
Board representation and basic piece movement logic.
Login required to access full content.
- Students start building engine components.
- Board representations
- Piece movement basics
- UTF-8 rendering
- Chess board editor tools
- Printing and moving pieces
Lesson 10– Search Algorithms / Adversarial Search
DFS, BFS, UCS, and A* search foundations.
Login required to access full content.
- Core AI search algorithms for games.
- Search problem structure
- DFS, BFS, UCS
- A* and heuristics
- Minimax introduction
- Pacman/chess examples
- Graph-tracing exercises
Lesson 11 – Search Algorithms / Adversarial Search
Minimax basics with chess/Pacman examples.
- Core AI search algorithms for games.
- Search problem structure
- DFS, BFS, UCS
- A* and heuristics
- Minimax introduction
- Pacman/chess examples
- Graph-tracing exercises
Lesson 12 – Horse Tour (Knight’s Tour)
Recursion, backtracking, and heuristic solutions.
Login required to access full content.
- Explores Knight’s Tour with recursion and heuristics.
- Knight graph movement
- Open/closed tours
- Backtracking with DFS
- Warnsdorff heuristic
- Connection to TSP
Lesson 13 – Eight Queens Puzzle
Backtracking and constraint-based problem solving.
Login required to access full content.
- Constraint satisfaction with backtracking.
- Queen attack logic
- Recursive search
- Optimization techniques
- Historical queen references
- Notebook implementations
Lesson 14 – Wheat & Chessboard Problem
Exponential growth and classic logic puzzles.
Login required to access full content.
- Mathematical puzzles and exponential growth.
- Doubling on chessboard
- Powers of 2
- Magic squares
- Smullyan logic puzzles
Lesson 15 – Minimax, Alpha-Beta, Checkmate Logic
Advanced search, pruning, and endgame logic.
Login required to access full content.
- Deep adversarial search and chess endgames.
- Minimax computation
- Alpha-beta pruning
- Opposition, triangulation
- Historical sources (Al-Adli, Reti)
Lesson 16 – Suli’nin Elması (Historic Endgame Study)
Historic endgame study and triangulation.
Login required to access full content.
- Historic chess endgame analysis.
- Al-Suli biography
- Reconstruction of endgame
- Opposition and triangulation
- Corresponding squares theory
Lesson 17 –The intertwined history of artificial intelligence and modern chess software
Adapting classical engines to play Shatranj.
Login required to access full content.
Explores how modern chess engines evolved and how open-source engines can be adapted to historical variants.
- Deep Blue’s brute-force hardware search
- Rybka and the rise of evaluation-centric engines
- Stockfish as an open, community-driven engine
- How Stockfish represents pieces, moves, and rules
- Modifying piece movement (ferz, wazir), evaluation, legality rules
- Building Shatranj-compatible search and evaluation
Lesson 18 – Reinforcement Learning with OpenAI Gym (Rook Pathfinding)
Rook pathfinding and reinforcement learning basics.
Login required to access full content.
Introduces RL concepts using a simple OpenAI Gym–style gridworld based on rook movement.
- Agent–environment loop
- States, actions, rewards, episodes
- Q-learning and ε-greedy exploration
- Rook navigation on an 8×8 board
- Reward shaping and sparse reward issues
- Visualizing policy improvement step-by-step
Lesson 19 – Games Suitable for Reinforcement Learning
Which games can be built using reinforcement learning.
Login required to access full content.
Overview of small, medium, and complex games that students can use to implement RL algorithms.
- TicTacToe, Connect-4, Gridworld
- Snake, Pacman, Othello/Reversi
- Mini-chess and other board variants
- State space vs. reward density considerations
- Matching games with RL methods (Q-learning, MC, DQN, MCTS)
- Choosing project-friendly RL environments
Lesson 20 – Reinforcement Learning: Two-Rook Checkmate
Training an RL agent to perform classical checkmate.
Login required to access full content.
Applies RL to a structured chess endgame where the agent must learn the coordinated 2-rook mating pattern.
- Environment design and state encoding
- Sparse rewards and reward shaping for endgames
- Learning piece coordination and zugzwang patterns
- Progressive improvement through self-play
- Visualizing trajectories toward checkmate
- Bridge to AlphaZero-style self-play and value learning
Lesson 21 – AlphaZero
MCTS, neural networks, and building mini-AlphaZero.
Login required to access full content.
Minimax & Alpha-Beta (bridging classic AI and RL)
- Why pure RL struggles with deep tactics
- Why humans and engines search
- Teach minimax, alpha-beta
- Connect to MCTS logic (search tree with value estimates)
- Very important bridge: AlphaZero = RL + MCTS + neural nets
Introduction to policy/value functions
- States → value
- States → probability distribution over moves
- Explain why tabular methods fail in full chess
- Show that we need function approximation
- Introduce NNEU concept here:
What is NNEU?
– neural network evaluation unit
– a neural net replacing hand-coded evaluation
– outputs value (who is better)
– outputs policy (what moves are likely good)
The students don’t need deep math; only intuition
Deep Q-Learning (DQN) with simple games
- Use Snake or Catch
- Teach replay buffer, target network
- Show why DQN does NOT work for chess (action space too large), preparing AlphaZero.
Policy gradient & actor-critic basics
(Short overview, not too mathematical)
- Policy gradient: learn policy directly
- Actor-critic: policy (actor) + value estimate (critic)
- Prepare students for AlphaZero’s architecture (policy + value output).
Monte Carlo Tree Search (full lesson)
- Expand nodes
- Simulate
- Backup values
- Choose action using visit counts
- Show how policy prior improves MCTS
- Show how MCTS improves the policy network → the AlphaZero training loop emerges
Putting it all together: the AlphaZero algorithm
- Self-play generates games
- MCTS guided by neural net creates improved policy
- Neural net trained on (state, policy_targets, value)
- Iteration of self-play → training → stronger MCTS → stronger games
- Show how AlphaZero solves simple mini-chess (4×4, 5×5)
- Connect back to your 2-rook checkmate lesson
Students now understand:
– how RL can solve small tasks
– why full chess needs powerful NNEUs, MCTS, and self-play
Build a mini AlphaZero for Connect-4 or MiniChess
- Connect-4 board is perfect for classroom AlphaZero demo
- Implement:
– neural net (small CNN or MLP)
– MCTS
– self-play training
Lc0 is a direct open-source implementation inspired by DeepMind's AlphaZero project, and it has far exceeded its success in chess.
https://lczero.org/
Popular Events & News
Creative Teaching Seminar Master Class
Lorem ipsum dolor sit amet consectur adipiscing elit, sed do eiusmod tempor incididunt ut labore...
- Ontario City, Canada
Digital Arts & Reshaping the Future with AI
Lorem ipsum dolor sit amet consectur adipiscing elit, sed do eiusmod tempor incididunt ut labore...
- Newyork City, USA
Online Presentation on PowerPoint 2027
Lorem ipsum dolor sit amet consectur adipiscing elit, sed do eiusmod tempor incididunt ut labore...
- Ontario City, Canada



