Skip to main content

Gameworld: Environments for 2-D Arcade Games in Python

Project description

Gameworld 10k

The Gameworld environments are designed to develop sample-efficient learning algorithms, which is enforced in the challenge by limiting the interactions to 10K steps. These environments could be solved by humans within minutes, ensuring that learning does not hinge on brittle exploration or complex credit assignment.

Gameworld also supports controlled perturbations such as changes in object color or shape, testing an agent's ability to generalize across superficial domain shifts.

Environments

The suite includes 10 diverse games generated with the aid of a large language model, drawing inspiration from ALE and classic video games, while maintaining a lightweight and structured design.

AviateBounceCrossDriveExplode
FruitsGoldHuntImpactJump

Installation

To install the gameworld library, either use the pypi registry pip install gameworld, or install from source by cloning the repository and running pip install -e ..

This library has been developed and tested onpython3.11 for both Linux and macOS.

API

The Gameworld environments use the gymnasium.Gym api. To run your own algorithm against our environments, create an environment instance as:

import gameworld.envs # Triggers registering the environments in Gymnasium
import gymnasium

game = "Aviate"
env = gymnasium.make(f"Gameworld-{game}-v0")

obs, info = env.reset()

for t in range(10_000):
    # random actions as example
    action = env.action_space.sample()

    # step env
    obs, reward, done, truncated, info = env.step(action)

    # reset when done
    if done:
        obs, info = env.reset()

Perturbations

The Gameworld environments support controlled perturbations in order. For each environment, you can choose no (None), shape (shape), or a color (color) perturbation.

For example, a shape perturbation after 5000 steps in the Explode environment can be created using the following snippet:

env = gymnasium.make(
    f"Gameworld-Explode-v0", perturb='shape', perturb_step=5000
)

Below we show an example of a shape and color perturbation on Explode and Fruits:

Explode ColorExplode ShapeFruits ColorFruits Shape

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gameworld-0.1.0.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gameworld-0.1.0-py3-none-any.whl (35.3 kB view details)

Uploaded Python 3

File details

Details for the file gameworld-0.1.0.tar.gz.

File metadata

  • Download URL: gameworld-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for gameworld-0.1.0.tar.gz
Algorithm Hash digest
SHA256 ffda9b8e06f405bc1255888d0c9d192d15e0025bad3140db29ecf36538ca1d65
MD5 9f5fa8f49ac5083133950e937c08a12a
BLAKE2b-256 cee3ff0ac23c10960b88f821d7a3f535921e15c1c502f137252dc391901ebef7

See more details on using hashes here.

File details

Details for the file gameworld-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gameworld-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 35.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for gameworld-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4153803fa7e3996ccfd42cd667c5af4a6cc700cd2f9af2662d7b2690d23d8836
MD5 6f60c927ae793b28cc16930f2ee2795e
BLAKE2b-256 998cf3523ccc6244e778fd8bd7aa49fd18498df80e6f687cc154bf293c6274eb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page