Skip to content

Add Bomberland arena#105

Open
Muhtasham wants to merge 3 commits into
CodeClash-ai:mainfrom
Muhtasham:feat/bomberland-arena
Open

Add Bomberland arena#105
Muhtasham wants to merge 3 commits into
CodeClash-ai:mainfrom
Muhtasham:feat/bomberland-arena

Conversation

@Muhtasham

@Muhtasham Muhtasham commented May 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a Bomberland arena to CodeClash as a separate game adapter.

Bomberland is a Bomberman-style multi-agent grid arena based on Coder One's Bomberland competition. Players submit bomberland_agent.py with next_actions(game_state), controlling multiple units that move, place bombs, destroy blocks, damage opponents, and score across deterministic seeded simulations.

Competition Format

Bomberland is direct head-to-head competition.

Each simulation contains both submitted players in the same grid world. Their units, bombs, blasts, movement collisions, damage, kills, and block destruction all affect the shared game state. Scores are computed from that shared interaction, and sims_per_round is required to be even so the runtime can alternate starting sides across paired seeded simulations.

This is the standard CodeClash arena shape where submitted code directly competes in the same environment, unlike independent score-maximization arenas such as CybORG or ABIDES.

What changed

  • Added BomberlandArena and registered it in the arena registry.
  • Added a codeclash/bomberland Docker image that pins the upstream CoderOneHQ/bomberland repo for provenance at /opt/bomberland.
  • Added a compact CodeClash-native Python runtime instead of requiring the upstream TypeScript websocket/docker-compose stack inside the arena container.
  • Added a starter bomberland_agent.py, runtime README, public docs page, and dummy smoke config.
  • Added unit coverage for validation, result parsing, command construction, registration, runtime timeouts, sibling imports, malformed actions, missing result files, and config constraints.

Runtime contract

  • Exactly two players per tournament.
  • sims_per_round must be even so both players receive paired starting sides.
  • validation_timeout bounds validation-time import/probe execution.
  • agent_timeout bounds each runtime agent call in a child process, so hanging submitted code is scored as an agent error instead of hanging the round.
  • Result files use average_scores, total_scores, sims, and per-simulation details JSON strings.

Notes

  • Issue Add Pommerman as a game #8 tracks Pommerman. This PR adds Bomberland, which is related in game style but is not the same project, so it intentionally does not close Add Pommerman as a game #8.
  • The runtime keeps the submission interface close to the upstream starter-kit shape where practical: connection.agent_id, agents[player].unit_ids, unit_state, entities, world, and tick.

Verification

  • uv run ruff check codeclash/arenas/bomberland/bomberland.py codeclash/arenas/bomberland/runtime/run_bomberland.py tests/arenas/test_bomberland.py -> passed
  • uv run pytest -q tests/arenas/test_bomberland.py -> 16 passed after final validation-timeout fix
  • uv run pytest -q tests/arenas -> 201 passed during final reviewer pass
  • uv run pre-commit run --files codeclash/arenas/bomberland/bomberland.py codeclash/arenas/bomberland/runtime/run_bomberland.py tests/arenas/test_bomberland.py -> passed
  • docker build -t codeclash/bomberland -f codeclash/arenas/bomberland/Bomberland.Dockerfile . -> passed
  • full CodeClash dummy smoke: uv run python main.py configs/examples/Bomberland__dummy__r1__s2.yaml -o /private/tmp/codeclash-bomberland-review.4EK2ez
    • both players passed validation
    • two launcher rounds completed
    • result artifacts contained average_scores, per-sim details, alive_hp, alive_units, and per-player stats fields
  • direct Docker adversarial smoke with malformed and infinite-loop agents:
    • malformed actions were counted as invalid_actions
    • looping agent calls were contained as agent_errors
    • the runtime completed and wrote finite scores
  • OpenAI-backed mini-SWE-agent v2 smoke: one openai/gpt-4.1-mini player vs dummy, 1 round, 2 Bomberland sims, Docker runtime. Both pre-edit and post-edit Bomberland rounds completed with zero agent errors and scores of 220.0 for both players.
  • GPT-5.5-backed mini-SWE-agent v2 smoke: one openai/gpt-5.5 player vs dummy, 1 round, 2 Bomberland sims, Docker runtime. The pre-edit round tied at 220.0 / 220.0; GPT-5.5 edited the bot; the post-edit round validated and scored 445.0 / 220.0 for gpt55_smoke, with no invalid submissions.
  • final reviewer-pass patch: validation subprocess timeouts now invalidate the submission cleanly, and missing runtime result files now produce explicit CRASH_SCORE details instead of silent crash scores.
  • PR CI: markdown link check, pre-commit, and pytest are green.

@Muhtasham Muhtasham force-pushed the feat/bomberland-arena branch 2 times, most recently from 4e12494 to 9a53f59 Compare May 5, 2026 12:17
@Muhtasham Muhtasham force-pushed the feat/bomberland-arena branch from 9a53f59 to 365a122 Compare June 24, 2026 22:50
@Muhtasham Muhtasham requested a review from john-b-yang June 25, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Pommerman as a game

1 participant