A reinforcement-learning agent trained to hold a heading in cross-wind and cross-current while steering an outrigger canoe. Race it, or watch it against a hand-coded baseline. The physics and training are in ama-flow.

blue is the selected trained model ·red is the hand-coded baseline steersman.

steerwind —current —
blue: —red: —
stroke 0/00.0s
loading…

Seed 1, fully trained (750k)

Best of three seeds: beats the baseline on all 9 wind x current cells.

run 8aadacc9750k of 750k stepsseed 1registry v3

ent_coef 0.01lr 0.0003gamma 0.998 envswind arm 0.5 m

Settings

training

batch_size
256
checkpoint_freq
50000
ent_coef
0.01
eval_freq
20000
gamma
0.99
learning_rate
0.0003
n_envs
8
n_eval_episodes
10
n_steps
512
policy
ActorCriticPolicy
run_name
ppo-canoe-wind-recal-seed1
seed
1
total_timesteps
750000

hull

added_inertia_yaw_kg_m2
4713.45
added_mass_surge_kg
30.0
added_mass_sway_kg
400.0
air_density_kg_m3
1.225
damping_surge_linear
10.0
damping_surge_quadratic
21.0
damping_sway_linear
300.0
damping_sway_quadratic
2500.0
damping_yaw_linear
2000.0
damping_yaw_quadratic
28000.0
mass_kg
630.0
wind_cp_offset_m
0.5
wind_drag_coeff
1.1
windage_area_lateral_m2
8.0
yaw_inertia_kg_m2
9426.9

ama & crew

ama_sway_drag_extra_quadratic
500.0
ama_yaw_bias_coeff
10.0
crew_paddle_offset_m
0.6
crew_seat_force_ranges_n
((30.0, 50.0), (32.0, 48.0), (34.0, 46.0), (32.0, 48.0), (30.0, 50.0))
crew_seat_sides
(PORT, STARBOARD, PORT, STARBOARD, PORT)
crew_switch_period_strokes
12
Results vs baseline · won 9/9 cells

Cross-wind and cross-current, 10 episodes per cell. Lower heading error and higher speed are better; the baseline is the hand-coded steersman.

windcurrentheading error (model / baseline)speed m/s (model / baseline)model wins
10 kt0.5 kt2.1 / 4.1 deg3.05 / 3.03yes
10 kt1 kt2.0 / 4.1 deg3.05 / 3.03yes
10 kt1.5 kt2.0 / 4.0 deg3.05 / 3.04yes
15 kt0.5 kt4.4 / 4.6 deg3.00 / 2.96yes
15 kt1 kt3.8 / 4.6 deg3.00 / 2.96yes
15 kt1.5 kt3.3 / 4.5 deg3.00 / 2.97yes
20 kt0.5 kt6.0 / 8.6 deg2.91 / 2.82yes
20 kt1 kt5.9 / 7.1 deg2.92 / 2.85yes
20 kt1.5 kt5.8 / 6.3 deg2.93 / 2.86yes
Training curves

Logged every 20k steps during training; the line stops where this checkpoint was saved.

episode return 143.47 to 856.21
mean vmg mps 1.30 to 2.91
rms heading error deg 5.96 to 63.59
side switch rate 0.04 to 0.31
steering stroke fraction 0.24 to 0.70