Demos¶
This section captures the canonical shell utilities used to reproduce MarineGym benchmark experiments. The batch runner iterates across vehicle variants, task configurations, and disturbance regimes to generate a complete suite of training and evaluation runs.
For a concise command primer, see Quick Start. The recipes below focus on automating large experiment batches and documenting coverage.
Batch Runner Overview¶
The script below launches 45 workflows (5 robots × 3 tasks × 3 modes) with shared hyperparameters:
TOTAL_FRAMES: 50,000,000SEED: 47task.env.num_envs: 2048algo: Proximal Policy Optimization (PPO)
Each job sleeps for five seconds before the next iteration to avoid scheduler contention.
#!/bin/bash
TOTAL_FRAMES=50000000
SEED=47
ROBOTS=("HAUV" "iAUV" "LAUV" "BlueROV" "BlueROVHeavy")
TASKS=("TrackRand" "LandingRand" "HoverRand")
MODES=("st" "dt" "dr")
run_training() {
local robot=$1
local task=$2
local mode=$3
echo "Running: ${robot} / ${task} / ${mode}"
case $mode in
st)
python train.py task=$task \
algo=ppo \
headless=true \
enable_livestream=false \
mode=train \
task.drone_model.name=$robot \
task.env.num_envs=2048 \
total_frames=$TOTAL_FRAMES \
seed=$SEED
;;
dt)
python train.py task=$task \
algo=ppo \
headless=true \
enable_livestream=false \
mode=train \
task.drone_model.name=$robot \
task.disturbances.train.flow.enable_flow=true \
task.disturbances.train.payload.enable_payload=false \
task.env.num_envs=2048 \
total_frames=$TOTAL_FRAMES \
seed=$SEED
;;
dr)
python train.py task=$task \
algo=ppo \
headless=true \
enable_livestream=false \
mode=train \
task.drone_model.name=$robot \
task.disturbances.train.flow.enable_flow=true \
task.disturbances.train.payload.enable_payload=true \
task.env.num_envs=2048 \
total_frames=$TOTAL_FRAMES \
seed=$SEED
;;
esac
echo "Completed: ${robot} / ${task} / ${mode}"
sleep 5
}
for robot in "${ROBOTS[@]}"; do
for task in "${TASKS[@]}"; do
for mode in "${MODES[@]}"; do
run_training "$robot" "$task" "$mode"
done
done
done
Mode Reference¶
Mode |
Purpose |
Additional arguments |
|---|---|---|
|
Baseline training without disturbance |
(Uses defaults) |
|
Disturbance-aware training |
|
|
Disturbance-aware training with randomization |
|
Robots × Tasks Matrix¶
The grid below enumerates all combinations executed by the batch script. Each cell yields three individual runs (st, dt, dr).
Robot |
TrackRand |
LandingRand |
HoverRand |
|---|---|---|---|
HAUV |
st, dt, dr |
st, dt, dr |
st, dt, dr |
iAUV |
st, dt, dr |
st, dt, dr |
st, dt, dr |
LAUV |
st, dt, dr |
st, dt, dr |
st, dt, dr |
BlueROV |
st, dt, dr |
st, dt, dr |
st, dt, dr |
BlueROVHeavy | st, dt, dr |
st, dt, dr |
st, dt, dr |
|
Single-Run Templates¶
Use the following snippets when launching an individual job outside the batch loop. Replace <ROBOT> and <TASK> with the desired values.
Standard training
python train.py task=<TASK> \
algo=ppo \
headless=true \
enable_livestream=false \
mode=train \
task.drone_model.name=<ROBOT> \
task.env.num_envs=2048 \
total_frames=50000000 \
seed=47
Disturbance training
python train.py task=<TASK> \
algo=ppo \
headless=true \
enable_livestream=false \
mode=train \
task.drone_model.name=<ROBOT> \
task.disturbances.train.flow.enable_flow=true \
task.disturbances.train.payload.enable_payload=false \
task.env.num_envs=2048 \
total_frames=50000000 \
seed=47
Disturbance and randomization training
python train.py task=<TASK> \
algo=ppo \
headless=true \
enable_livestream=false \
mode=train \
task.disturbances.train.flow.enable_flow=true \
task.disturbances.train.payload.enable_payload=true \
task.drone_model.name=<ROBOT> \
task.env.num_envs=2048 \
total_frames=50000000 \
seed=47