Skip to main content

Gymnasium environments for reinforcement learning in sepsis management

Project description

sepsisim

Gymnasium environments for reinforcement learning in sepsis management

Python 3.10+ License: MIT Tests PyPI version


SepsiSim provides three Gymnasium-compatible reinforcement learning environments for sepsis management in the intensive care unit. Built on established physiological models (Reynolds et al. 2006 inflammation dynamics, cardiovascular fluid response, lactate kinetics), these environments enable researchers to develop and benchmark RL algorithms for critical care decision-making without risking patient safety.

Installation

pip install sepsisim              # Core (numpy, scipy, gymnasium)
pip install sepsisim[train]       # + SB3, PyTorch for RL training
pip install sepsisim[all]         # Everything

Development install:

git clone https://github.com/HassDhia/sepsisim.git
cd sepsisim
pip install -e ".[all]"

Quick Start

import gymnasium as gym
import sepsisim

env = gym.make("sepsisim/FluidResuscitation-v0")
obs, info = env.reset(seed=42)
for _ in range(100):
    action = env.action_space.sample()
    obs, reward, terminated, truncated, info = env.step(action)
    if terminated or truncated:
        obs, info = env.reset()
env.close()

Environments

Environment Paradigm Observation Action Key Challenge
FluidResuscitation-v0 Continuous 7D (MAP, lactate, UO, damage, volume, bacteria, SOFA) 1D (fluid mL) Restore MAP while avoiding fluid overload
VasopressorTitration-v0 Continuous 8D (+ vaso dose, hours on vaso) 1D (dose change) Maintain MAP without excessive vasoconstriction
SepsisManagement-v0 Multi-action 10D (+ abx status, time) 3D (fluid, vaso, abx) Balance fluids, vasopressors, and antibiotic timing

Architecture

SepsiSim combines four physiological models into configurable Gymnasium environments:

  • Inflammation Model (Reynolds et al. 2006): 4-ODE system tracking bacteria, pro-/anti-inflammatory response, and tissue damage
  • Cardiovascular Model: Lumped-parameter hemodynamic response to fluids and vasopressors with Frank-Starling saturation
  • Lactate Kinetics: Single-compartment model linking tissue hypoperfusion to lactate production and clearance
  • SOFA Scoring: Simplified 3-component organ failure assessment (cardiovascular, renal, metabolic)

Each environment supports three difficulty tiers (easy/medium/hard) via initial bacterial load, enabling curriculum learning and systematic benchmarking.

Paper

The accompanying paper is available at:

Citation

If you use sepsisim in your research, please cite:

@software{dhia2026sepsisim,
  author = {Dhia, Hass},
  title = {SepsiSim: Gymnasium Environments for Reinforcement Learning in Sepsis Management},
  year = {2026},
  publisher = {Smart Technology Investments Research Institute},
  url = {https://github.com/HassDhia/sepsisim}
}

License

MIT License. See LICENSE for details.

Contact

Hass Dhia -- Smart Technology Investments Research Institute

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

sepsisim-0.1.0.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sepsisim-0.1.0-py3-none-any.whl (28.6 kB view details)

Uploaded Python 3

File details

Details for the file sepsisim-0.1.0.tar.gz.

File metadata

  • Download URL: sepsisim-0.1.0.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for sepsisim-0.1.0.tar.gz
Algorithm Hash digest
SHA256 18a3f18bed3b964f93df7c79749f126a395d11ca7bd5cefa03659108ac16fc63
MD5 d61cba9927d93a85a2d5c91f16270e34
BLAKE2b-256 092f5767a255a2a20160c91ce829dcbdbc0c1446df51acd5bc4bd15acb067278

See more details on using hashes here.

File details

Details for the file sepsisim-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sepsisim-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 28.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.8

File hashes

Hashes for sepsisim-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1849e73e2f60483abd1741c5309c42b3a2ba0d99ed28ba1ff74384be68dfc454
MD5 d8417791ff70fc4bf19659f57dd97f7e
BLAKE2b-256 f2320cdd804a074277466d764bb2d9592f3e44bb234755353943e8d5f6779aab

See more details on using hashes here.

Supported by

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