Skip to main content

Customisable 3D benchmark for assessing generalisation in Reinforcement Learning.

Project description

MazeExplorer

MazeExplorer is a customisable 3D benchmark for assessing generalisation in Reinforcement Learning.

It is based on the 3D first-person game Doom and the open-source environment VizDoom.

This repository contains the code for the MazeExplorer Gym Environment along with the scripts to generate baseline results.

By Luke Harries*, Sebastian Lee*, Jaroslaw Rzepecki, Katja Hofmann, and Sam Devlin.
* Joint first author

Default textures Random Textures Random Textures

The Mission

The goal is to navigate a procedurally generated maze and collect a set number of keys.

The environment is highly customisable, allowing you to create different training and test environments.

The following features of the environment can be configured:

  • Number of maps
  • Map Size (X, Y)
  • Maze complexity
  • Maze density
  • Random/Fixed keys
  • Random/Fixed textures
  • Random/Fixed spawn
  • Number of keys
  • Environment Seed
  • Episode timeout
  • Reward clipping
  • Frame stack
  • Resolution
  • Action frame repeat
  • Actions space
  • Specific textures (Wall, ceiling, floor)

Example Usage

from mazeexplorer import MazeExplorer

train_env = MazeExplorer(number_maps=1,
              size=(15, 15),
              random_spawn=True,
              random_textures=False,
              keys=6)

test_env = MazeExplorer(number_maps=1,
              size=(15, 15),
              random_spawn=True,
              random_textures=False,
              keys=6)

# training
for _ in range(1000):
    obs, rewards, dones, info = train_env.step(train_env.action_space.sample())


# testing
for _ in range(1000):
    obs, rewards, dones, info = test_env.step(test_env.action_space.sample())

Installation

  1. Install the dependencies for VizDoom: Linux, MacOS or Windows.
  2. pip3 install virtualenv pytest
  3. Create a virtualenv and activate it
    1. virtualenv mazeexplorer-env
    2. source maze-env/bin/activate
  4. Git clone this repo git clone https://github.com/microsoft/MazeExplorer
  5. cd into the repo: cd MazeExplorer
  6. Pull the submodules with git submodule update --init --recursive
  7. Install the dependencies: pip3 install -e .
  8. Run the tests: bash test.sh

Baseline experiments

The information to reproduce the baseline experiments is shown in baseline_experiments/experiments.md.

Contributing

This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.microsoft.com.

When you submit a pull request, a CLA-bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., label, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact opencode@microsoft.com with any additional questions or comments.

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

mazeexplorer-1.0.0.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

mazeexplorer-1.0.0-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file mazeexplorer-1.0.0.tar.gz.

File metadata

  • Download URL: mazeexplorer-1.0.0.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

File hashes

Hashes for mazeexplorer-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8f4f2fef5ef304f9dee69e5f187d828aed6897fe22528d0e3f6c8a3efd99115e
MD5 5e8c0fb430f6d7e86e825687a314c4d3
BLAKE2b-256 6eed808f2dd170bfa7c44844cfa796c281fe940b4c1855bcc4d28cd05dea9ae3

See more details on using hashes here.

File details

Details for the file mazeexplorer-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: mazeexplorer-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.5

File hashes

Hashes for mazeexplorer-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2b6894ff9e4a82edde383ce2790185e0eb49daa012cbae9a4101f40c038066fc
MD5 ac82e4c5dc5278cee100c15a7e71e07e
BLAKE2b-256 51a976fc723b386dcfbe06cc8e680a82afd1da6524719d7e6149cfaad4e6f526

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