Skip to content
Email: [email protected]
Login/Register
Apply Teacher
LMS for shatranj.aiLMS for shatranj.ai
  • Home
  • Curriculum
  • About Us
  • Contact Us
LMS for shatranj.aiLMS for shatranj.ai
  • Home
  • Curriculum
  • About Us
  • Contact Us
  • Home
  • Course
  • AI Curriculum Based on Historic Board Games

AI Curriculum Based on Historic Board Games

  • By shatranj
  • Artificial Intelligence
    (0.0/ 0 Rating)
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
Breadcrumb Abstract Shape
  • Description
  • Curriculum
download.png

Course Description:

This course guides students through the fascinating journey from classical Shatranj (ancient chess) to modern chess AI engines. It starts with Python programming, Object-Oriented Programming (OOP), and control flow, then gradually moves into chess puzzles, Horse Tour, Eight Queens, Minimax & Alpha-Beta, and Suli’s Diamond by teaching  various chess AI algorithms.

In the advanced sections, students will explore Reinforcement Learning, Deep Q-Learning, Policy Gradient, Monte Carlo Tree Search, and the architecture behind AlphaZero. They will also learn how to customize Shatranj-compatible AI engines and implement self-play training on MiniChess and Connect-4 projects.

By the end of this course, students will be able to:

  • Create games and AI simulations using Python and OOP

  • Apply Minimax, Alpha-Beta pruning, and adversarial search techniques

  • Solve chess puzzles like Knight’s Tour and Eight Queens

  • Understand Reinforcement Learning and AlphaZero architecture

  • Build their own MiniChess or Connect-4 AI projects

Who this course is for:

  • Chess enthusiasts curious about AI

  • Students eager to learn Python programming

  • Anyone interested in game theory and Reinforcement Learning

Section 1: Foundations & Python Basics (Lessons 1–6)

  • 1
    Lesson 1 – Project and Curriculum Scope and Priorities
    2h

    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
  • 2
    Lesson 2 – Introduction to Computing & Python Setup
    3h

    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
  • 3
    Lesson 3 – Python Data Types
    3h

    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
  • 4
    Lesson 4 – Conditionals, Loops, Control Flow
    3h

    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
  • 5
    Lesson 5 – Functions, Scope, Lambda
    3h

    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)
  • 6
    Lesson 6 – Files, Exceptions, Libraries, Testing
    3h

    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

Section 2: Object-Oriented Programming & Board Game Modeling

  • 7
    Lesson 7 – OOP, Classes, TicTacToe
    3h

    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

Section 3: Chess Foundations & Engine Code

  • 8
    Lesson 8– Chess & Shatranj Board Representation
    2h

    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
  • 9
    Lesson 9– Piece Movement, Game State Updates, and Terminal Conditions
    2h

    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

Section 4: Classical and Adverserial Search Algorithms

  • 10
    Lesson 10– Search Problems and Graph Traversal (DFS, BFS, UCS)
    3h

    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
  • 11
    Lesson 11 – Heuristic Search and Adversarial Game Trees (A*, minimax, expectiminimax, alpha–beta)
    3h

    Recursion, backtracking, and heuristic solutions.
    Login required to access full content.

    • Search problem structure

    • DFS, BFS, UCS

    • A* and heuristics

    • Minimax introduction

    • Expectiminimax

    • Pacman/chess examples

    • Graph-tracing exercises

    • Alpha-Beta

Section 5: Solving Ancient Chess Puzzles with AI algorithms

  • 12
    Lesson 12 – Horse Tour
    3h

    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
  • 13
    Lesson 13 – Eight Queens Puzzle
    3h

    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
  • 14
    Lesson 14 – Wheat & Chessboard Problem, Rook Polynomials, Smullyan and other Logic Puzzles, Magic Squares
    2h

    Exponential growth and classic logic puzzles related to the chessboard
    Login required to access full content.

    • Chess origin story: Wheat and the chessboard

    • Rook Polynomials

    • Smullyan logic puzzles and retroanalysis

    • Magic Squares

  • 15
    Lesson 15 – Minimax, Alpha-Beta, Heuristics, Mate Search, and Rumi and Dilaram Mates
    3h

    Advanced search, pruning, and checkmate logic.
    Login required to access full content.

    • Deep adversarial search and chess endgames.
    • Minimax computation
    • Alpha-beta pruning
    • Opposition, triangulation
    • Historical sources (Al-Adli er-Rumi, Rumi's mate from Alfonso's book and Kitab ash-Shatranj)

Section 6: Dynamic Programming

  • 16
    Lesson 16 – Suli’s Diamond (Historic Endgame Study) - Dynamic Programming
    6h

    Login required to access full content. Please download the zipped folder under the materials tab to access the lesson contents

    Summary:
    Historic chess endgame analysis and its solution with dynamic programming

    Topics:

    • Al-Suli biography
    • Suli's diamond endgame study which remained unsolved for over 1000 years
    • Dynamic Programming
    • Chess/shatranj endgame tablebase construction

     

Section 7: The intertwined history of artificial intelligence and modern chess software

  • 17
    Lesson 17 – Stockfish as Modern Chess AI Software
    6h

    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

Section 8: Reinforcement Learning

  • 18
    Lesson 18 – Reinforcement Learning Foundations: Gridworld, Dynamic Programming, and Complexity
    2h

    Introduces reinforcement learning (RL) by solving a small gridworld exactly when the rules are known, then shows why this “all‑knowing” approach breaks for large games like chess.

    ·         Agent–environment loop; states, actions, rewards, episodes; discount factor γ.

    ·         Policy evaluation (“drifting robot”) and value iteration (“treasure hunter”) using Bellman backups.

    ·         Visual value propagation and deriving an optimal policy from the value function.

    ·         The curse of dimensionality: state‑space vs game‑tree complexity; Shannon number motivation.          

    ·         Historical “giant games” (e.g., Tamerlane chess, Go) as context for why learning is needed.

    Login required to access full content.

  • 19
    Lesson 19 – The Frozen Rook: Tabular Q-Learning on FrozenLake
    2h

    Moves from planning to learning: the agent starts with no map and learns a policy by trial and error using tabular Q-learning.

    Login required to access full content.

    ·         Formulate FrozenLake/Frozen Rook as an MDP: S, A, R, P, terminal states, γ.

    ·         Q-learning update rule and ε-greedy exploration (exploration→exploitation schedule).

    ·         Train an agent in Gymnasium FrozenLake; compare deterministic vs slippery transitions.

    ·         Inspect what was learned via Q-table heatmaps / policy arrows; tune α, γ, ε and episode counts.

    ·         Scaling lessons: sparse rewards, delayed credit, and why larger maps are harder.

  • 20
    Lesson 20 – Two Rooks vs Lone King: Learning Checkmate with Temporal-Difference Q-Learning
    3h

    Applies Q-learning to a small chess endgame and makes the RL codebase “real” by separating the experiment notebook from the learning and training modules.

    Login required to access full content.

    ·         Temporal-Difference (TD) learning: identify the TD error inside the Q-learning update; why TD updates during play.

    ·         Why Monte Carlo learning is too slow for chess-like, delayed-reward games.

    ·         Engineering stack: rl.py (Q-memory + TD update), trainer.py (episode loop, exploration schedule), notebook as the lab.

    ·         Encode chess positions as machine-readable state (FEN) and train a tabular agent on a bounded endgame/puzzle state space.

    ·         Limits: why tabular methods fail for full chess (curse of dimensionality) and the need for function approximation.

  • 21
    Lesson 21 – Deep Q-Networks: From Q-Tables to Neural Networks
    3h

    Introduces function approximation for RL by replacing the Q-table with a neural network (DQN) and applying it to several small board games.

    Login required to access full content.

    ·         Why Q-tables don’t scale: too many states; generalization requires a model that can “guess” values for unseen positions.

    ·         Deep Q-Network (DQN) training loop: replay buffer, target network, mini-batch updates, ε-decay.

    ·         Implement and experiment with DQN on games such as Connect-4 (4Connect), Fox & Hounds, and Othello/Reversi.

    ·         Diagnostics: learning curves, stability issues (overestimation, divergence) and practical mitigations.

    ·         Compare approaches: DQN vs NNUE-style evaluation and handcrafted evaluation (HCE) to discuss architecture tradeoffs.

    • 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/

  • 22
    Lesson 22 - Monte Carlo Rollouts and MCTS on Qirkat
    3h

    Builds a complete Qirkat environment and then progresses from random rollouts to full Monte Carlo Tree Search (MCTS) with UCT selection.

    ·         Implement Qirkat rules backbone (5×5 board, C3 empty) and the maximum-capture rule that forces capture sequences.

    ·         Move generation that enumerates capture lines, enforces compulsory capture, and filters to maximum-length captures.

    ·         Monte Carlo baselines: random rollouts and flat Monte Carlo move evaluation before adding tree reuse.

    ·         MCTS pipeline: selection, expansion, rollout/evaluation, backpropagation; UCT/visit-count final move choice.

    ·         Reproducible game logs and audit tooling for step-by-step playback and debugging.

Section 9: AlphaZero

  • 23
    Lesson 23 – AlphaZero on Reversi / Othello
    3h

    Develop AlphaZero on Othello game and have it play vs minimax with heuristic opponent at progressively deeper difficulties

  • 24
    Lesson 24 – AlphaZero on Qirkat: PUCT, Policy/Value Nets, and Self-Play
    6h

    Upgrades MCTS into AlphaZero-style search by adding a neural network that supplies a policy prior and a value estimate, then trains through self-play.

    Login to access full curriculum

    ·         Bridge intuition with a tiny ‘Connect2’ AlphaZero demo, then transfer the ideas to Qirkat.

    ·         Replace UCT with PUCT: combine visit statistics with a learned policy prior to guide exploration.

    ·         Neural network heads: policy (move probabilities) and value (position evaluation) used in place of random rollouts.

    ·         AlphaZero loop: self-play → training targets (π, z) → network update → repeat; evaluate via tournament matches/logs.

    ·         Path-aware move encoding for variable-length capture sequences so different capture paths remain distinct.

  • 25
    Lesson 25 – Turkish Checkers (Dama): Alpha-Beta, PUCT-guided MCTS, Alpha Zero
    6h

    Implements Turkish Checkers and compares classical search (alpha–beta) with MCTS using a reusable match runner and batch simulation logs.

    ·         Game engine: board representation, legal moves with multi-jump captures, and move-path encoding.

    ·         Evaluation function plus Negamax/Alpha-Beta search agent; depth vs strength tradeoffs.

    ·         MCTS agent for Turkish Checkers and head-to-head comparisons against alpha–beta.

    ·         Universal match runner (play_game) and batch simulation utilities for reproducible experiments.

    ·         Exportable logs (zipped) for classroom review and debugging.

  • Price:
Enroll course
Free

Share On:

C0797390-C026-41D4-BD48-9E4ACD15E273

Shatranj.AI connects ancient game wisdom with modern AI learning—promoting culture, creativity, and future-ready skills

About shatranj

  • Our Mission
  • Project Overview
  • Erasmus-ka2-program
  • Partners
  • AI in Education
  • Shatranj-international

AI Curriculum

  • My account
  • About Us
  • Contact Us
  • shatranj Event
  • Become Teacher
  • Blog

Contacts

Enter your email address to register to our newsletter subscription

Icon-facebook Icon-linkedin2 Icon-instagram Icon-twitter Icon-youtube
Copyright 2026 Shatranj.ai All rights reserved.
Sign In
Remember me
Sign In Sign Up
Restore password
Send reset link
Password reset link sent to your email Close
Confirmation link sent Please follow the instructions sent to your email address Close
Your application is sent We'll send you an email as soon as your application is approved. Go to Profile
No account? Sign Up Sign In
Lost Password?
LMS for shatranj.aiLMS for shatranj.ai
Sign inSign up

Sign in

Don’t have an account? Sign up
Lost your password?

Sign up

Already have an account? Sign in