Giter Site home page Giter Site logo

bbrl's Introduction

BBRL

bbrl- A Flexible and Simple Library for Reinforcement Learning deriving from SaLinA

BBRL stands for "BlackBoard Reinforcement Learning". Initially, this library was a fork of the SaLinA library. But SaLinA is a general model for sequential learning whereas BBRL is dedicated to RL, thus it focuses on a subset of SaLinA. Morevover, BBRL is designed for education purpose (in particular, to teach various RL algorithms, concepts and phenomena). Thus the fork slowly drifted away from SaLinA and became independent after a few months, even if some parts of the code are still inherited from SaLinA.

TL;DR.

bbrl is a lightweight library extending PyTorch modules for developping Reinforcement Learning models

  • It supports simultaneously training with AutoReset on multiple environments
  • It works on multiple CPUs and GPUs

Citing bbrl

BBRL being inspired from SaLinA, please use this bibtex if you want to cite BBRL in your publications:

Link to the paper: SaLinA: Sequential Learning of Agents

    @misc{salina,
        author = {Ludovic Denoyer, Alfredo de la Fuente, Song Duong, Jean-Baptiste Gaya, Pierre-Alexandre Kamienny, Daniel H. Thompson},
        title = {SaLinA: Sequential Learning of Agents},
        year = {2021},
        publisher = {Arxiv},
        howpublished = {\url{https://github.com/facebookresearch/salina}},
    }

Quick Start

  • Just clone the repo
  • pip install -e .

News

  • August 2022:

    • Major updates of the notebook-based documentation
  • May 2022:

    • First commit of the BBRL repository
  • March 2022:

    • Forked SaLinA and started to modify the model

Documentation

Main differences to SaLinA

  • BBRL only contains core classes to implement RL algorithms.

  • Because both notations coexist in the literature, the GymAgent classes support the case where doing action $a_t$ in state $s_t$ results in reward $r_t$, and the case where it results in reward $r_{t+1}$.

  • Some output string were corrected, some variable were renamed and some comments were improved to favor code readability.

  • A few small bugs in SaLinA were fixed:

    • The replay buffer was rejecting samples that did not fit inside when the number of added samples was beyond the limit. This has been corrected to implement the standard FIFO behavior of replay buffer.
    • When using an AutoResetGymAgent and no replay buffer, transitions from an episode to the next were considered as standard steps in an episode. We added a mechanism to properly filter them out, using an additional get_transitions() function in the Workspace class.

Starting with notebooks

There are two kinds of notebooks:

  • some are just for reading, they explain the main concepts and design choices behind BBRL

  • some are designed for learning about RL algorithms and practicing with BBRL. Ideally, these notebooks should be studied in the provided order.

Explanatory notebooks

Coding your first RL algorithms with BBRL

Learning RL with bbrl in your favorite coding environment

Have a look at the bbrl_examples library.

Code Documentation:

Generated with pdoc

Development

See contributing

Dependencies

bbrl utilizes pytorch, hydra for configuring experiments, and gym for reinforcement learning algorithms.

License

bbrl is released under the MIT license. See LICENSE for additional details about it.

bbrl's People

Contributors

osigaud avatar bpiwowar avatar olivier-serris avatar

Watchers

 avatar

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.