A Thousand Futures: MPPI Control, a Drone, and the Temperature Trap
I like control algorithms that I can explain on a napkin, and MPPI is one of them. MPPI stands for Model Predictive Path Integral control. You take a plan, shake it a thousand ways, roll each version through a model, score the futures, and average them with weights. No gradients, no solver, just samples. There is one catch everybody mentions: the temperature, λ (lambda). Set it too high and the average flies into the obstacle. I wanted to see that catch with my own eyes, so I built a small browser demo of a drone in a forest of pillars, with a slider for λ. You can fly it right now in your browser: live demo . The code is on GitHub: mraad/drone-mppi , and the technical documentation is at mraad.github.io/drone-mppi/docs . The algorithm in seven steps The drone is a point mass with position and velocity. The control is acceleration, clamped to ±10 m/s². Every 50 ms, the controller does this: Start with a plan: 30 accelerations, which is 1.5 s at 0.05 s per step. Add rand...