Minimalistic Gridworld Environment (MiniGrid)

Maxime Chevalier-Boisvert 8fc72cda9f Fixed basicrl code il y a 7 ans
basicrl 8fc72cda9f Fixed basicrl code il y a 7 ans
gym_minigrid 8fc72cda9f Fixed basicrl code il y a 7 ans
.gitignore 8fc72cda9f Fixed basicrl code il y a 7 ans
LICENSE 51a5d9079d Initial commit il y a 7 ans
README.md 8fc72cda9f Fixed basicrl code il y a 7 ans
setup.py 51a5d9079d Initial commit il y a 7 ans
standalone.py 51a5d9079d Initial commit il y a 7 ans

README.md

Minimalistic Grid World Environment (MiniGrid)

Simple and minimailistic grid world environment for OpenAI Gym.

Installation

Requirements:

  • Python 3
  • OpenAI gym
  • numpy
  • PyQT5
  • PyTorch (if using the supplied basicrl training code)
  • matplotlib (if using the supplied basicrl training code)

Start by manually installing PyTorch.

Then, clone the repository and install the other dependencies with pip3:

git clone https://github.com/maximecb/gym-minigrid.git
cd gym-minigrid
pip3 install -e .

Usage

To run the standalone UI application, which allows you to manually control the agent with the arrow keys:

./standalone.py

The environment being run can be selected with the --env-name option, eg:

./standalone.py --env-name MiniGrid-Fetch-8x8-v0

To see available environments and their implementation, look at simple_envs.py.

Basic reinforcement learning code is provided in the basicrl subdirectory. You can perform training using the ACKTR algorithm with:

python3 basicrl/main.py --env-name MiniGrid-Empty-8x8-v0 --no-vis --num-processes 32 --algo acktr

You can view the result of training using the enjoy.py script:

python3 basicrl/enjoy.py --env-name MiniGrid-Empty-8x8-v0 --load-dir ./trained_models/acktr