Skip to main content
diambra

Documentation • Website

Linkedin • Discord • Twitch • YouTube • Twitter

Paper

Arena Test Agents Test Latest Tag Pypi version

Supported OS Last Docs Update

DIAMBRA Arena

Index

Overview

DIAMBRA Arena is a software package featuring a collection of high-quality environments for Reinforcement Learning research and experimentation. It provides a standard interface to popular arcade emulated video games, offering a Python API fully compliant with OpenAI Gym/Gymnasium format, that makes its adoption smooth and straightforward.

It supports all major Operating Systems (Linux, Windows and MacOS) and can be easily installed via Python PIP, as described in the installation section below. It is completely free to use, the user only needs to register on the official website.

In addition, it comes with a comprehensive documentation, and this repository provides a collection of examples covering main use cases of interest that can be run in just a few steps.

Main Features

All environments are episodic Reinforcement Learning tasks, with discrete actions (gamepad buttons) and observations composed by screen pixels plus specific RAM states (like characters health bars or characters stage side).

They all support both single player (1P) as well as two players (2P) mode, making them the perfect resource to explore all the following Reinforcement Learning subfields:

standardRl competitiveMa competitiveHa selfPlay imitationLearning humanInTheLoop
Standard RL Competitive
Multi-Agent
Competitive
Human-Agent
Self-Play Imitation Learning Human-in-the-Loop

Available Games

Interfaced games have been selected among the most popular fighting retro-games. While sharing the same fundamental mechanics, they provide slightly different challenges, with specific features such as different type and number of characters, how to perform combos, health bars recharging, etc.

Whenever possible, games are released with all hidden/bonus characters unlocked.

Additional details can be found in the dedicated section of our Documentation.

doapp sfiii3n tektagt umk3 samsh6sp kof98umh
Dead
Or
Alive ++
Street
Fighter III
3rd Strike
Tekken Tag
Tournament
Ultimate
Mortal
Kombat 3
Samurai
Showdown
5 Special
The King of
Fighers '98
Ultimate
Match Hero
mvsc xmvsf soulclbr
Marvel
VS
Capcom
X-Men
VS
Street Fighter
Soul
Calibur

Many more are coming soon...

Competition Platform

DIAMBRA Competition Platform

Our competition platform allows you to submit your agents and compete with other coders around the globe in epic video games tournaments!

It features a public global leaderboard where users are ranked by the best score achieved by their agents in our different environments.

It also offers you the possibility to unlock cool achievements depending on the performances of your agent.

Submitted agents are evaluated and their episodes are streamed on our Twitch channel.

We aimed at making the submission process as smooth as possible, join us and try it now!

Installation

  • Create an account on our website, it requires just a few clicks and is 100% free

  • Install Docker Desktop: Linux | Windows | MacOS

  • Install DIAMBRA Command Line Interface: python3 -m pip install diambra

  • Install DIAMBRA Arena: python3 -m pip install diambra-arena

Using a virtual environment to isolate your python packages installation is strongly suggested

Quickstart & Examples

DIAMBRA Arena usage follows the standard RL interaction framework: the agent sends an action to the environment, which process it and performs a transition accordingly, from the starting state to the new state, returning the observation and the reward to the agent to close the interaction loop. The figure below shows this typical interaction scheme and data flow.

rlScheme

Download Game ROM(s) and Check Validity

Check out available games:

diambra arena list-roms

Output extract:

[...]
 Title: Dead Or Alive ++ - GameId: doapp
   Difficulty levels: Min 1 - Max 4
   SHA256 sum: d95855c7d8596a90f0b8ca15725686567d767a9a3f93a8896b489a160e705c4e
   Original ROM name: doapp.zip
   Search keywords: ['DEAD OR ALIVE ++ [JAPAN]', 'dead-or-alive-japan', '80781', 'wowroms']
   Characters list: ['Kasumi', 'Zack', 'Hayabusa', 'Bayman', 'Lei-Fang', 'Raidou', 'Gen-Fu', 'Tina', 'Bass', 'Jann-Lee', 'Ayane']
[...]

Search ROMs on the web using Search Keywords provided by the game list command reported above. Pay attention, follow game-specific notes reported there, and store all ROMs in the same folder, whose absolute path will be referred in the following as your/roms/local/path.

Specific game ROM files are required, check validity of the downloaded ROMs:

diambra arena check-roms your/roms/local/path/romFileName.zip

The output for a valid ROM file would look like:

Correct ROM file for Dead Or Alive ++, sha256 = d95855c7d8596a90f0b8ca15725686567d767a9a3f93a8896b489a160e705c4e

Make sure to check out our Terms of Use, and in particular Section 7. By using the software, you accept them in full.

Base script

Running a complete episode with a random agent requires about 10 python lines:

 import diambra.arena

 env = diambra.arena.make("doapp", render_mode="human")
 observation, info = env.reset(seed=42)

 while True:
     env.render()

     actions = env.action_space.sample()
     observation, reward, terminated, truncated, info = env.step(actions)

     if terminated or truncated:
         observation, info = env.reset()
         break

 env.close()

To execute the script run:

diambra run -r your/roms/local/path python script.py

Additional details and use cases are provided in the Getting Started section of the documentation.

Examples

The examples/ folder contains ready to use scripts representing the most important use-cases, in particular:

  • Single Player Environment
  • Multi Player Environment
  • Wrappers Options
  • Episode Recording
  • Episode Data Loader

These examples show how to leverage both single and two players modes, how to set up environment wrappers specifying all their options, how to record human expert demonstrations and how to load them to apply imitation learning. They can be used as templates and starting points to explore all the features of the software package.

diambraGif

Reinforcement Learning Libs Compatibility

DIAMBRA Arena is built to maximize compatibility will all major Reinforcement Learning libraries. It natively provides interfaces with the two most import packages: Stable Baselines 3 and Ray RLlib, while Stable Baselines is also available but deprecated. Their usage is illustrated in detail in the documentation and in the DIAMBRA Agents repository. It can easily be interfaced with any other package in a similar way.

Native interfaces, installed with the specific options listed below, are tested with the following versions:

  • Stable Baselines 3 | pip install diambra-arena[stable-baselines3] (Docs - GitHub - Pypi): 2.1.*
  • Ray RLlib | pip install diambra-arena[ray-rllib] (Docs - GitHub - Pypi): 2.7.*
  • Stable Baselines | pip install diambra-arena[stable-baselines] (Docs - GitHub - Pypi): 2.10.2

References

Support, Feature Requests & Bugs Reports

To receive support, use the dedicated channel in our Discord Server.

To request features or report bugs, use the GitHub Issue Tracker.

Citation

Paper: https://arxiv.org/abs/2210.10595

@article{Palmas22,
    author = {{Palmas}, Alessandro},
    title = "{DIAMBRA Arena: a New Reinforcement Learning Platform for Research and Experimentation}",
    journal = {arXiv e-prints},
    keywords = {reinforcement learning, transfer learning, multi-agent, games},
    year = 2022,
    month = oct,
    eid = {arXiv:2210.10595},
    pages = {arXiv:2210.10595},
    archivePrefix = {arXiv},
    eprint = {2210.10595},
    primaryClass = {cs.AI}
 }

Terms of Use

DIAMBRA Arena software package is subject to our Terms of Use. By using it, you accept them in full.

DIAMBRA, Inc. © Copyright 2018-2024. All Rights Reserved.

Metadata

Release files for diambra-arena 2.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diambra-arena 2.2.7
File Size Uploaded Provenance Actions
diambra_arena-2.2.7.tar.gz 226.7 kB Without provenance Details for diambra_arena-2.2.7.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for diambra-arena 2.2.7
File Interpreter ABI Platform Actions
diambra_arena-2.2.7-py3-none-any.whl Python 3 none any Details for diambra_arena-2.2.7-py3-none-any.whl

Total release size: 450.0 kB

Release files / diambra_arena-2.2.7.tar.gz

Download URL diambra_arena-2.2.7.tar.gz
Size 226.7 kB
Tags Source
SHA-256 checksum
How to use checksums
4b429228228d0289b68bc2bb08f08538c58e4eee5437a61b86ed345127eaf656
BLAKE2b-256 checksum
How to use checksums
54d385d752212b0a6ff1aa5c419882f883acab8ae547c5c7de00e95bdc2b8fba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Release files / diambra_arena-2.2.7-py3-none-any.whl

Download URL diambra_arena-2.2.7-py3-none-any.whl
Size 223.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6d0bf1b8b37e553e23010b251394a9a99154c7b58f49887befb92a8cb8873965
BLAKE2b-256 checksum
How to use checksums
87c12030189a87a25e9d6cd080e159536b8c1364b0ef894ef96467e8d322e7cf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.3

Security for diambra-arena 2.2.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

2.2.7 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page