OpenViSTAI · Agents · Blockchain · Crypto
Menu
AI Developer Tools & SDKs

Fsrl

Fsrl is a Python library built on PyTorch and Tianshou that provides modular implementations of safe reinforcement-learning algorithms for research and experimentation.

Independent OpenViST project profile, based on linked sources.

Fsrl — OpenViST project profile in AI Developer Tools & SDKs.
OpenViST project illustration. See the linked sources for product details.
Understand the project

Practical overview

When it fits

Use Fsrl when you want a PyTorch-based starting point for safe-RL experiments involving constrained policies, supported algorithms, and configurable training workflows.

Who it is for

  • Researchers comparing safe reinforcement-learning algorithms.
  • Developers prototyping constraint-aware agents for robotics or simulated decision-making tasks.

Documented uses

  • Implement and compare constrained reinforcement-learning methods.
  • Configure and train a PPO-Lagrangian agent in a documented safety-task example.
  • Log experiment results with TensorBoard or Weights & Biases.
Before you choose

Requirements & limits

The repository identifies an MIT license and provides source-checkout and Git-based pip installation instructions.

  • The library builds on both PyTorch and Tianshou.
  • Its README documents a PPO-Lagrangian example using SafetyCarCircle-v0 and TensorBoard logging.
  • The project states that its algorithms support multiple constraints and standard reinforcement-learning tasks.

Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.

Source-based practical guide

Install Fsrl from its source repository

Install the library in editable mode from a local source checkout.

Before you start

  • Python 3.8 or later
  • A shell and pip

Steps

  1. Clone https://github.com/liuzuxin/fsrl.git.

  2. Change into the fsrl directory.

  3. Run pip install -e .

  4. Check the installation by importing fsrl and printing fsrl.__version__.

Expected outcome

Fsrl is installed from the local checkout, and the README provides an import-and-version check.

Guide limitations

  • This covers installation and the documented import check, not training an agent.
Source-based practical guide

Set up the documented PPO-Lagrangian training example

Initialize the README’s SafetyCarCircle-v0 task, logger, agent, and training and test environments.

Before you start

  • Fsrl and the example's Python dependencies
  • The SafetyCarCircle-v0 environment
  • Python 3.8 or later

Steps

  1. Import bullet_safety_gym, gymnasium, DummyVectorEnv, PPOLagAgent, and TensorboardLogger as shown in the README.

  2. Set the task to SafetyCarCircle-v0 and initialize a TensorBoard logger.

  3. Create the PPO-Lagrangian agent with gym.make(task).

  4. Create 10 training environments and one test environment using DummyVectorEnv.

Expected outcome

The example’s agent, logger, and vectorized training and test environments are initialized; the README’s next step is to call agent.learn(train_envs, test_envs, epoch=100).

Guide limitations

  • This recipe covers setup only; it does not claim that training was run.
  • The environment and package dependencies must be available for the example to proceed.
Evidence and transparency

Sources & review

Source record details
Source availability
Active
Sources checked
16 October 2026
Original website title
liuzuxin/FSRL · Official homepage title · retained in its source language