Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 1.02 KB

README.md

File metadata and controls

51 lines (32 loc) · 1.02 KB

gym-herding

Leader-agent herding OpenAI Gym Environment

Setup

Installation

To install this gym environment, please clone the repository to the directory you desire:

~$ git clone https://github.com/acslaboratory/gym-herding

Next install the environment using pip like this:

~$ python3 -m pip install -e gym-herding

Uninstall

If you wish the uninstall the environment, you can simply do so using pip:

~$ python3 -m pip uninstall gym-herding

Initialize the Environment

To initialize the default environment, use the following environment register:

import gym

env = gym.make("gym-herding:Herding-v0")

Before using the environment, you must first initialize the environment using the HerdingEnvParameter() class as such:

from gym_herding.env.parameters import HerdingEnvParameter

n_v = 2    # Square root of the graph size
n_p = 100  # Agent population size
weights = [8/10, 2/10]

hep = HerdingEnvParameter(n_v, n_p, weights)

env.initialize(hep)