KevsRobots Learning Platform
6% Percent Complete
By Kevin McAleer, 5 Minutes
Page last updated June 13, 2026

Ahoy there makers! What if your robot could figure things out on its own?
Most robots we build follow instructions we wrote: βgo forward, if distance < 20 cm then turn rightβ. That works brilliantly when we know exactly what the environment looks like. But real floors are messy β furniture shifts, a dog wanders through, someone leaves a bag in the hallway. Hardcoded routines break down fast.
Reinforcement Learning (RL) is a completely different approach. Instead of telling the robot what to do, we set up a reward signal and let the robot work out the best strategy through trial and error. The same idea that trains game-playing AIs to beat world champions also works beautifully at the maker scale β using nothing more exotic than a Python dictionary.
In this course youβll build a differential-drive robot (BurgerBot-style: two DC motors and an HC-SR04 ultrasonic sensor on a Raspberry Pi Pico) and teach it to navigate an obstacle field without a single hardcoded rule. Youβll train the policy in a pure-Python simulation on your laptop, then drop the learned βbrainβ onto the Pico as a JSON file.
This course teaches tabular Q-learning β the clearest and most approachable form of reinforcement learning. Youβll understand exactly what happens at every step because there are no black-box layers: just a table of numbers, a handful of Python functions, and a robot that genuinely gets better with practice.
The mathematics is deliberately kept accessible. Any formula that appears is first written as a commented Python expression so you can read it line by line.
After completing this course, you will:
For lessons 1β10 (simulation, runs on your laptop):
For lessons 11β13 (Pico deployment):
If youβve already built a robot for the MicroPython Robotics Projects course, that hardware is perfect for this course too.
This course assumes youβre comfortable writing Python functions and using loops and dictionaries. If youβd like a refresher:
You do not need any prior machine-learning experience. We build everything from first principles.
Each lesson focuses on one new concept and connects it to the running project. Code blocks are complete and runnable. Where a mathematical idea appears (like the Q-learning update rule), it is shown first as a commented Python expression β read the comments and the code together and the maths will make sense.
Lessons in the final module include full MicroPython files you can copy directly to your Pico. The simulation lessons (1β10) run with a plain python3 filename.py command β no installation steps needed.
Look for these callout styles throughout:
Note: background context or a reminder about something covered earlier.
Tip: a practical suggestion for making things work better.
Warning: something that commonly goes wrong and how to avoid it.
Letβs build a robot that can learn!
You can use the arrows β β on your keyboard to navigate between lessons.
Comments