Posts

A Thousand Futures: MPPI Control, a Drone, and the Temperature Trap

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

FELN: proving that a predicted map query is right on every database

Image
I want people to ask questions about their geographic data in plain text: "find suspended wells within 5 km of an oil pipeline". A model reads the question and writes a query. Then the query runs on the data. The hard part is not the model. The hard part is the measurement. If I cannot measure a model, I cannot tune it. This post is about how I measure it, and about a new piece: a checker that Lean proves correct. The code is at github.com/mraad/feln . It is a Python library with a command-line tool. It needs Python 3.11+, and it does not need GDAL or ArcGIS. Why not let the model write SQL SQL is the obvious target. But two SQL texts are hard to compare. depth > 100 and 100 < "DEPTH" are the same test. A text diff says that they are different. An exact-match score then calls a correct answer wrong. So I made a smaller target. I call it FELN, "Find Existing Location with N layers". A FELN query is JSON with three lists: { "layers"...

Should the foundation model replace the traditional way, or complement it, or be used together?

Image
I use Geographically Weighted Regression (GWR) in ArcGIS a lot. It fits a small weighted model around each location, so each location gets its own coefficients. A map of those coefficients often tells me more than the prediction does. Then the foundation models for tables and time series arrived. You give one a table of rows with known answers. It predicts the answer for new rows in one pass, with no training. So I had a plain question: do I replace GWR with a foundation model, do I keep GWR and add the model, or do I use the two together? I tested it. The short answer is "together". The rest of this post shows why. The code and the saved results are public at github.com/mraad/geo-fm . The two ways The traditional way is the set of spatial statistics tools in ArcGIS: GWR, Forest-based and Gradient Boosted regression, kriging, and Emerging Hot Spot Analysis. Each tool has a model of space built in. The foundation model has no model of space. It is trained one time, on a v...