This repo contains a series of examples and environment to test and challenge reinforcement learning algorithms in safe environments. The Verifiably Safe Reinforcement Learning framework is used as reference but the environments can be tested with any RL algorithm.
Verifiably Safe Reinforcement Learning (VSRL) is a new neuro-symbolic method that guarantees that safety specifications (e.g. collision avoidance) are maintained both during training and testing of reinforcement learning agents by means of formal, computer-checked proofs. The VSRL system is built to guarantee safety by means of a symbolic description of safety constraints, such as maintaining a safe distance between the agent and obstacles. This is then enforced on top of classical reinforcement learning mechanisms e.g. PPO, TRPO, etc. In this repository, you will be able to test and benchmark VSRL in an environment that can be customized to challenge reinforcement learning algorithms to operate in a safe mode.
The environments associated with this repo are meant to extend other safe environments like safe-gym by providing an interface with Unity using the gym-unity wrapper.
- Python 3.6 or 3.7
- Pre-compiled binaries - Please read instructions here
- (optional, only to create new environments) Unity Hub
Clone the repository and open the project folder.
git clone https://github.com/IBM/vsrl-examples.git
cd vsrl-os-examplesTo facilitate the installation process, a script is provided to install/update dependencies:
./setup.shThis process will create an environment with all the necessary dependencies. To activate the environment run:
source venv/bin/activate
Examples can be found in examples. examples/README.md provides an overview
of the different examples in this repo.
If you would like to contribute, please review our code of conduct and contributing document.
This project is licensed under the terms of the MIT License. See LICENSE for details.