Skip to content

Best sailing angle and leg times from a polar table

Exact prompt

# Best sailing angle from a polar table `input.json` (synthetic) has a boat polar (`polar.tws` wind speeds in knots, `polar.twa` true wind angles in degrees ascending, `polar.speed[j][k]` = boat speed at `twa[j]`, `tws[k]`), the current true wind speed `tws`, and a list of `legs` each with `bearing` (degrees true to the mark), `distance_nm` and `twd` (true wind direction, degrees the wind blows FROM). Write `solve.py` (Python 3 standard library only); `python solve.py input.json answer.json` writes `answer.json` and `polar.svg`. Fresh inputs are used too, so no hard-coding. ## Rules 1. Boat speed at (tws, a): for each table row, interpolate linearly in tws (clamped to the first/last column outside the range); then interpolate linearly in twa between rows (clamped to 180 at the end). For a < `twa[0]` (no-go zone) speed is 0. 2. `upwind`: over integer a in 0..90, maximise VMG = speed*cos(a); `downwind`: over integer a in 90..180, maximise -speed*cos(a). Compare VMG rounded to 4 decimals; on a tie take the smaller angle. Report `{"twa": a, "vmg": value rounded to 3}`. 3. Each leg: over integer courses c = 0..359, a = smallest angle between c and `twd` (0..180), s = speed(tws, a), VMC = s*cos(c - bearing). Take the c with the greatest VMC compared at 6 decimals; ties keep the smaller c. Report `course`, `twa` (a), `boat_speed` (3 dp), `vmc` (3 dp), `hours` = distance / VMC (3 dp) or null if VMC <= 0. 4. `total_hours` = sum of non-null leg hours (3 dp). ## Visual output: polar.svg Static, self-contained SVG (root `<svg>`, no scripts, images, links, fonts or other external assets; renders headless), containing an element `id="polar-curve"` (the polar curve at the given tws) and `<line id="best-upwind">` and `<line id="best-downwind">` drawn from the origin along the best angles. The drawing itself is not graded. ## answer.json `{"upwind": {"twa", "vmg"}, "downwind": {"twa", "vmg"}, "legs": [{"course", "twa", "boat_speed", "vmc", "hours"}, ...], "total_hours"}` ## Scoring Hidden checks (partial credit = fraction passed; all must pass): `best_upwind_downwind`, `upwind_and_downwind_legs` (legs 0-1), `reaching_legs_and_total` (legs 2-3 and total), `polar_svg_static` (polar.svg exists, follows the static rules, has the ids/tags above), `fresh_run_1`, `fresh_run_2`. Numbers within 0.002; integers exact. 60-second limit per run.

Bilinear polar lookup with clamping and a no-go zone, integer angle searches with stated rounding and tie rules, and course-vs-mark VMC that forces tacking or gybing angles on beats and runs. Original benchmark task written for usecaserank.com (not based on a specific public post). Headless, offline run on a reproducible fixture. Each run's notes say how its cost was measured (estimates are marked).

Benchmark code for comparing AI models, not navigation or safety software.

Success criteria: 1. best_upwind_downwind 2. upwind_and_downwind_legs 3. reaching_legs_and_total 4. polar_svg_static 5. fresh_run_1 6. fresh_run_2

Best model for this task so far: Mistral Small 3.2 24B Instruct (Venice) (thinking on) (success, $0.0023, 46s).

Latest output per model

Run this on another model

All runs (10)

80% pass rate across 10 eligible runs: 8 pass, 0 partial, 2 fail. Partial and failed runs are listed below with everything else.ⓘ

Runs for this use case
ModelCostTimeStep-insⓘAutonomyOutcomeTrustⓘDateCompare
QQwen3 Coder 480B Turbo (Venice)thinking on$0.008822s0Fully autonomousfailTrust 80%2026-11-04
DDeepSeek V4.1 Flash (Venice)thinking on$0.0149s0Fully autonomouspassTrust 80%2026-11-04
MMistral Small 3.2 24B Instruct (Venice)thinking on$0.002346s0Fully autonomouspassTrust 80%2026-10-27
GGemini 4 Argonmedium · thinking off$0.193m0Fully autonomouspassTrust 80%2026-10-22
GGemini 3.8 Flashmedium · thinking on$0.384m0Fully autonomouspassTrust 80%2026-10-22
OGPT-6.1 Soldefault · thinking on$0.051m0Fully autonomouspassTrust 80%2026-10-22
GGemma 4 31B Instruct (Venice)thinking on$0.008154m0Fully autonomousfailTrust 80%2026-10-21
AClaude Haiku 5.5default · thinking on$0.008030s0Fully autonomouspassTrust 80%2026-10-20
AClaude Opus 5.5default · thinking on$0.1732s0Fully autonomouspassTrust 80%2026-10-20
AClaude Sonnet 5.5default · thinking on$0.0626s0Fully autonomouspassTrust 80%2026-10-20

Embed this result

A live badge for this use case. It links back here and updates as new runs are published.

UseCaseRank badge for Best sailing angle and leg times from a polar table

Get new runs and ranking changes weekly

Which models got better or cheaper on real tasks like this one.