Skip to content

koulanurag/maze-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

maze-world

Random maze environments with different size and complexity for reinforcement learning and planning research. This is in-particular to investigate generalization and planning ability in dynamically changing environment.

Python package Python Version pages-build-deployment Sphinx: Render docs Upload Python Package Open In Colab

Disclaimer: This project is largely a amalgam of references mentioned here.

Installation

  • Using PyPI:

    pip install maze-world
    
  • Directly from source (recommended):

    git clone https://github.com/koulanurag/maze-world.git
    cd maze-world
    pip install -e .

Environments Zoo!

RandomMaze-11x11-v0 RandomMaze-21x21-v0 RandomMaze-31x31-v0 RandomMaze-101x101-v0
RandomMAze-11x11-v0.gif RandomMAze-21x21-v0.gif RandomMAze-11x11-v0.gif RandomMAze-21x21-v0.gif

See all here.

Quick-Start:

import gymnasium as gym

env = gym.make("maze_world:RandomMaze-11x11-v0", render_mode="human")
terminated, truncated = False, False
observation, info = env.reset(seed=0, options={})
episode_score = 0.

while not (terminated or truncated):
    action = env.action_space.sample()
    observation, reward, terminated, truncated, info = env.step(action)
    episode_score += reward

env.close()

See entire quick-start guide here.

Testing:

  • Install: pip install -e ".[test]"
  • Run: pytest -v --xdoc --cov=./ --cov-report=xml

Development:

If you would like to develop it further; begin by installing following:

pip install -e ".[develop]"

References:

  1. Gym-Maze
  2. Mazelab
  3. Custom Gym environment based out of gymnasium
  4. Wilson Maze Generator