i-m-iron-man / libtorch_mujoco_DDPG

DDPG algorithm on an inverted pendulum environment using Mujoco(C++) and pytorch C++ front end.

Home Page:https://github.com/i-m-iron-man/libtorch_mujoco_DDPG

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

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=<absolute path to libtorch>\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

About

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

License:MIT License


Languages

Language:C++ 91.8%Language:CMake 8.2%