Search, game playing, learning from rewards, image generation, recommendations, forecasting and sound, each in a few lines of plain Python you can step through.
AI · beginner · 7 lessons · 58 min · free
What you'll learn
Find shortest paths with A* and play games with minimax
Watch a robot learn from rewards with Q-learning
See how diffusion turns noise into images
Build a recommender, a forecast and a pitch detector
Before you start
Basic Python: lists, loops and functions
Lessons
Search and Games
Classic AI: finding routes and choosing moves.
A* Search: Finding the Shortest Path: Maps, games and robots all need to find routes. A* always explores the most promising place next: the distance so far plus a guess of the distance left.
Minimax: Thinking One Move Ahead: Game-playing AI assumes the opponent plays well. For each move, find the worst reply you could face, then pick the move whose worst case is best.
Learning from Rewards
Reinforcement learning: no answers, only rewards.
Q-Learning: Learning from Rewards: Nobody tells the robot the right moves. It only gets a reward at the goal, and over a few tries the value of that reward flows backwards along the corridor.
Generating Images
How image generators create pictures from noise.
Diffusion: Making Images from Noise: Image generators learn one skill: spotting the noise in a noisy picture. Mix noise into a tiny 4-pixel image, then remove it step by step.
Everyday AI
Recommendations, forecasts and sound.
Recommenders: People Like You Liked This: Streaming and shopping sites suggest things by finding people whose tastes match yours. Compare ratings, find the closest viewer, and recommend what they loved.
Time Series: Forecasting Tomorrow: Sales, temperatures and traffic change over time. A moving average smooths out the wiggles, and adding the trend gives a forecast for tomorrow.
Sound as Numbers: Where Speech AI Starts: A microphone measures air pressure many times a second. Sample a simple wave, and find its pitch by counting how often it rises through zero.
Related courses
Machine Learning from Scratch: How machines learn from data, built from plain Python on tiny datasets so you can watch every number change. No libraries, no black boxes. (13 lessons, 2 h 25 min)
AI Agents and RAG: Build Them Step by Step: How retrieval-augmented generation and AI agents really work, built from small Python programs: embeddings, chunking, vector search, grounded answers, the agent loop, memory, planning, multi-agent routing, guardrails and MCP. Watch every score, tool call and decision as it happens. (16 lessons, 1 h 50 min)
How AI Language Models Work: Tokens, embeddings, attention, training, RAG and agents, each built in a few lines of plain Python so you can watch every number. No libraries, no black boxes. (20 lessons, 2 h 51 min)