Learning library
Optimization
Optimization turns a goal into an update rule. These lessons work through gradient descent, least squares, and the constrained problems that appear when a robot must respect its joint limits.
10 lessons, in library order. Search within optimization.
Start here
Choose an update and check its result
Follow how a cost function guides updates, then test whether a smaller fitting cost gives the right robot pose.
- Partial derivatives and gradients: predict a multivariable change
Find the direction of local cost change and account for coordinate scales.
- Gradient descent: learn the update, then test its limits
Apply an update and see how the step size changes convergence.
- Hessians: measure curvature in every direction
Inspect curvature and distinguish a minimum from other stationary points.
- ICP algorithm explained: align two scans step by step
Alternate matching and rigid fitting, then compare residuals with known alignment error.
Foundations / 8 min read
Gradient descent: learn the update, then test its limits
Work through gradient descent by hand, then explore learning rates, overshoot, and stationary points in an interactive experiment with Python and exercises.
Foundations / 13 min read
Partial derivatives and gradients: predict a multivariable change
Hold one input fixed to find a partial derivative, combine the partials into a gradient, and compare a directional derivative with the actual change from a finite step.
Foundations / 11 min read
Hessians: measure curvature in every direction
Differentiate a gradient to build the Hessian, calculate directional curvature, and classify stationary points. Explore coupled quadratics, saddles, and the limits of zero eigenvalues.
Foundations / 11 min read
Dijkstra’s algorithm: find the lowest-cost route
Trace Dijkstra’s algorithm through a weighted grid, update route estimates, and see why the goal must leave the priority queue before its cost is final. Reproduce a complete search in Python.
Foundations / 12 min read
A* search: guide the search with a lower bound
Use A* to find a low-cost route across a weighted grid. Calculate g, h, and f, compare Manhattan distance with Dijkstra, and see how an overestimate can return a worse path.
Foundations / 12 min read
RRT*: improve a path by rewiring the tree
Follow RRT* as it chooses cheaper parents, rewires nearby nodes, and updates every descendant's cost. Compare the first path with later improvements and understand what asymptotic optimality does and does not promise.
Foundations / 13 min read
Dubins paths: shortest routes with a turning limit
Connect two robot poses with forward motion and a minimum turning radius. Compare all six Dubins path families, calculate arc lengths, and see why matching position alone misses the heading constraint.
Foundations / 12 min read
Reeds–Shepp paths: shortest car routes with reverse gear
Add reverse travel to a car with a minimum turning radius. Read signed motion primitives, calculate a three-arc turnaround, and compare complete Reeds–Shepp solutions with forward-only Dubins paths.
Foundations / 13 min read
ICP algorithm explained: align two scans step by step
Learn how ICP aligns two point sets. Step through the lab, download the same data and Python solver, and compare a correct fit with misleading residuals.
Foundations / 12 min read
LQG control: connect a Kalman estimate to LQR feedback
Control a cart from noisy position readings. Connect Kalman filtering to LQR, compare matched disturbances, and test what changes when the model is wrong.