Uh oh!
There was an error while loading. Please reload this page.
Restrict SCML player protocol - #111
Conversation
Uh oh!
There was an error while loading. Please reload this page.
john-b-yang
commented
Jun 29, 2026
Hey @Muhtasham thanks so much for doing this! Yeah to follow up with your question, I think this design totally makes sense. Looks like most of the scaffolding around the But this is great! Just merged this and the #110 fixes, I think it looks great! thank u so much again for doing this, will look at abides and bomberland next. |
Summary
OneShotAgentsubmissions with a restricteddecide(observation)policy functionmax_policy_errorsfallback disablingDesign Choice For Review
This intentionally makes SCML more CodeClash-controlled than a native simulator-agent submission.
Instead of letting submitted code subclass SCML
OneShotAgentdirectly, the arena exposes only a plain policy callback:The trusted runtime owns the actual SCML agents and converts policy decisions into validated negotiation intents:
{"offer": [quantity, time, unit_price]}{"response": "accept" | "reject" | "end"}{}orNone: use the trusted greedy fallbackThe tradeoff is deliberate:
OneShotAgentsubmissions@john-b-yang could you sanity-check whether this restricted policy interface is the right CodeClash-compatible shape for SCML, or whether you would rather expose native SCML agent classes for more expressivity?
Verification
uv run ruff check codeclash/arenas/scml/scml.py codeclash/arenas/scml/runtime/run_scml.py tests/arenas/test_scml.pyuv run pytest -q tests/arenas/test_scml.py-> 10 passeduv run pytest -q tests/arenas-> 190 passeduv run pre-commit run --files codeclash/arenas/scml/scml.py codeclash/arenas/scml/runtime/README.md codeclash/arenas/scml/runtime/scml_agent.py codeclash/arenas/scml/runtime/run_scml.py configs/examples/SCML__dummy__r1__s2.yaml docs/reference/arenas/scml.md tests/arenas/test_scml.pydocker build -t codeclash/scml -f codeclash/arenas/scml/SCML.Dockerfile .decisions, zeropolicy_errors, zeroinvalid_decisions, and zerodisabled_policiesinvalid_decisions, and the world completed using trusted fallback behaviormax_policy_errors, and the world completed using trusted fallback behavioruv run python main.py configs/examples/SCML__dummy__r1__s2.yaml -o /private/tmp/codeclash-scml-protocol.sFesGl-> two launcher rounds completed, both players validated, details had active policy decisions and zero policy errorscodeclash/scmland reranconfigs/examples/SCML__dummy__r1__s2.yaml; both launcher rounds completed withpolicy_errors_total: 0andinvalid_decisions_total: 0uv run pytest -q-> 192 passed