{"id":20469011,"url":"https://github.com/pfnet-research/chainer-differentiable-mpc","last_synced_at":"2026-02-27T19:08:56.953Z","repository":{"id":37226068,"uuid":"213283149","full_name":"pfnet-research/chainer-differentiable-mpc","owner":"pfnet-research","description":"Differentiable MPC in Chainer, developed as part of PFN summer internship 2019.","archived":false,"fork":false,"pushed_at":"2022-08-23T18:05:03.000Z","size":527,"stargazers_count":15,"open_issues_count":4,"forks_count":6,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-10-04T23:34:31.574Z","etag":null,"topics":["chainer","deep-learning","lqr","machine-learning","model-predictive-control","mpc","optimal-control","trajectory-optimization"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pfnet-research.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-07T02:55:48.000Z","updated_at":"2025-08-19T06:24:52.000Z","dependencies_parsed_at":"2022-06-22T05:41:54.370Z","dependency_job_id":null,"html_url":"https://github.com/pfnet-research/chainer-differentiable-mpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/pfnet-research/chainer-differentiable-mpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fchainer-differentiable-mpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fchainer-differentiable-mpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fchainer-differentiable-mpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fchainer-differentiable-mpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pfnet-research","download_url":"https://codeload.github.com/pfnet-research/chainer-differentiable-mpc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fchainer-differentiable-mpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29909311,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T17:28:36.873Z","status":"ssl_error","status_checked_at":"2026-02-27T17:28:20.970Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chainer","deep-learning","lqr","machine-learning","model-predictive-control","mpc","optimal-control","trajectory-optimization"],"created_at":"2024-11-15T14:07:37.312Z","updated_at":"2026-02-27T19:08:56.910Z","avatar_url":"https://github.com/pfnet-research.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Differentiable MPC in Chainer\n\nAttempt to port [mpc.pytorch](https://github.com/locuslab/mpc.pytorch) to [Chainer](https://chainer.org).\n\n**Disclaimer: PFN provides no warranty or support for this software. Use it at your own risk.**\n\nThis software is developed as part of [PFN summer internship 2019](https://preferred.jp/en/news/internship2019/) and the main developer is Shun Arahata.\n\n## Overview of Differentiable MPC\n![overview](images/imitation_overview.png)\n\n## Install\n```\n$ pipenv install\n```\n\n## Dependencies\nThis code has been tested using libraries below:\n* numpy = \"1.17.2\"\n* chainer = \"6.3.0\"\n* jupyter = \"1.0.0\"\n* matplotlib = \"3.1.1\"\n* jupytext = \"1.2.4\"\n* scipy = \"1.3.1\"\n* pathlib = \"1.0.1\"\n* torch = \"1.2.0\"\n\nSee also `Pipfile`.\n\n## Usage\n```\n$ pipenv run python env_dx/make_dataset.py\n$ pipenv run python env_dx/il_exp.py\n```\n\n## Example Result\n![pendulum](images/pendulum_learned_action.gif)\n\n## References\n\n* [1] B. Amos, I. Jimenez, J. Sacks, B. Boots, and Z. Kolter. “Differentiable MPC for End-to-end Planning and Control”\nIn NIPS'18 Proceedings of Advances in Neural Information Processing Systems. \nAvailable: https://arxiv.org/abs/1810.13400 . Experiment code: https://github.com/locuslab/differentiable-mpc\n\n* [2] Yuval Tassa, Nicolas Mansard and Emo Todorov. “Control-Limited Differential Dynamic Programming” ICRA'14 IEEE International Conference on Robotics and Automation. Available: https://homes.cs.washington.edu/~todorov/papers/TassaICRA14.pdf . Code: https://jp.mathworks.com/matlabcentral/fileexchange/52069-ilqg-ddp-trajectory-optimization\n\n* [3] Brandon Amos, and J. Zico Kolter, “OptNet: Differentiable Optimization as a Layer in Neural Networks” In ICML'17 Proceedings of the 34th International Conference on Machine Learning. Available: https://arxiv.org/abs/1703.00443 . Code: https://github.com/locuslab/qpth/ . Chainer-port: https://github.com/msakai/chainer-optnet\n\n* [4] Yuval Tassa, Tom Erez and Emanuel Todorov. “Synthesis and Stabilization of Complex Behaviors through\nOnline Trajectory Optimization” IROS'12 IEEE/RSJ International Conference on Intelligent Robots and Systems. Available: https://homes.cs.washington.edu/~todorov/papers/TassaIROS12.pdf .\n\n## Useful Links\n* [RL — LQR \u0026 iLQR Linear Quadratic Regulator](https://medium.com/@jonathan_hui/rl-lqr-ilqr-linear-quadratic-regulator-a5de5104c750)\n\n* [EE363: Lecture Slides (Lecture by Stephen P. Boyd)](https://stanford.edu/class/ee363/lectures.html)\n\n* [Optimal Control and\nPlanning, CS 294-112: Deep Reinforcement Learning\nSergey Levine](http://rail.eecs.berkeley.edu/deeprlcourse-fa17/f17docs/lecture_8_model_based_planning.pdf)\n\n* [Synthesis and Stabilization of Complex Behaviors through Online Trajectory Optimization](https://speakerdeck.com/yuishihara/synthesis-and-stabilization-of-complex-behaviors-through-online-trajectory-optimization) [in Japanese]\n\n* [Differential Dynamic Programming(DDP)/iterative LQR(iLQR)/Sequential LQR(SLQ)](http://blog.syundo.org/post/20180917-ddp-ilqr-slq/) [in Japanese]\n\n## LICENSE\n\nMIT License (see the [LICENSE](LICENSE) file for details).\n\nNote: Part of the code is derived from [mpc.pytorch](https://github.com/locuslab/mpc.pytorch) and [differentiable-mpc](https://github.com/locuslab/differentiable-mpc/) which are also licensed under MIT License (see the [LICENSE_THIRD_PARTY](LICENSE_THIRD_PARTY) file for details).\nAlso this package still uses [PyTorch](https://pytorch.org/) for fast batch LU factorization (`torch.lu`) and solving (`torch.lu_solve`).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfnet-research%2Fchainer-differentiable-mpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpfnet-research%2Fchainer-differentiable-mpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfnet-research%2Fchainer-differentiable-mpc/lists"}