You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
con: policies cannot use the full native SCML agent API directly, so this is less expressive than native OneShotAgent submissions
@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.py
uv run pytest -q tests/arenas/test_scml.py -> 10 passed
uv run pytest -q tests/arenas -> 190 passed
uv 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.py
direct Docker starter smoke: two sims completed; all details had nonzero decisions, zero policy_errors, zero invalid_decisions, and zero disabled_policies
direct Docker invalid-output smoke: invalid offers/responses were rejected, logged as invalid_decisions, and the world completed using trusted fallback behavior
direct Docker infinite-loop smoke: looping policies hit per-decision timeout, were disabled after max_policy_errors, and the world completed using trusted fallback behavior
uv 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 errors
after adding worker startup handshakes: rebuilt codeclash/scml and reran configs/examples/SCML__dummy__r1__s2.yaml; both launcher rounds completed with policy_errors_total: 0 and invalid_decisions_total: 0
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 decide function is not really necessary, in that it's more for interacting/interfacing with the game rather than actually reflecting any decision making components. So I think we can definitely go with this, I don't have any strong inclination. The original is ok as well in that the agent has slightly more control over more of the code, although it increases the surface area for where agents could mess up the code (which not be the worst thing for evaluation 😛 )
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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