pytorch-cpp-rl  by Omegastick

RL framework using the PyTorch C++ frontend

Created 6 years ago
524 stars

Top 60.3% on SourcePulse

GitHubView on GitHub
Project Summary

This project provides a C++ reinforcement learning framework leveraging the PyTorch C++ frontend, targeting developers needing RL capabilities in C++ environments where Python is not viable. It offers an extensible, optimized solution for production use in desktop applications, aiming for minimal user-side setup.

How It Works

CppRl is a direct port of the popular pytorch-a2c-ppo-acktr-gail Python library, retaining its API and core algorithms. It implements A2C and PPO with support for recurrent policies (GRU-based), continuous, and discrete action spaces. An integrated OpenAI Gym server using ZeroMQ facilitates testing against Gym environments.

Quick Start & Requirements

  • Install: Build using CMake. Dependencies like Libtorch must be installed separately.
  • Prerequisites: Libtorch, CMake.
  • Setup: git submodule update --init --recursive followed by CMake build commands.
  • Demo: Run launch_gym_server.py and build/example/gym_server.
  • Docs: [No explicit link provided in README]

Highlighted Details

  • Implements A2C and PPO algorithms.
  • Supports recurrent policies (GRU-based).
  • Handles both continuous and discrete action spaces.
  • Cross-platform compatibility (Windows, Ubuntu tested).

Maintenance & Community

  • Based on Ikostikov's pytorch-a2c-ppo-acktr-gail.
  • [No specific community links or contributor information provided in README]

Licensing & Compatibility

  • [License type not specified in README]
  • Suitable for integration into C++ applications.

Limitations & Caveats

The included Gym server and client have performance limitations, especially with image observations, due to inter-process communication overhead and data copying. Windows performance is noted as approximately 75% of Linux performance.

Health Check
Last Commit

5 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 30 days

Explore Similar Projects

Starred by Evan Hubinger Evan Hubinger(Head of Alignment Stress-Testing at Anthropic), Junxiao Song Junxiao Song(Research Scientist at DeepSeek), and
2 more.

AgentNet by yandexdataschool

0%
298
Deep reinforcement learning library
Created 9 years ago
Updated 8 years ago
Starred by Philipp Moritz Philipp Moritz(Cofounder of Anyscale), Jason Knight Jason Knight(Director AI Compilers at NVIDIA; Cofounder of OctoML), and
1 more.

ARS by modestyachts

0.2%
425
Reinforcement learning via augmented random search
Created 7 years ago
Updated 4 years ago
Starred by Deepak Pathak Deepak Pathak(Cofounder of Skild AI; Professor at CMU), Anastasis Germanidis Anastasis Germanidis(Cofounder of Runway), and
1 more.

deer by VinF

0%
489
Deep reinforcement learning framework
Created 9 years ago
Updated 2 months ago
Feedback? Help us improve.