Shared Human-AI Reinforcement Learning Platform for Interactive Experiments Gallery
This repository presents use-cases for SHARPIE.
Activate your Python environment (conda or venv) with SHARPIE installed:
# Using conda
conda activate sharpie
# Or using venv
source /path/to/venv/bin/activate
# Ensure the database is set up and that there is an admin (superuser)
sharpie-web migrate
sharpie-web createsuperuser# navigate to SHARPIE root directory
python install.py --all --connection-key secretpython install.py amaze # Standard output
python install.py amaze --quiet # Minimal output (errors only)
python install.py amaze --verbose # Detailed outputThe default install location is the install location for the sharpie package. If sharpie has not been installed, the install script looks at ../SHARPIE (relative to the gallery directory). As a third option, custom paths for the root sharpie-dir and the webserver-dir can be given. Both arguments are optional and can be used independently:
python install.py amaze --sharpie-dir /path/to/SHARPIE # webserver defaults to <sharpie-dir>/webserver
python install.py amaze --webserver-dir /path/to/webserver # sharpie-dir defaults to ../SHARPIE
python install.py amaze --sharpie-dir /path/to/SHARPIE --webserver-dir /path/to/webserverpython install.py --listpython install.py amaze --check # Standard output
python install.py amaze --check --quiet # Minimal output
python install.py amaze --check --verbose # Detailed output
python install.py --all --check # Validate all- amaze - Maze navigation with TAMER
- frozen - Frozen lake with TAMER
- mario - Super Mario Bros behavior cloning
- mountain - Mountain car (human-only)
- mountain_tamer - Mountain car with TAMER
- overcooked - Collaborative cooking
- saycan - Language-conditioned robotic manipulation
- smacv2 - StarCraft II multi-agent challenge
- spread - Multi-agent coordination
- tag - Multi-agent pursuit
Open a terminal window, activate your environment:
# Using conda
conda activate sharpie
# Or using venv
source /path/to/venv/bin/activate
sharpie-web runserverSimultaneously open a second terminal window and run:
# Using conda
conda activate sharpie
# Or using venv
source /path/to/venv/bin/activate
sharpie-runner runserver --connection-key secretOpen a browser and visit localhost:8000 to see all installed experiments.
Run validation on all use cases:
python validate_all.py- Create directory:
my_use_case/ - Add
config.yaml(see existing examples for schema) - Add
environment.py(must defineenvironmentvariable) - Add
policy.pyif needed (must definepolicyvariable with class namedPolicy) - Validate:
python install.py my_use_case --check - Install:
python install.py my_use_case
READMEs are generated from config.yaml files:
python generate_readme.pyEach use case's config.yaml contains:
use_case- Unique identifierpython_version- (Optional) Required Python version (defaults to '3.13' if not specified)dependencies- List of pip packages to installinstallation_notes- (Optional) Installation notes (e.g., "Requires Python >= 3.13")environment- Environment configuration (name, description, filepaths)policy- (Optional) Policy configurationagents- List of agent configurationsexperiment- Experiment configuration
The environment section defines the simulation environment:
name- Display name for the environmentdescription- Description of what the environment doesfilepaths- Dictionary containing:environment- Path to environment.py file (required)
The optional policy section defines the agent policy:
name- Policy namedescription- (Optional) Policy descriptionfilepaths- Dictionary containing:policy- Path to policy.py file (required)- Additional support files (e.g.,
tamer,human_expert,rgb_capture) (optional)
checkpoint_interval- How often to save model checkpoints (0 = disabled)
Each agent in the agents list can include:
role- Agent identifier (e.g., agent_0, agent_1)name- Display namedescription- Agent descriptionpolicy- Policy name (or null for human-only control)participant- Whether agent participates in experimentskeyboard_inputs- Key mapping for actionskeyboard_input_display- (Optional) Display configuration for keyboard inputsmultiple_keyboard_inputs- (Optional) Allow multiple simultaneous key presses (default: false)inputs_type- (Optional) Input type: "actions", "reward", or "other" (default: "other")textual_inputs- (Optional) Accept text input (default: false)
The experiment section defines how the experiment runs:
link- URL slug/identifier for the experimentname- Display nameshort_description- Brief description for listingslong_description- Detailed description with instructionsenabled- Whether the experiment is active (boolean)number_of_episodes- Number of episodes to runtarget_fps- Target frames per second for renderingwait_for_inputs- Whether to pause for human input each step (boolean)
Different use cases require different Python versions. The python_version field in config.yaml specifies the required version:
| Use Case | Python Version | Notes |
|---|---|---|
| overcooked | 3.10.x only | overcooked_ai requires >=3.10,<3.11 |
| saycan | 3.10.x only | JAX and TensorFlow compatibility |
| smacv2 | 3.10.x only | SMAC dependencies |
| mario | >= 3.13 | gym-super-mario-bros, nes-py |
| amaze | >= 3.13 | Default |
| frozen | >= 3.13 | Default |
| mountain | >= 3.13 | Default |
| mountain_tamer | >= 3.13 | Default |
| spread | >= 3.13 | Default |
| tag | >= 3.13 | Default |
The CI pipeline tests each use case on its required Python version.