Code Monkey home page Code Monkey logo

drla's Introduction

DRLA - Deep Reinforcement Learning Agent Library

The DRLA library is a C++ Deep Reinforcement Learning Agent based on libtorch (pytorch C++ API). The motivation for this project is to provide general DRL agents with common interfaces for use in C++ applications and environments, allowing training and running solely within the C++ runtime.

Note: This library is still in development and not yet considered stable, with features, potential optimisations, design improvements and bug fixes ongoing.

Features

  • Agent interfaces to integrate with environments and your project
  • Multi threaded async environment functionality
  • Model-free On-Policy rollout based algorithms (PPO, A2C)
  • Model-free Off-Policy replay based algorithms (DQN, SAC)
  • Model-based Monte-Carlo tree search algorithms (MuZero)
  • Hybrid Model-free and Model-based algorithms (Dreamer)

Example

See the following repositories for examples on how to use this library:

Dependencies

The library has been designed to have minimal dependencies with the only dependencies for the core library:

  • libtorch (build and runtime)
  • spdlog (build)
  • Compiler with C++17 support
  • CMake 3.14 or newer (CMake 3.22 is required for using presets)

Additional auxillary functionality such as config json serialisation and helper classes require the following libraries:

Building and Using

Install libtorch at /usr/local/libtorch and ensure cmake is also installed. There are two methods for including the library in your cmake project.

  1. Installing and using cmake find_package.
  2. Using FetchContent to obtain the library as a subproject.

For both options make sure to add drla::drla to your projects target_link_libraries. To use the auxillary functionality also add the drla::aux target.

Set BUILD_AUXILIARY=OFF in cmake to skip building the auxiliary library.

1. Install and find_package

Build and install DRLA

cmake --preset release
cmake --build --preset release --target install --parallel 8

Include in your cmake project via find package find_package(drla).

2. FetchContent subproject

Add the following to your cmake project:

FetchContent_Declare(
	drla
	GIT_REPOSITORY https://github.com:benborder/drla.git
	GIT_TAG        master
)
FetchContent_MakeAvailable(drla)

drla's People

Contributors

benborder avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ajd3v

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.