The possible actions that can be taken. Either continuous or discrete.
The observable world.
The possible rewards an agent can achieve.
Terminate the game session and close environment
Display the game environment
Restore the environment to a random starting state
The initial observation
Seed the randomness in the environment
The seed value
Steps the environment according to some action.
The action to take (in action_space)
Overloaded step
function for Phaser Games.
Phaser time
Phaser time delta
The action to take (in action_space)
Generated using TypeDoc
The main Gym.js class. It encapsulates an environment with arbitrary behind-the-scenes dynamics. An environment can be partially or fully observed.
This class is derived from OpenAI's Gym and thus the API is very similar and in most cases the same. The key differences are as follows:
tf.Tensor
in place ofnp.array
.The
render
method prints the environment to the console.renderHTML
either returns an HTML string or, in the case of a Phaser env, renders on the canvas.The main API methods that users of this class need to know are:
And set the following attributes:
action_space
: The Space object corresponding to valid actionsobservation_space
: The Space object corresponding to valid observationsreward_range
: A tuple corresponding to the min and max possible rewards