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.

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.

  1. Partial derivatives and gradients: predict a multivariable change

    Find the direction of local cost change and account for coordinate scales.

  2. Gradient descent: learn the update, then test its limits

    Apply an update and see how the step size changes convergence.

  3. Hessians: measure curvature in every direction

    Inspect curvature and distinguish a minimum from other stationary points.

  4. ICP algorithm explained: align two scans step by step

    Alternate matching and rigid fitting, then compare residuals with known alignment error.

Browse all 10 lessons below

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. 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.

  10. 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.