Skip to content

Releases: cric96/scalapy-gym

Add Box2D enviroments

11 Nov 13:45
Compare
Choose a tag to compare

v0.1.3

08 Sep 08:23
7d6377a
Compare
Choose a tag to compare

New features:

  • ClassicControll environments typing

v0.1.0

03 Sep 09:21
Compare
Choose a tag to compare

First version of Scalapy gym!
Currently, it is impossible to create your own environment.

What can you do?

Use default gym from open-ai

val env = Gym.make[Int, Int, Discrete, Discrete]("FrozenLake-v1") // Creates the FrozenLake environement (typed)
val env = Gym.makeGenericSpaces[Discrete, Discrete]("FrozenLake-v1") // Untyped action and observation, typed observation and action space
val env = Gym.unsafe("FrozenLake-v1") // Similar use of python gym.make

Use typed gym from factory

val env = EnvFactory.ToyText.frozenLakeV1() // Return frozenLake (typed)

Usage some basic gym API

val data = space.sample() // data space sampling from a space
space.contains(data) // check if some space contains data
val progress = env.step(env.actionSpace.sample()) //perform an action in the env
progress match {
  case StepResponse(observation, reward, done, info) // extract the structure of env response
}