Skip to main content

A set of reinforcement learning environments for tile matching games, consistent with the OpenAI Gymnasium API.

Project description

Tile Matching Reinforcement Learning Environments

Welcome to the Reinforcement Learning Environments for Tile Matching Games repository! Here you can find a collection of tile matching game environments (like Bejeweled or Candy Crush), poised to push reinforcement learning research forwards.

This genre of games is characterised by the following features, which we find useful for reinforcement learning research:

  • Large action spaces
  • Intuitive action hierarchies
  • Procedurally generated levels
  • Structured complex stochasticity in transition dynamics

Installation

You can install the package via pip:

pip install tile-match-gym

Example Usage

We follow the the Farama Foundation Gymnasium API:

from tile_match_gym.tile_match_env import TileMatchEnv

env = TileMatchEnv(
  num_rows=10, 
  num_cols=10, 
  num_colours=4, 
  num_moves=30, 
  colourless_specials=["cookie"], 
  colour_specials=["vertical_laser", "horizontal_laser", "bomb"], 
  seed=2
  render_mode="human",
  )

obs, _ = env.reset()

while True:
    action = env.action_space.sample()
    next_obs, reward, done, truncated, info = env.step(action)
    env.render()
    if done:
        break
    else:
      obs = next_obs

Citation

We'd love it if you use our package for your research! If you do use code from this repository please cite us as below:

@software{tile_match_gym,
  author = {Patel, Akshil and Elson, James},
  title = {{Tile Matching Game Reinforcement Learning Environments}},
  url = {https://github.com/akshilpatel/tile-match-gym},
  version = {1.0.3},
  year = {2023}
  }

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

tile_match_gym-1.0.3.tar.gz (20.9 kB view details)

Uploaded Source

Built Distribution

tile_match_gym-1.0.3-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file tile_match_gym-1.0.3.tar.gz.

File metadata

  • Download URL: tile_match_gym-1.0.3.tar.gz
  • Upload date:
  • Size: 20.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.12

File hashes

Hashes for tile_match_gym-1.0.3.tar.gz
Algorithm Hash digest
SHA256 eafd426265cc2c4ab030aeab4fadf2a4e074f6133ca3696d4cccee498f8690f9
MD5 41ca85addb6c6a8e0a9d2bf4fa7ab152
BLAKE2b-256 82f38d83664e1f25bd82133615527682b2a90454e75786e9098da2b23436eec9

See more details on using hashes here.

File details

Details for the file tile_match_gym-1.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for tile_match_gym-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 7d67fd6bb92ca69fc408e61e11612a22015ea851e3e6f6a6687883dfd608fb39
MD5 a7e423a99ca2dc6074a8a79818b3d563
BLAKE2b-256 7aeb3ab02c0c7b4dfeec247995a41aba5b97b6ad43f04756115346ab38e5216a

See more details on using hashes here.

Supported by

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