Releases: cric96/scalapy-gym
Releases · cric96/scalapy-gym
Add Box2D enviroments
v0.1.3
v0.1.0
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
}