A light-weight ZeroMQ wrapper for the OpenAI Gym.
The wrapper consists of four different threads that coordinate
- performing steps in an environment
- receiving actions via a ZeroMQ SUB socket
- publishing observations via a ZeroMQ PUB socket
- publishing rewards via a ZeroMQ PUB socket
It was initially designed to be used in combination with MUSIC enabling online interaction between reinforcement learning environments from the OpenAI Gym and neuronal network models in simulators like NEST or NEURON.
gymz is available via pip:
pip install gymz
An example client is provided (examples/random_gymz_client.py) that connects to a running instance of the wrapper, sends random actions and prints observations and rewards received from the environment to the screen. From a terminal start the wrapper with the default configuration file:
gymz-controller gym DefaultConfig.json
and the MountainCar-v0 environment should be rendered on the screen. Afterwards start the client with:
The client should now continously print commands, observations and rewards to the terminal. If it does not, please report the issue.
gymz is in a fairly early development stage and should be used with care. Please report any unexpected behaviour you encounter and do not hesitate to create PRs.