Learning outcomes
- Define an MDP and a discounted return.
- Implement a small tabular Q-learning baseline.
- Distinguish termination, time limits, and reward design.
Prerequisites: Linear algebra, ODEs, and earlier lectures in this sequence.
The control problem as an MDP
A Markov decision process specifies state, action, transition, reward, and termination. A policy maximizes expected discounted return,
A reward
Bellman backup
For a tabular action-value estimate,
The practice uses a deliberately small finite-state regulation problem. Q-learning can then be implemented and inspected directly, without a neural network or an unverified claim of learning robot locomotion.
Worked update
Take
This difference is large enough to affect behavior near resets. Unit-test terminal transitions before interpreting a reward curve.
Exploration and evaluation
An epsilon-greedy policy explores during training. Evaluation freezes the policy and disables exploratory action noise unless robustness to that noise is explicitly being tested. Keep independent random generators for training and final evaluation. Compare with a hand-designed controller and a random policy under the same task definition.
Report success, state error, constraint violations, environment transitions, and wall time. A high return can reflect a poorly specified reward. For example, a robot rewarded only for staying alive may stand still when the intended task is locomotion.
Extension to robots
Continuous state and action spaces motivate function approximation, actor-critic methods, and policy-gradient methods. Batched simulation accelerates data collection, but does not resolve observation design or sim-to-real mismatch. These are extension topics, not capabilities claimed by the tabular baseline.
Exercise: Add a reward bonus for moving quickly and inspect whether the policy overshoots its target. Explain the outcome using the objective, rather than calling it a training bug. The CMU and MIT sources provide the next level of optimal-control and learning context CMU optimal control Tedrake, Underactuated Robotics.