Answer stability round 1: 0 🔴, 2 🟡; let one trigger buy one step, list run_judge's three quote checks in one place, rename floor to kept_rung

This commit is contained in:
2026-10-15 22:11:42 +02:00
parent e08f8d7ef8
commit ccc6b8adb2
5 changed files with 15 additions and 11 deletions
+4 -4
View File
@@ -32,10 +32,10 @@ def first_route(anchor: Rung, item: Item | None) -> Route:
def kept(route: Route, anchor: Rung) -> bool:
"""Whether a chunk keeps route: its rung is on the ladder and at or above item_rung."""
return floor(anchor, route) == route.rung
return kept_rung(anchor, route) == route.rung
def floor(anchor: Rung, route: Route) -> Rung:
def kept_rung(anchor: Rung, route: Route) -> Rung:
"""The route's rung, raised to item_rung where it is lower or off the ladder; kept and stepped both hold a route to it."""
return highest(route.rung, item_rung(anchor, route))
@@ -77,8 +77,8 @@ def stepped(anchor: Rung, route: Route, bundled: int, escalated: bool) -> Route:
def taken_in(anchor: Rung, route: Route, bundled: int) -> Rung:
"""floor, raised to the rung bundled picks from anchor; bundled is the highest R + C the judge saw the worker take into the chunk, 0 for none."""
return highest(floor(anchor, route), picked(anchor, bundled)) if bundled else floor(anchor, route)
"""kept_rung, raised to the rung bundled picks from anchor; bundled is the highest R + C the judge saw the worker take into the chunk, 0 for none."""
return highest(kept_rung(anchor, route), picked(anchor, bundled)) if bundled else kept_rung(anchor, route)
def judge_rung(judge_model: str, route: Route) -> Rung: