WHAT: treat guidance as plain supervised regression. Generate many optimal trajectories offline with a trusted optimizer; each timestep gives a (si,ai⋆) pair. Fit a net to reproduce a⋆.
WHY it works: the optimizer already knows the right answer; we only need a fast approximator of the map s↦a⋆. We are compressing a lookup-into-solver into weights.
HOW — derive the loss from first principles.
We want πθ(s)≈a⋆(s). "Approximate" means minimize expected squared error over the state distribution ρ we'll actually see:
J(θ)=Es∼ρ[∥πθ(s)−a⋆(s)∥2].
Why squared error? Under a Gaussian noise model a⋆=πθ(s)+ε,ε∼N(0,σ2I), maximizing the log-likelihood of the data gives exactly −2σ21∑∥ai⋆−πθ(si)∥2+const. Dropping constants, MLE is least squares. With N samples the empirical loss is
Proportional Navigation commands acceleration ac=NVcλ˙ (navigation gain N, closing speed Vc, LOS rate λ˙). A well-trained net should recover PN-like behavior on nominal engagements — a great Forecast-then-Verify test: predict "the net's command scales linearly with λ˙," then plot net output vs λ˙ and check the slope ≈NVc.
Imagine steering a rocket toward a target is like catching a ball. A pro (the optimizer) knows exactly how to move, but he thinks slowly. You watch him play thousands of games and copy his moves until you can react instantly without thinking — that's imitation learning. Or, nobody teaches you, but every time you catch the ball you get a candy and when you miss you get nothing; over many tries your brain learns which moves earn candy — that's reinforcement learning. Either way, the rocket ends up with fast "instincts" (the neural net) baked in before flight.
A policy πθ:s↦a (usually a neural net) mapping vehicle state to a command, with θ trained offline instead of the law being derived analytically.
Why prefer a learned law onboard over solving the optimization in flight?
Inference is one cheap forward pass (µs) vs. seconds for an optimal solver; it amortizes expensive optimization into weights for slow, power-limited flight computers.
Behavioral Cloning loss and why squared error?
J^=N1∑∥πθ(si)−ai⋆∥2; squared error = MLE under Gaussian action noise.
What failure mode does naive Behavioral Cloning suffer?
Distribution/covariate shift — the policy visits states the expert never showed, errors compound. Fixed by DAgger.
What does DAgger do?
Runs the current policy, queries the expert on the newly visited states, adds those pairs, retrains — aligning training data with policy-induced state distribution.
State the REINFORCE policy gradient.
∇θJ=E[∑t∇θlogπθ(at∣st)R(τ)].
Why do the environment dynamics drop out of the policy gradient?
In logpθ(τ) the transition terms logP(st+1∣st,at) don't depend on θ, so their gradient is zero — RL needs no plant model.
Purpose of a baseline in policy gradient?
Reduces variance without introducing bias since E[∇logπθ⋅b]=0.
Proportional Navigation command formula?
ac=NVcλ˙ (nav gain N, closing speed Vc, LOS rate λ˙).
Two useful engineered state features for guidance nets?
Time-to-go tgo=R/Vc and LOS rate λ˙=(y˙x−x˙y)/(x2+y2).
Dekho, GNC ka matlab hai Guidance, Navigation aur Control — yaani rocket ya missile ko decide karna padta hai ki "kis direction mein, kitna zor lagाun" har second. Classical tareeka yeh hai ki har instant pe ek optimization solve karo ya proportional navigation jaisa hand-derived formula lagao. Problem: flight computer slow hota hai, radiation-hardened, power limited. Optimal solver seconds le sakta hai — flight mein itna time nahi hai.
Isliye learned guidance law ka idea aata hai: ek neural network πθ ko pehle se, ground pe, train kar lo — state (position, velocity, time-to-go, LOS rate) daalo, command bahar aaye. Flight mein bas ek forward pass, microseconds mein kaam khatam. Do main tarike: Behavioral Cloning (BC) — ek expert optimizer ke jawab copy karo, simple supervised regression, loss squared error; aur Reinforcement Learning (RL) — reward do (kam miss-distance, kam fuel) aur net khud try-and-learn kare, expert ki zaroorat nahi.
Ek bada trap yaad rakhna: seedha BC copy karne se distribution shift hota hai — net apni hi galtiyon se aise states mein pahunch jaata hai jo expert ne kabhi dikhaye hi nahi, aur error compound hota jaata hai. Iska ilaaj hai DAgger: apni policy chalao, jo naye states aaye unpe expert se poocho, dataset mein daalo, phir se train karo. RL mein sabse important insight yeh hai ki policy gradient ∇θJ=E[∑∇logπθ(at∣st)R] mein dynamics cancel ho jaati hain — isliye plant model na pata ho tab bhi RL kaam karta hai.
Verify karne ka mazedaar tareeka (Forecast-then-Verify): predict karo ki trained net ka command LOS rate ke saath linearly badhega slope ≈NVc ke saath, phir plot karke check karo — agar match hua to net ne PN-jaisa behavior seekh liya, bas actuator limits ke saath. Yahi 80/20 hai: features tgo aur λ˙ hi zyaadatar signal carry karte hain.
Test yourself — Machine Learning (Aerospace Applications)