Skip to content

Add alpha BattleCast Arena environment#1367

Draft
stale2000 wants to merge 2 commits into
Kaggle:masterfrom
stale2000:agent/add-battlecast-arena
Draft

Add alpha BattleCast Arena environment#1367
stale2000 wants to merge 2 commits into
Kaggle:masterfrom
stale2000:agent/add-battlecast-arena

Conversation

@stale2000

@stale2000 stale2000 commented Jul 25, 2026

Copy link
Copy Markdown

Alpha: BattleCast Arena for Kaggle Environments

This is an alpha proposal for a head-to-head D&D tactical-combat environment. Feedback is especially welcome before treating the protocol or ruleset as stable.

What this adds

battlecast_arena is a two-agent, four-member-party environment backed by battlecast-engine 0.1.1. The engine is a deterministic D&D 5e (2024 SRD) combat and rules engine. Kaggle Environments owns the episode lifecycle, agent isolation, status, rewards, and replay integration; the engine owns party validation, legal actions, combat resolution, and seeded randomness.

The image installs the exact engine version and calls its versioned stdio bridge (battlecast-engine arena kaggle-step). The adapter does not duplicate D&D rules.

Engine repo found here: https://github.com/stale2000/battlecast-engine/tree/main

Competition goal

The goal is an auditable 4v4 head-to-head simulation competition:

  • Each entrant submits exactly four validated level-5 heroes during setup.
  • On each turn, only the currently active side receives its legal actions and submits one action.
  • The engine resolves every roll from a hidden, episode-specific seed, so a completed match can be reproduced exactly.
  • Invalid builds or stale/illegal actions forfeit the submitting player; bridge failures are reported as environment errors rather than silently changing outcomes.
  • Authoritative engine state and RNG state remain hidden from live agents, while retained replays support post-match auditability.

Alpha plan

  1. Merge this environment and run it in the competition image with the pinned npm package.
  2. Gather feedback on party-build constraints, legal-action observation shape, round cap, timeouts, and replay/visualization needs.
  3. Run a small closed evaluation set with fixed seeds plus a hidden multi-seed set.
  4. Add a purpose-built visualizer and tournament configuration only after the gameplay contract stabilizes.
  5. Promote the environment from alpha when reproducibility, fairness, runtime limits, and rules coverage have been reviewed.

Feedback requested

Please comment on:

  • Whether the initial fixed four-hero level-5 roster/build surface is the right alpha scope.
  • Whether the hidden-state and replay model meets Kaggle competition requirements.
  • Appropriate action/bridge timeouts and the 20-round draw policy.
  • What minimum visualizer, documentation, and anti-cheat review are required before a public competition.

Validation

  • py -3.12 -m pytest tests/envs/battlecast_arena -q - 6 passed.
  • Published battlecast-engine@0.1.1 CLI smoke test - initializes eight heroes at distinct positions and accepts a turn step.
  • Engine package validation - 98 test files / 1260 tests passed, plus package smoke test.

@google-cla

google-cla Bot commented Jul 25, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@stale2000

Copy link
Copy Markdown
Author

The contributor has signed the Google CLA and the retry SHA now passes the CLA check. The previous backend check did not execute the build: Cloud Build reported that it needs /gcbrun from a collaborator. Could a Kaggle collaborator please comment /gcbrun to run the backend image build and test suite?

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.

1 participant