DerwenAI / gym_trivial

A minimal implementation of an OpenAI Gym environment, which simulates an `AND` gate

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gym_trivial

A trivial implementation of an OpenAI Gym environment, to illustrate and explore the baseline operations.

Usage

Clone the repo and connect into its top level directory. Then run:

pip install -r requirements.txt
pip install -e gym-trivial

python example.py

If you want to use this environment to train a policy in RLlib the first install via:

pip install git+git://github.com/DerwenAI/gym_trivial.git#egg=pkg&subdirectory=gym-trivial

Then after launching Ray run:

from gym_trivial.envs.trivial_env import Trivial
from ray.tune.registry import register_env

register_env("trivial-v0", lambda config: Trivial())

Kudos

h/t:

About

A minimal implementation of an OpenAI Gym environment, which simulates an `AND` gate

License:MIT License


Languages

Language:Python 100.0%