Model Predictive Control in the Browser with WebAssembly
91 points
7 days ago
| 5 comments
| garethx.com
| HN
HammadB
23 minutes ago
[-]
I've taken the linked Russ Tedrake class and have to say I loved this. Please make more!
reply
mjburgess
10 hours ago
[-]
I'd be interested, if any one had suggestions, on MPC applied to ML/AI systems -- it seems this is an underserved technique/concern in MLEng, and I'd expect to see more on it.
reply
lagrange77
5 hours ago
[-]
There is a big overlap between Optimal Control and Reinforcement Learning, in case you didn't know.

Also Steve Brunton does a lot on the interface between control theory and ML on his channel: https://www.youtube.com/channel/UCm5mt-A4w61lknZ9lCsZtBw/pla...

reply
szvsw
3 hours ago
[-]
Another thing to keep in mind is that having AI/ML surrogates which can evaluate expensive functions faster can also be integrated as an information source in model predictive control algorithms.
reply
lagrange77
3 hours ago
[-]
Exactly. ML models such as autoencoders can also be used for reduced order modeling / dimensionality reduction e.g. for MPC of fluid systems.
reply
currymj
4 hours ago
[-]
there's a lot of work in the broad area. most of it doesn't engage with the classical control theory literature (arguably it should).

some keywords to search for recent hot research would be "world model", "decision transformer", "active inference", "control as inference", "model-based RL".

reply
gxcode
9 hours ago
[-]
Author of the post here - happy to answer any questions.
reply
beltranaceves
8 hours ago
[-]
Great job! I'm working in a similar blog post and it was fun seeing how you approached it. I was surprised the wasm implementation is fast enough, I was even considering writing webGpu compute shaders for my solver
reply
philzook
8 hours ago
[-]
Beautiful stuff, great post!
reply
gxcode
8 hours ago
[-]
Thank you, really appreciate that.
reply
klowrey
10 hours ago
[-]
Here's a (hacky) demo of MPC using MuJoCo in the browser: https://klowrey.github.io/mujoco_wasm/

I hacked it using MPPI and it only works on the cartpole model so as to not have to dwell in Javascript too long; just click the 'MPPI Controller' button and you can perturb the model and see it recover.

reply
tantalor
10 hours ago
[-]
I love this kind of stuff because it seems like a roughly equal blend of art, science, and engineering.
reply