Giter Club home page Giter Club logo

gym-maze's Introduction

gym-maze: A customizable gym environment for maze/gridworld

This repository contains a customizable gym environment for all kinds of mazes or gridworlds. The motivation of this repository is, as maze or gridworld are used very often in the reinforcement learning community, however, it is still lack of a standardized framework.

The repo will be actively maintained, any comments, feedbacks or improvements are highly welcomed.

Dependencies

This repository requires following packages:

  • gym >= 0.9.4
  • Python >= 3.6
  • Numpy >= 1.13.3
  • Matplotlib >= 2.1.1
  • Scikit-image >= 0.13.1
  • (Recommended) JupyterLab >= 0.31.0

Installation

cd gym_maze
pip install -e .

How to use by examples

We have provided a Jupyter Notebook to illustrate how to make various of maze environments, and generate animation of the agent's trajectory following the optimal actions solved by A* optimal planner.

Simple empty maze

Simple empty maze

Random block maze

Random block maze

Random maze

Random maze

Multiple T-maze

Multiple T-maze

Morris water maze

Morris water maze

How to create your own maze environment

  • Maze generator: You can define your own maze generator, simply by creating a class inherited from base class MazeGenerator and the class should look like at least:
class NewMazeGenerator(MazeGenerator):
    def __init__(self, args...):
        super().__init__()
        
        self.maze = ...
        ...        
    
    def sample_state(self):
        ...     
  • Maze solver: You can define your own maze solver. For now, please take a look at the code of Astar_solver.py.

TODO

  • More extensive documentations
  • More different kinds of mazes

gym-maze's People

Contributors

zuoxingdong avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.