Tide prediction from harmonic constituents: extrema, wiggle removal, threshold crossings
Exact prompt
# Tide prediction from harmonic constituents `input.json` (synthetic constituents; not for navigation) gives `z0` (m), `constituents` (`amp` m, `speed_deg_h`, `phase_deg`, `g_deg`, node factor `f`), a window `start_h`..`end_h` (hours), `min_range_m` and `threshold_m`. Write `solve.py` (Python 3 standard library only); `python solve.py input.json answer.json` writes `answer.json` and `tide.svg`. Fresh inputs are generated. ## Rules 1. Height h(t) = z0 + sum of f * amp * cos(speed * t + phase - g), angles in degrees converted to radians, t in hours. 2. **Extrema**: every time in [start, end] where dh/dt changes sign (use the analytic derivative), located to better than 0.001 minute. Kind: `high` if the second derivative there is negative, else `low`. Scan in steps of 0.1 h (6 minutes); no two extrema of these inputs fall in the same step. 3. **Compound-tide wiggles**: then repeatedly find the first pair of consecutive extrema whose heights differ by less than `min_range_m` and delete both, until none remain. 4. **Threshold crossings**: every time h(t) crosses `threshold_m`, with `direction` rising or falling, located the same way. 5. **Daily**: day d = 0, 1, 2, ... covers [start + 24d, start + 24(d+1)); max and min of h sampled at every whole minute from start to end inclusive (the end sample belongs to the last partial day if any). 6. Times are reported as `t_min` = minutes after `start_h`, rounded to 0.1; heights rounded to 3 decimals. ## Visual output: tide.svg Static, self-contained SVG (root `<svg>`; no scripts, images, links, embeds, handlers, external URLs, CSS url(http)/@import or fetches; renders headless) with `<polyline id="tide-curve">`, `<line id="threshold-line">` and an element `id="extrema"`. The drawing is not graded. ## answer.json `{"extrema": [{"t_min", "height_m", "kind"}, ...], "crossings": [{"t_min", "direction"}, ...], "daily": [{"day", "max_m", "min_m"}, ...]}` ## Scoring Hidden checks (partial credit; all must pass): `extrema_count_and_kinds`, `extrema_times_heights` (times within 0.15 minute, heights within 0.15 m), `threshold_crossings`, `daily_max_min` (within 0.0015 m), `tide_svg_static` (tide.svg exists, follows the static rules, has the ids/tags above), `fresh_run_1`, `fresh_run_2`. 60-second limit per run.
Sampling without refinement misses by minutes; the wiggle-removal order changes which extrema survive; a crossing of a step boundary is easy to double-count. 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).
Success criteria: 1. extrema_count_and_kinds 2. extrema_times_heights 3. threshold_crossings 4. daily_max_min 5. tide_svg_static 6. fresh_run_1 7. fresh_run_2
Best model for this task so far: Claude Haiku 5.5 (effort default (no --effort flag) · thinking on) (success, $0.01, 54s).
Latest output per model
All runs (4)
100% pass rate across 4 eligible runs: 4 pass, 0 partial, 0 fail. Partial and failed runs are listed below with everything else.ⓘ
| Model | Cost | Time | Step-insⓘ | Autonomy | Outcome | Trustⓘ | Date | Compare |
|---|---|---|---|---|---|---|---|---|
| OGPT-6.1 Soldefault · thinking on | $0.06 | 1m | 0 | Fully autonomous | pass | Trust 80% | 2026-10-22 | |
| AClaude Haiku 5.5default · thinking on | $0.01 | 54s | 0 | Fully autonomous | pass | Trust 80% | 2026-10-20 | |
| AClaude Opus 5.5default · thinking on | $0.18 | 44s | 0 | Fully autonomous | pass | Trust 80% | 2026-10-20 | |
| AClaude Sonnet 5.5default · thinking on | $0.08 | 23s | 0 | Fully autonomous | pass | Trust 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.
Get new runs and ranking changes weekly
Which models got better or cheaper on real tasks like this one.