Add Bomberman two-player environment (revives #93) - #198
Open
borgr wants to merge 1 commit into
Open
Conversation
Revives the two-player Bomberman game (originally proposed in TextArena#93) ported to the current TextArena environment API: - State created in reset() as TwoPlayerState; reset(num_players, seed). - Observations use ObservationType; invalid moves use set_invalid_move(reason=). - Single-winner outcomes use set_winner(); mutual destruction and the turn (round) limit resolve to a draw. - Dropped the unused numpy dependency and the dead offline_renderer import; added get_board_str() for the board-observation wrappers. - Fixed spawn cells being placed on indestructible pillars (spawn cell is now forced clear) and rejected placing a bomb on top of an existing bomb. Registered as Bomberman-v0. Bomb/explosion/destructible-wall mechanics are unchanged from the original submission.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Revives the two-player Bomberman environment, originally proposed by @romirthedev in #93. That PR targeted an older State/observation API and no longer imports against current
main, and the author is no longer active, so this ports it forward and verifies it end-to-end.What this is
A turn-based two-player Bomberman on a grid with indestructible (
#) and destructible (+) walls. Each turn a player moves ([up]/[down]/[left]/[right]), waits ([stay]), or drops a bomb ([bomb]). Bombs detonate after a timer with a cross-shaped blast that destroys destructible walls and eliminates players caught in it. Last player standing wins; both caught in one blast, or reaching the round limit, is a draw. Registered asBomberman-v0.Changes vs. the original submission
reset()asTwoPlayerState;reset(num_players, seed)signature.ObservationType; invalid moves useset_invalid_move(reason=).set_winner(); mutual destruction and the round limit resolve to a draw.numpydependency and the deadoffline_rendererimport; addedget_board_str().ActionFormattingWrapper.Verification
ta.make("Bomberman-v0")→ reset / observation / valid move all work.Closes #93 if you'd rather track it here; otherwise feel free to keep #93 open and land this instead.