Giter Club home page Giter Club logo

gridworld's Introduction

Gridworld


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.

gridworld's People

Contributors

addy1997 avatar

Watchers

James Cloos 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.