Skip to content

ACSLaboratory/gym-herding

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

Leader-agent herding OpenAI Gym Environment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages