locuslab / mpc.pytorch

A fast and differentiable model predictive control (MPC) solver for PyTorch.
https://locuslab.github.io/mpc.pytorch/
MIT License
872 stars 146 forks source link

This MPC may supply a suboptimal solution #35

Closed Roythuly closed 3 years ago

Roythuly commented 3 years ago

I try the task of Pendulum-v0. Here is an interesting scene: the moment switches the direction when the stick is at the bottom other than when the stick falls. But, a better solution is that the direction of the moment is always the same as the speed direction of the stick. When the stick falls, the moment should change the direction immediately. Thus, I have a question about the optimal property of this MPC solution. image

Roythuly commented 3 years ago

Sorry, I am wrong. If I give enough horizon, it can also supply a better solution.