Giter Site home page Giter Site logo

naiwo / bombermanai Goto Github PK

View Code? Open in Web Editor NEW
4.0 1.0 1.0 282 KB

A custom environment that implements simplified version of BomberMan game for reinforcement learning experiments.

License: MIT License

Python 100.00%
pettingzoo gym-environment reinforcement-learning multiagent gym game-theory bomberman-game

bombermanai's Introduction

License: MIT

BomberManAI

MARL Environment - Multi Agent Reinforcement Learning Environment

BomberManAI is an implementation of a simplified version of the classic game. Here walls are not used and there are no special events/powers for players. Your goal is to collect as many coins as you can. At the same time, you have to avoid bombs that can harm the player by taking away coins. You can use bombs to hurt your opponent and decrease his score. The limit of game is number of episodes or score limit. The winner is the player who has collected the most coins.

You can run the environment in multiple configurations. An agent learned using RL can face an agent learned using evolutionary computation or your own written heuristics. You can also control the agent yourself, trying your hand against learned opponents. Examples of how to train agents can be found here - BomberManAI/bomberman/training.

Alt Text

Requirements


Game

python == 3.8
pettingzoo == 1.16.0
gym == 0.21.0
pygame == 2.1.0 

For the purpose of training agents

ray == 1.10.0
torch == 1.11.0
deap == 1.3.1

Parameters setting

./game/config.py

In above file you can find all game settings. You can manipulate them to adjust the environment.

Examples

from bomberman.usage.manual_policy import run_manual_policy

run_manual_policy()

from bomberman.usage.manual_control import run_manual_control

run_manual_control()

from bomberman.usage.random_simulation import run_random_simulation

run_random_simulation()

bombermanai's People

Contributors

naiwo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

happywht

bombermanai's Issues

Feature request: update PettingZoo version

Hi, would it be possible to update this repo to use the most recent version of PettingZoo? This project is listed in PettingZoo's third-party-environments, but we only want to include environments which work with the current version.

If you need any help working out issues due to different versions feel free to ask, there were some breaking changes in version 1.2, so it requires a bit of code changes to adapt. The previous API returned done in the step() function, whereas the new one returns truncated and terminated (matching gymnasium). There is a migration guide for gymnasium explaining the changes further, the steps should be basically the same (we're working on making resources for updating old PettingZoo repositories as well): https://gymnasium.farama.org/content/migration-guide/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.