https://github.com/i-m-iron-man/libtorch_mujoco_ddpg
DDPG algorithm on an inverted pendulum environment using Mujoco(C++) and pytorch C++ front end.
https://github.com/i-m-iron-man/libtorch_mujoco_ddpg
cpp ddpg deep-reinforcement-learning inverted-pendulum mujoco pytorch-cpp pytorch-cpp-frontend pytorch-implementation
Last synced: 2 months ago
JSON representation
DDPG algorithm on an inverted pendulum environment using Mujoco(C++) and pytorch C++ front end.
- Host: GitHub
- URL: https://github.com/i-m-iron-man/libtorch_mujoco_ddpg
- Owner: i-m-iron-man
- License: mit
- Created: 2021-02-23T23:26:05.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-02-25T19:48:35.000Z (about 4 years ago)
- Last Synced: 2025-01-22T16:15:29.507Z (4 months ago)
- Topics: cpp, ddpg, deep-reinforcement-learning, inverted-pendulum, mujoco, pytorch-cpp, pytorch-cpp-frontend, pytorch-implementation
- Language: C++
- Homepage: https://github.com/i-m-iron-man/libtorch_mujoco_DDPG
- Size: 24.4 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Inverted Pendulum task
The task is to balance the pendulum upright using continuous control when the maximum torque available is not enough to overcome gravity. In this implementation a DDPG algorithm is used to learn the task. Mujoco libarary(http://www.mujoco.org/) is used to model the environment and pytorch c++ frontend(https://pytorch.org/cppdocs/frontend.html) provides the support for reinforcement learning framework.## Platform
* OS: windows10(64 bit)
* CUDA: 10.1
* cuDNN: 7.6.3
* Compiler: MSVC 19.28.29336.0
* C++17
* Cmake: 3.19.2## Dependencies
* Mujoco: [mujoco200 win64](https://www.roboti.us/download/mujoco200_win64.zip)
* pytorch C++ frontend: [1.7.1 release](https://pytorch.org/get-started/locally/)
* boost: [1.75.0](https://www.boost.org/users/history/version_1_75_0.html)## Instructions
* In CMakeLists.txt replace `C:/Users/kings/Desktop/source/mujoco200_win64/mujoco200_win64` at line 13 with the path to your mujoco installation
* In CMakeLists.txt replace `C:/Users/kings/Desktop/source/libtorch-mujoco-git` at line 14 with the path to where you download these source files
* open a command-prompt and `cd` to the location of these files
* `mkdir build && cd build`
* In order to build use command `cmake -DCMAKE_PREFIX_PATH=\libtorch ..`
* In order to make use command `cmake --build . --config Release`
* In order to run first `cd Release` then `libtorch-mujoco-git.exe ..\..\model\simple_pendulum.xml`## Inspiration
https://github.com/EmmiOcean/DDPG_LibTorch