evorl.envs.space¶
Module Contents¶
Classes¶
Continuous space in R^n. |
|
Discrete space in {0, 1, …, n-1}. |
|
Base class for Space like |
|
Container for structural spaces. |
Functions¶
API¶
- class evorl.envs.space.Box[source]¶
Bases:
evorl.envs.space.SpaceContinuous space in R^n.
- Variables:
low – The lower bounds of the box.
high – The upper bounds of the box.
- high: chex.Array¶
None
- low: chex.Array¶
None
- property shape: chex.Shape¶
- class evorl.envs.space.Discrete[source]¶
Bases:
evorl.envs.space.SpaceDiscrete space in {0, 1, …, n-1}.
- Variables:
n – The number of discrete values.
- n: int¶
None
- property shape: chex.Shape¶
- class evorl.envs.space.Space[source]¶
Bases:
evorl.types.PyTreeDataBase class for Space like
gym.Space.- abstract contains(x: chex.Array) bool[source]¶
Determine whether the input is in the space.
- Returns:
A boolean value about whether x is in the space.
- abstract sample(key: chex.PRNGKey) chex.Array[source]¶
Randomly sample a data in this space.
- Returns:
A sample from the space
- abstract property shape: chex.Shape¶
Get the shape of the space.
- class evorl.envs.space.SpaceContainer[source]¶
Bases:
evorl.envs.space.SpaceContainer for structural spaces.
- Variables:
spaces – a pytree of spaces.
- property shape: chex.ArrayTree¶
- spaces: chex.ArrayTree¶
None