Skip to content

OpenAI gym-based algorithm for the grid world problem

License

Notifications You must be signed in to change notification settings

Adwait1997/Gridworld

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

68 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

About

OpenAI gym-based algorithm for the grid world problem

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%