Skip to content
This repository has been archived by the owner on Apr 29, 2021. It is now read-only.
/ Gridworld Public archive

OpenAI gym-based algorithm for the grid world problem

License

Notifications You must be signed in to change notification settings

addy1997/Gridworld

Repository files navigation

Gridworld

Status: Active (under active development, breaking changes may occur)


A grid-based environment for single agent systems based on openAI-gym.

Software License Build Status Stars Contributions Dependency Status

Installation

pip3 install -i https://test.pypi.org/simple/ Gridworld==0.0.1

Alternative installation

cd $HOME
git clone https://github.com/addy1997/Gridworld.git
cd Gridworld
virtualenv venv
source ./venv/bin/activate
pip install -e .

Note: you will get this message after installation(given below). This validates that the package installation is done properly.

drube

For errors

Visit this link

You might encouter this problem after installing and sourcing the env on your machine

You do not need to modify baselines repo.

Here is a minimal example. Say you have myenv.py, with all the needed functions (step, reset, ...). The name of the class environment is MyEnv, and you want to add it to the classic_control folder. You have to follow these steps

* Place myenv.py file in gym/gym/envs/classic_control

* Add to __init__.py (located in the same folder)

* from gym.envs.classic_control.myenv import MyEnv

* Register the environment in gym/gym/envs/__init__.py by adding

gym.envs.register(
     id='MyEnv-v0',
     entry_point='gym.envs.classic_control:MyEnv',
     max_episode_steps=1000,
)

_At registration, you can also add reward_threshold and kwargs (if your class takes some arguments). You can also directly register the environment in the script you will run (TRPO, PPO, or whatever) instead of doing it _

in gym/gym/envs/init.py.

Testing

import Gridworld
import gym 
env = gym.make('Grid-v0')

Feel free to raise an issue for errors.

Releases

No releases published

Packages

No packages published

Languages