Skip to content

A deep reinforcement learning OpenAI Gym environment and trained agent models

License

Notifications You must be signed in to change notification settings

wenhuans/gymSlug

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GymSlug

This is a registered custom gym environment for reinforcement learning toward bio-inspired, explainable control of Aplysia californica feeding via motor neuron control. Please refer to [pending] for details.

usage.ipynb provides an example of a complete training routine using DQN

Open In Colab

Basic usage below:

Installation

  1. unzip GymSlug.zip
  2. cd GymSlug
  3. pip install -e .

Obtain expert performance under unbreakable seaweed scenario (as benchmark/goal for the reinforcement agent)

from aplysia_feeding_ub import AplysiaFeedingUB
from datetime import date

suffix = str(date.today())
xlimits = [0,60]
aplysia = AplysiaFeedingUB() # change to aplysia = AplysiaFeedingB() for breakable seaweed scenario
aplysia.SetSensoryStates('swallow')
aplysia.RunSimulation()
aplysia.GeneratePlots('Swallow_'+suffix,xlimits)

Create a new instance of the GymSlug environment

env = gym.make("gym_slug:slug-v0") # for unbreakable seaweed
env = gym.make("gym_slug:slug-v1") # for breakable seaweed (variable seaweed strength)

About

A deep reinforcement learning OpenAI Gym environment and trained agent models

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published