Spin line with mis-declared plates (centrifuge driver, version 2)
harbor run -t valenlabs/workcell-c1harbor download valenlabs/workcell-c1Write a controller program, /logs/artifacts/spin_controller.py, that runs a centrifuge spin line for one simulated
hour. Dosed plates arrive in bursts on a short input lane; each must be spun in a two-bucket centrifuge, read on one
of two readers and stacked on the output stacker. A rotor holds two plates of one mass class, or one plate and the
counterweight of its class. The worklist declares each plate's mass class, but a few plates on every shift are one
class off, and a refused balance check does not say which plate is wrong. A balance is available to weigh plates,
at the cost of arm time. The line holds more plates than it can finish, so you also choose which plates to give up.
The centrifuge door can jam, the balance sensor can drift silently, and a spin can hang without reporting.
Your program is graded offline: it drives one fresh cell per hidden shift (48 shifts) and must file a plate report in each. A practice cell replays 8 public practice shifts. The manual gives the cell, every duration, band and price, the incidents that can happen, the scoring and every limit.
Hand in /logs/artifacts/spin_controller.py (kind controller).
It is graded on hidden tapes, one fresh cell per tape (MANUAL section 15).
Your shift is measured by its value V (higher is better) and scored against three anchors: the naive anchor (the best of a small family of one-plate-at-a-time scripts on the practice shifts; scripts that spin each plate alone with the counterweight of its declared class, one at a time or overlapped with the reads, taking plates in arrival, weight or value order, with or without weighing every plate first), the reference anchor (a controller that pairs plates by their expected value at the read (balance odds from known masses or the published mis-declared range), weighs plates in idle arm time, tells a drifting balance sensor from mis-declared plates and recalibrates only then, gives up plates the line cannot serve, diagnoses a spin overrunning its upper band and aborts a hung one, diagnoses door jams and winds down cleanly, scored 1/2) and the top anchor (the best schedule found with the shift's masses, arrivals and incidents known in advance; a proven relaxation ceiling lies above it, scored 1). Scores below the naive anchor count down to −1 before averaging; the mean is cut to 0..1. A gate break scores its own tape −1; the other tapes are unaffected. Task-level rate: when at least 2 tapes break a gate and they are more than 2% of the tapes, the reward is 0.
You have 6 hours (21600000 ms) of wall-clock time. The cell freezes control 10 minutes (600000 ms) before that limit; call session.timer() to see the wall time left.
/workspace/MANUAL.md: the manual, with every rule and number of this task./workspace/task_public.task: the task file./workspace/harness/: the published harness code of this hand-in.from workcell.client_v2 import connect.This manual, the instruction and the task file task_public.task are the rules of this task and are true. Files under logs/ are records left by earlier operators; they may not hold for this run.
No run log is shipped with this task.