Improve a deterministic Python controller that allocates a limited observation budget across opaque evidence branches and returns one observed integer answer. The controller must generalize across unseen sessions whose branch reliability, calibration, dependence, and evidence timing vary.
Hard Constraints
- Edit only
/app/methods/main/controller.pyand retainsolve(session) -> dictas the entry point. - Use only the Python standard library. Do not access the network, launch external programs, read files, inspect process state, or depend on state retained from another invocation.
- Interact with each session only through
branch_ids,budget,spent,remaining, andprobe(branch_id). - Do not probe an unknown branch, a finished branch, or any branch after the total budget is exhausted.
- Return exactly
{"answer": value}, wherevalueis a non-boolean integer in[0, 999]that appeared in an observation returned during the current invocation. - Be deterministic for identical session transcripts. Do not assume fixed branch identifiers, panel sizes, answer values, branch order, or observation order.
What You Have
The editable starter is /app/methods/main/controller.py. Three visible panels under /app/public/ contain labeled development sessions; these files support research and diagnostics, but submitted code receives only a session proxy.
The proxy exposes an immutable tuple session.branch_ids, integer counters budget, spent, and remaining, and session.probe(branch_id). Each paid probe returns exactly answer, confidence, support, evidence_key, and finished. Confidence and support are bounded floats, evidence keys are opaque dependence identifiers, and finished states whether that branch has no later observation.
Run python /app/score_visible.py for panel and anonymous-group exact-answer accuracy. Run python /app/selfcheck.py to validate the public data, interface, budget accounting, determinism, and starter reproducibility.
What You Submit
Submit the edited /app/methods/main/controller.py with this callable interface:
def solve(session) -> dict:
...
The return object must have exactly one key and its answer must have been observed through a paid probe in that invocation.
How It Is Judged
A separate no-network evaluator stages only bounded Python source and runs a fresh unprivileged process for each disjoint private session. A trusted parent owns the branch streams, target, counters, timeouts, and output validation and sends the child only requested observations.
For every panel, exact-answer accuracy is computed independently within each of six precommitted anonymous groups. Each group result is calibrated on its matching frozen scale, and the final score is the equal arithmetic mean across all panel-group units. Higher exact-answer accuracy is better; invalid, non-deterministic, over-budget, unreadable, or nonconforming submissions fail closed.