DOC 06AUTONOMY DEVELOPMENT
Reinforcement learning and evaluation
LEVIATHAN provides marine control tasks as learning environments, batched dynamics for training at scale, observation and actuator models taken from hardware datasheets, and an evaluation layer. The evaluation layer reports not just whether a policy succeeded, but at which stage it failed.
The learning environments run on the analytic and GPU tiers (see System architecture). The application evaluates policies: it runs episodes, task suites, robustness benches and comparisons. Training itself runs from the learning library's scripts, or as a Code project launched from the Training runs panel. Policies are not connected to the canonical World; a World vehicle uses the built-in controllers, on true or estimated state.
Tasks
Fourteen tasks are registered as Gymnasium environments, each on four thruster-driven vehicles: BlueROV2 Heavy, BlueROV2 Heavy (faithful), Hovering AUV and Work-class ROV. That makes 56 environment ids, named like MarineLab-StationKeep-BlueROV2Heavy-v0.
| Task | Goal |
|---|---|
| StationKeep | Hold a fixed position and heading against disturbance |
| DynamicPosition | Hold position and heading against a current, with the flow observable for feed-forward rejection |
| Waypoint | Drive to a goal position and arrive slowly |
| Transit | Track a moving reference under a current, with the flow observable |
| EnergyTransit | Reach a goal while minimising integrated electrical energy |
| TrajectoryTrack | Track a moving, time-parameterised reference such as a circle or a line |
| ObstacleAvoid | Reach a goal while avoiding obstacles perceived through a forward-looking sonar |
| TerrainFollow | Run a survey line holding a set altitude above a shoaling seabed |
| PipelineFollow | Follow a seabed pipeline with minimal cross-track error to its far end |
| Inspection | Orbit a structure at a standoff range, bow toward it, through a full revolution |
| Docking | Approach a dock along its corridor and arrive slowly and aligned |
| Coverage, CoverageTerrain | Fly a lawnmower survey of a rectangle, at fixed depth or at fixed altitude over shoaling terrain |
| UnderIce | Run a line holding a set clearance below an ice canopy |
The Dashboard's Reinforcement learning and Grade suite panels also include scene-specific variants: reef avoidance, deep-sea and harbour transits, and dam inspection.
Observations, actions and models
- Actions are per-thruster commands in [−1, 1], scaled to force and mapped to a wrench through the vehicle's thruster configuration, so the policy drives thrusters directly. Observations are each task's state features, such as the goal vector in the body frame, body velocities and attitude, with optional noise and partial observability.
- DVL observation model. A DVL is modelled from the datasheet, not as a coin flip. It reports at its own rate (2–15 Hz for a Water Linked A50, 8 Hz by default) and loses bottom lock outside its altitude envelope (0.05–50 m) or beyond 25° of tilt. During an outage the solution dead-reckons and drifts rather than reporting zero. Presets include benign conditions and a soft-bottom envelope.
- Actuator faults. Thruster degradation and failure, with fault-aware allocation available to controllers.
- Domain randomisation. Mass, inertia, added mass, linear and quadratic damping, volume, current and JONSWAP sea state can be randomised. Transport delay models latency.
- Policy architectures. MLP, GRU, LSTM and transformer (GTrXL) policies, and a CNN encoder for sonar images.
Training
| Algorithm | Kind |
|---|---|
| PPO | On-policy, with GAE and value normalisation; feed-forward and recurrent policies |
| SAC, TD3 | Off-policy actor-critic |
| CQL, IQL | Offline reinforcement learning from recorded datasets |
| Multi-agent SAC | Parameter sharing across agents |
| Behaviour cloning | Distillation into a portable policy |
Training runs
The Training runs panel launches a training job in one of three ways: as a local process on this machine's GPU, as a job submitted to a Slurm cluster, or as a dry run that only produces the job script for inspection. The job can be a Code project's run command, or a generated job for the Isaac Lab and MarineGym cluster setup. The panel follows the run's status, metrics and checkpoints, and a checkpoint can be exported into the portable policy format the evaluation panels accept. Cluster runs need that cluster and its software; they are not bundled.
Environments run batched on the GPU through the vectorised API. A Stable-Baselines3 adapter is also provided. Policies export as TorchScript, as a dependency-free JSON MLP that the evaluation panels load directly, and as ONNX, verified by running the exported model.
Evaluation
KRAKEN is organised in three parts. K1 holds trajectory data: the schema, ingest of LEVIATHAN rollouts and of recorded training rollouts, and a catalogue. K2 holds the stage verifiers, the multi-seed runner and regression baselines that the Dashboard's grading panels use. K3 covers fidelity: degradation curves across randomisation axes and comparison of simulated with real trajectories. It is available from the library and its command line.
LEVIATHAN's evaluation layer, KRAKEN, grades every episode by stage, not only by success. An episode ends in one of four stages: never engaged, engaged but not acquired, acquired then lost or succeeded. A policy that never engages has a different problem from one that reaches the goal and drifts off, and the stage mix shows which.

| Panel | What it does |
|---|---|
| Task suite, Grade suite | Run a policy over all tasks and seeds; PASS / PARTIAL / FAIL with stage mix |
| Robustness bench | Profile one policy across nominal, domain-randomised, fault and noisy-observation conditions |
| Domain randomisation | Run an ensemble with perturbed physical parameters and report the spread, with each episode's sampled factors listed |
| Parameter sweep, Current sweep | Degradation curves as one stressor increases; a polar rejection plot over current headings |
| Robustness ladder, Disturbance observer | Disturbance profiles and their estimation |
| Compare runs, Regression | Compare two policies per axis; freeze a passing baseline and flag regressions beyond a tolerance |
| Public benchmark | A frozen, versioned benchmark specification with a leaderboard |
| Segmentation grade, Detection grade | Score perception outputs against ground truth: segmentation, detection and depth metrics |
| External frames | Grade segmentation or detection predictions made outside LEVIATHAN against its ground truth |
| Policy export, Distillation | Export a policy in the portable format; distil a teacher into a student |
Aggregate results follow the practice recommended by Agarwal et al. (NeurIPS 2021) for few-seed reporting: medians, interquartile means and stratified bootstrap intervals, rather than a bare mean and standard deviation.
- The baseline policy in the evaluation panels is LEVIATHAN's analytic feedback controller for each task, not a trained network. Trained policies are graded through the same panels once exported.
- The Dashboard's segmentation and detection grade panels use a built-in demonstration "model" that is ground truth corrupted by label noise. Grade your own predictions with External frames. Perception algorithms and their evaluators are described on Perception and computer vision.