A reinforcement learning library in Rust.
Border consists of the following crates:
- Core and utility
- border-core (doc) provides basic traits and functions for environments and reinforcement learning (RL) agents.
- border-tensorboard (doc) implements the
TensorboardRecorder
struct for writing records that can be visualized in Tensorboard, based on tensorboard-rs. - border-mlflow-tracking (doc) provides MLflow tracking support for logging metrics during training via REST API.
- border-async-trainer (doc) defines traits and functions for asynchronous training of RL agents using multiple actors. Each actor runs a sampling process in parallel, where an agent interacts with an environment to collect samples for a shared replay buffer.
- border serves as a collection of examples.
- Environment
- border-py-gym-env (doc) provides a wrapper for Gymnasium environments written in Python.
- border-atari-env (doc) implements a wrapper for atari-env, which is part of gym-rs.
- border-minari (doc) provides a wrapper for Minari.
- Agent
- border-tch-agent (doc) implements RL agents based on tch, including Deep Q Network (DQN), Implicit Quantile Network (IQN), and Soft Actor-Critic (SAC).
- border-candle-agent (doc) implements RL agents based on candle.
- border-policy-no-backend (doc) implements policies that are independent of any deep learning backend, such as Torch.
Border is experimental and currently under development. The API is unstable.
Example scripts are available in the examples
directory. These have been tested in Docker containers. Some scripts require several days for the training process, as tested on an Ubuntu 22.04 virtual machine.
Docker configuration files for development and testing are available in the dev-border repository. These files are used to set up the development environment, supporting both aarch64 (e.g., M2 MacBook Air) and amd64 architectures.
Crates | License |
---|---|
border-core |
MIT OR Apache-2.0 |
border-tensorboard |
MIT OR Apache-2.0 |
border-mlflow-tracking |
MIT OR Apache-2.0 |
border-async-trainer |
MIT OR Apache-2.0 |
border-py-gym-env |
MIT OR Apache-2.0 |
border-atari-env |
GPL-2.0-or-later |
border-minari |
MIT OR Apache-2.0 |
border-tch-agent |
MIT OR Apache-2.0 |
border-candle-agent |
MIT OR Apache-2.0 |
border-policy-no-backend |
MIT OR Apache-2.0 |
border |
GPL-2.0-or-later |