Skip to content

Optimal single-machine job sequence (weighted tardiness with precedence)

Exact prompt

# Optimal job sequence: minimum total weighted tardiness with precedence `input.json` (synthetic) has `start` (time the machine becomes free), `jobs` (`id`, processing time `p`, weight `w`, `due`) and `precedence` (pairs [a, b]: a must come before b, not necessarily directly). One machine, no idle time, no preemption. Write `solve.py` (Python 3 standard library only); `python solve.py input.json answer.json`. Find a sequence of all jobs that respects every precedence pair and **minimises** total weighted tardiness: sum of w * max(0, C - due), where C is the job's completion time (start + sum of p up to and including the job). Any optimal sequence is accepted. Fresh instances have **20 and 21 jobs**; each run has a 90-second limit. ## answer.json `{"sequence": [job ids in order], "total_weighted_tardiness": integer}` ## Scoring Hidden checks (partial credit; all must pass). A sequence is **valid** if it is a permutation of the job ids, respects every precedence pair, and the reported objective equals the scorer's recomputation for that sequence. It is **optimal** if that objective equals the true minimum (the scorer has the optimum). `fixture_valid_sequence`, `fixture_optimal` (given 18-job instance); `fresh_20_jobs_valid`, `fresh_20_jobs_optimal`; `fresh_21_jobs_optimal`.

Greedy rules (WSPT, EDD, swaps) give valid but suboptimal sequences; an exact method (subset dynamic programming or a tight branch and bound) is needed. 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. fixture_valid_sequence 2. fixture_optimal 3. fresh_20_jobs_valid 4. fresh_20_jobs_optimal 5. fresh_21_jobs_optimal

Best model for this task so far: Claude Haiku 5.5 (effort default (no --effort flag) · thinking on) (success, $0.01, 11m).

Run this on another 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.ⓘ

Runs for this use case
ModelCostTimeStep-insⓘAutonomyOutcomeTrustⓘDateCompare
OGPT-6.1 Soldefault · thinking on$0.061m0Fully autonomouspassTrust 80%2026-10-22
AClaude Haiku 5.5default · thinking on$0.0111m0Fully autonomouspassTrust 80%2026-10-20
AClaude Opus 5.5default · thinking on$0.1750s0Fully autonomouspassTrust 80%2026-10-20
AClaude Sonnet 5.5default · thinking on$0.0634s0Fully 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 Optimal single-machine job sequence (weighted tardiness with precedence)

Get new runs and ranking changes weekly

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