[P] CppRl: A C++ reinforcement learning library using the new PyTorch C++ frontend

I'm really excited to show you guys what I've been working on lately: https://github.com/Omegastick/pytorch-cpp-rl

It is very heavily based on Ikostrikov's wonderful pytorch-a2c-ppo-acktr-gail. You could even consider this a port. The API and underlying algorithms are almost identical (with the necessary changes involved in the move to C++).

It also contains a reimplementation simple OpenAI Gym server that communicates via ZeroMQ to test the framework on Gym environments.

CppRl 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.


At the time of writing, there are no general-use reinforcement learning frameworks for C++. I needed one for a personal project, and the PyTorch C++ frontend had recently been released, so I figured I should make one.


  • Implemented algorithms:
    • A2C
    • PPO
  • Recurrent policies (GRU based)
  • Cross-platform compatibility (tested on Windows 10, Ubuntu 16.04, and Ubuntu 18.04)
  • Solid test coverage
  • Decently optimized (always open to pull requests improving optimization though)


Processing gif r1w6ksghemr21…

If you want to help with the project, please submit a PR!

submitted by /u/Flag_Red
[link] [comments]

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.