In words
What it is, why it matters, and what it is like.
Why am I learning this?
Optimal control teaches you how to make a series of decisions where each choice changes the situation for the next one. You encounter this every day when balancing competing needs over time: deciding how much to save versus spend this month so you can retire comfortably, or pacing your energy during a long project so you finish strong without burning out. Unlike simple planning, which picks one best path in advance, optimal control handles the reality that things go wrong and conditions change. It gives you the tools to keep adjusting your course while staying focused on the final goal. This is the mathematical backbone behind how self-driving cars navigate traffic, how robots adapt to unexpected obstacles, and how AI systems plan actions step-by-step under uncertainty.
The idea, in plain terms
Imagine you are driving from Delhi to Mumbai with a limited tank of petrol. You want to arrive quickly, but you also want to avoid exhausting yourself or running out of fuel halfway through. Every moment you steer left or right, press the accelerator, or lift your foot off the gas, you are making a 'control' decision. This set of instructions—how to drive based on where you are—is your 'policy'.
The key difficulty is that what you do now affects what you can do later. If you drive at 100 km/h to save time, you use petrol faster. You might save two hours on the road, but lose three more than half an hour because of a detour to find a gas station in Pune. If you slow down to 60 km/h to conserve fuel, you might hit peak traffic and arrive late.
Optimal control is the study of finding that specific policy where the total outcome—time, fuel, comfort—is as good as possible. It requires looking ahead. You don't just ask 'what is the best move right now?'; you ask 'what move right now leaves me in the best position for all the moves that follow?'. If traffic suddenly appears near Pune, a rigid plan fails. An optimal control strategy continuously weighs your current speed against remaining fuel and distance to decide if slowing down now prevents a worse delay later.
An analogy
Think of navigating a large ship across the Indian Ocean to reach a port on time and with minimal fuel. The 'controls' are the throttle (engine power) and the rudder (steering angle). The 'state' is the ship's current position and speed.
If you plot a perfect line on a map before leaving, storms or strong currents will push you off course. By the time you notice the drift, you might be miles from your planned arrival point, facing headwinds that require much more fuel to overcome. A simple plan fails because it ignores how the environment reacts to your movement.
The smart captain uses a strategy called 'feedback control'. Every hour, the captain looks at where the ship actually is (the current state), compares it to where the ship *should* be (the goal), and calculates a small adjustment to the rudder and throttle. This immediate correction keeps the ship on track despite the chaos of the ocean. Underlying this is 'model predictive control': the captain uses a mental model of how currents work, solves a short-term problem for the next hour, executes that plan, sees where the wind actually blows them, and then solves a new short-term problem for the next hour. This cycle of predict-act-check-adjust repeats until the port is reached.
Definition
Optimal control is the method of selecting a sequence of actions over time to achieve the best possible outcome, given that each action changes the current state of the system (its 'dynamics') and influences future possibilities.
Where this sits
This sits beside your notes on Optimization, which focus on finding the best value at a single point in time; optimal control extends this idea across a timeline. It also connects to Gradient Descent, where you adjust parameters to reduce error; in optimal control, the 'parameters' are the actions you take at every moment, and the error is the total cost accumulated over the entire journey.