A Repository with C++ implementations of Reinforcement Learning Algorithms (Pytorch)
A Repository with C++ implementations of Reinforcement Learning Algorithms (Pytorch)
RlCpp is a reinforcement learning framework, written using the PyTorch C++ frontend.
RlCpp aims to be an extensible, reasonably optimized, production-ready framework for using reinforcement learning in projects where Python isn't viable. It should be ready to use in desktop applications on user's computers with minimal setup required on the user's side.
The Environment used is the C++ Port of Arcade Learning Environment
The deep reinforcement learning community has made several independent improvements to the DQN algorithm. This repository presents latest extensions to the DQN algorithm:
Install main dependences:
sudo apt-get install libsdl1.2-dev libsdl-gfx1.2-dev libsdl-image1.2-dev cmake
Compilation:
$ mkdir build && cd build
$ cmake -DUSE_SDL=ON -DUSE_RLGLUE=OFF -DBUILD_EXAMPLES=ON ..
$ make -j 4
To install python module:
$ pip install .
or
$ pip install --user .
Getting the ALE to work on Visual Studio requires a bit of extra wrangling. You may wish to use IslandMan93's Visual Studio port of the ALE.
To ask questions and discuss, please join the ALE-users group.
CMake is used for the build system.
Most dependencies are included as submodules (run git submodule update --init --recursive
to get them).
Libtorch has to be installed seperately.
cd Reinforcement_CPP
cd build
cmake ..
make -j4
Before running, make sure to add libtorch/lib
to your PATH
environment variable.
The CMake file requires some changes for things to run smoothly.
Plans to support:
Stay tuned !