Skip to main content

Gymnasium Compatible Safe RL Environments

Project description

SafeGym

Implementation of satellite environments and other environments to explore SafeRL

SafeGym

SafeGym is a Gymnasium environment coupled with tools aimed at facilitating Safe Reinforcement Learning (SafeRL) research and development.

Features

  • Customizable Environment: Create a variety of satellite chasing scenarios with customizable starting states and noise.
  • Underactuated and Fully Actuated Dynamics: Simulate real-world control dynamics with options for both underactuated and fully actuated control systems.
  • Reward Shaping: Built-in reward shaping functionality to guide the learning process towards safe and effective solutions.
  • Truncation and Termination: Control the episode flow with truncation and termination conditions to manage the agent's learning experience.
  • Visualization Tools: Render the environment and visualize the agent's interactions and performance over time.
  • Testing Utilities: Validate the environment and control algorithms with a set of provided testing functions.

Getting Started

Clone the repository to your local machine:

git clone https://github.com/spbisc97/SafeGym.git
cd SafeGym

Ensure you have the necessary dependencies installed. The primary dependencies include:

  • gymnasium
  • numpy
  • matplotlib

Usage

Install

pip install -e .

Run a simple experiment

import safegym
import gymnasium as gym

env = gym.make('Satellite-SE',render_mode="human")
observation,info = env.reset()
DONE=False

while not DONE
    action = env.action_space.sample()
    observation, reward, term, trunc, info = env.step(action)
    DONE = term or trunc

env.close()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safegym-0.13.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

safegym-0.13-py3-none-any.whl (36.6 kB view details)

Uploaded Python 3

File details

Details for the file safegym-0.13.tar.gz.

File metadata

  • Download URL: safegym-0.13.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for safegym-0.13.tar.gz
Algorithm Hash digest
SHA256 9d8626cfc47ac3108e9bdc0cb4c56df494b333ad87f7c6219e8f3e1b1a93c369
MD5 a30ca16ffb84476eb9379c6e861edd91
BLAKE2b-256 11d2506b604d0e986a56774f6c7d87c0321ff07f043fb32c423e4ebdf651e217

See more details on using hashes here.

File details

Details for the file safegym-0.13-py3-none-any.whl.

File metadata

  • Download URL: safegym-0.13-py3-none-any.whl
  • Upload date:
  • Size: 36.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for safegym-0.13-py3-none-any.whl
Algorithm Hash digest
SHA256 dbaf585b8f2df78d399594bd5e965cf84148b65405756725f248171b2c2d870b
MD5 af25c8fe82ae6277165a7ab8a9ff283f
BLAKE2b-256 6882161bedbf6b27c11092b960adbe83abeadbba0f96441c42541e619da55f3c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page