Classical AI and Robotics Tutorial
Learn Classical AI and Robotics step by step: 46 lessons in 11 chapters with examples, quizzes, diagrams and projects.
Start learning →
of lessons completed
Intelligent Agents
- What Is Classical AI? Understand classical AI: how symbolic, statistical and deep learning approaches differ, a short history with AI winters, and what search, logic and planning still do best.
- Agents and Environments Learn what an intelligent agent is: percepts, actions, agent function versus program, rational behavior, performance measures, PEAS descriptions and a runnable vacuum agent.
- Types of Environments and Agents Classify task environments (observable, deterministic, episodic, static, discrete, multi-agent) and compare reflex, model-based, goal-based and utility-based agents in Python.
- Multi-Agent Systems Learn how several agents share a world: cooperation vs competition, communication, contract net task allocation, auctions, voting and Nash equilibria, with Python.
Uninformed Search
- Formulating Search Problems Learn to define a search problem: states, actions, transition model, goal test and path cost. Build a reusable Python Problem class for route finding and the 8-puzzle.
- Tree Search and Graph Search Build the generic AI search algorithm in Python: frontier, node expansion, explored set and goal test. See why repeated states matter and how to count nodes expanded.
- Breadth-First and Depth-First Search for AI Apply breadth-first and depth-first search to AI problems: completeness, optimality, time and space, solving mazes and the 8-puzzle, and why memory is the real limit.
- Uniform-Cost, Depth-Limited and Iterative Deepening Learn uniform-cost search, depth-limited search, iterative deepening and bidirectional search in Python, then compare them with measured node counts.
Informed Search
- Heuristic Functions Learn what a heuristic is, build misplaced-tiles and Manhattan distance for the 8-puzzle, try greedy best-first search and measure the effective branching factor.
- A* Search Learn A* search step by step: the f = g + h rule, a heapq implementation with path reconstruction, grid maps, the 8-puzzle and why A* is optimal.
- Admissible and Consistent Heuristics Learn admissible and consistent heuristics, dominance, relaxed problems and pattern databases, and test your own heuristics against true costs in Python.
- IDA*, Beam Search and Weighted A* Learn memory-bounded and approximate heuristic search: IDA*, beam search, weighted A* and the idea of RBFS, with measured results on the 8-puzzle.
- Local Search and Hill Climbing Learn local search in AI: hill climbing, local maxima and plateaus, random restarts and the min-conflicts method that solves n-queens, with seeded Python runs.
- Simulated Annealing and Genetic Algorithms Escape local optima with simulated annealing and genetic algorithms: temperature schedules, acceptance probability, crossover, mutation, a travelling salesman demo and tuning tips.
Constraint Satisfaction
- Constraint Satisfaction Problems Learn to model puzzles as constraint satisfaction problems: variables, domains, constraints and constraint graphs, with map colouring, Sudoku and scheduling and a reusable Python CSP class.
- Backtracking Search for CSPs Solve constraint satisfaction problems with backtracking search: assignment-by-assignment search, MRV and degree variable ordering, LCV value ordering and measured backtrack counts.
- Constraint Propagation: Forward Checking and AC-3 Prune CSP domains before and during search: forward checking, arc consistency and the AC-3 algorithm in Python, solving Sudoku, plus path consistency and tree-structured CSPs.
Adversarial Search
- Games and Minimax Learn how AI plays two-player games: game formulation, zero-sum games, game trees and the minimax algorithm, with a perfect tic-tac-toe player and real state and node counts.
- Alpha-Beta Pruning Understand alpha-beta pruning step by step: alpha and beta bounds, a pruning walkthrough, a Python implementation, move ordering measured with node counts and transposition tables.
- Evaluation Functions and Depth-Limited Search Make game search practical: write a heuristic evaluation for Connect Four, cap the search depth, use iterative deepening, and see the horizon effect and quiescence search.
- Expectiminimax and Monte Carlo Tree Search Handle dice with chance nodes and expectimax, then learn Monte Carlo Tree Search: selection, expansion, simulation, backpropagation and UCB1, built and run live on tic-tac-toe.
Logic and Knowledge Representation
- Propositional Logic Learn propositional logic for AI: syntax, truth tables, models, validity, entailment and logical equivalences, with a model checker you can run and extend in Python.
- Inference: Resolution, Horn Clauses and Forward/Backward Chaining Prove things with logic instead of enumerating models: convert to CNF, run resolution, and use forward and backward chaining on Horn clauses, with a wumpus-world example in Python.
- SAT Solving and DPLL Learn the satisfiability problem and write a DPLL solver with unit propagation in Python, encode n-queens as SAT, see the 3-SAT phase transition, and read an overview of CDCL.
- First-Order Logic and Knowledge Bases Move beyond propositional logic: objects, predicates and quantifiers, unification, lifted inference, a Prolog-style rule engine in Python, semantic nets and the limits of logic.
- Knowledge Representation, Semantic Networks and Frames Learn how AI stores knowledge: semantic networks, frames with slots and inheritance, ontologies and production rules, with runnable Python for each.
- Rule-Based and Expert Systems Build a production system and an expert system in Python: working memory, forward and backward chaining, conflict resolution, explanations and certainty factors.
- Types of Reasoning in AI Compare deductive, inductive, abductive, commonsense and non-monotonic reasoning with runnable Python, including default rules and a simple truth maintenance system.
Planning
- Classical Planning with STRIPS and PDDL Learn classical AI planning: states as sets of facts, actions with preconditions and effects, PDDL syntax, the blocks world, and a forward state-space planner in Python.
- Planning Heuristics and Planning Graphs See how planners scale: delete relaxation, h_max, h_add and h_FF heuristics, planning graphs with mutexes, a GraphPlan implementation, partial-order planning and HTN.
- Hierarchical Task Network (HTN) Planning Build a hierarchical task network planner in Python: primitive and compound tasks, methods, preconditions, backtracking decomposition and when HTN beats STRIPS search.
Probabilistic Reasoning
- Probability for AI Learn the probability an AI agent needs: random variables, joint and conditional distributions, Bayes' rule, independence and inference by enumeration, with NumPy code.
- Bayesian Networks Learn Bayesian networks: structure and conditional probability tables, d-separation, exact inference by enumeration and variable elimination, and sampling, with Python code.
- Hidden Markov Models and Filtering Learn temporal reasoning: hidden Markov models, the forward algorithm, Viterbi decoding, Kalman and particle filters, and robot localization in a corridor, in Python.
- Decision Making: Utility, MDPs and Value Iteration Learn decision making under uncertainty: expected utility, Markov decision processes, value iteration, policy iteration and Q-learning, with a runnable grid world in Python.
- Fuzzy Logic and Belief Functions Learn fuzzy sets, membership functions, fuzzy rules and defuzzification, then Dempster-Shafer belief and plausibility, with runnable Python examples.
Robotics
- Introduction to Robotics: Sensors, Actuators and Control Learn how robots sense, plan and act: noisy sensors, the sense-plan-act loop, PID control simulated in Python and a differential-drive motion model.
- Forward and Inverse Kinematics Learn coordinate frames, rotation matrices and homogeneous transforms, then solve forward and inverse kinematics of a 2-link robot arm in Python with a workspace plot.
- Motion and Path Planning: Grids, Potential Fields and RRT Learn robot motion planning in Python: configuration space, A* on occupancy grids, potential fields and their traps, probabilistic roadmaps and RRT with plots.
Projects
- Project: Sliding-Puzzle Solver Build a generic 8- and 15-puzzle solver in Python: solvability check, BFS, A* with two heuristics and IDA*, then benchmark them in a results table.
- Project: Sudoku Solver with CSP Build a Sudoku solver as a constraint satisfaction problem in Python: AC-3 propagation, backtracking with MRV, difficulty benchmarks and hard-instance analysis.
- Project: Connect Four AI Build a Connect Four AI in Python: bitboards, evaluation, alpha-beta with move ordering, iterative deepening, an MCTS opponent and a round-robin tournament harness.
- Project: Robot Maze Navigator Build a simulated robot that senses walls with noisy sensors, localizes itself with a histogram filter, plans with A*, replans as beliefs change, and plots its trace.
Practice and Review
- Practice: Classical AI Exercises Twenty graded exercises with runnable Python solutions covering search, CSPs, games, logic, planning, probability and robotics kinematics.
- Classical AI Interview Questions Thirty classical AI interview questions with short answers: agents, A*, heuristics, CSPs, alpha-beta, logic, planning, probability and robotics, with runnable code.
- Classical AI Cheat Sheet A one-page classical AI cheat sheet: search, heuristics, CSP, games, logic, planning, probability, MDP and robotics formulas, complexity tables and how to pick a method.