mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-01 14:10:30 +00:00
Update URL links and Space documentation summaries (#18)
This commit is contained in:
@@ -1,5 +1,13 @@
|
||||
# Spaces
|
||||
|
||||
```{toctree}
|
||||
:hidden:
|
||||
spaces/fundamental
|
||||
spaces/composite
|
||||
spaces/utils
|
||||
```
|
||||
|
||||
|
||||
```{eval-rst}
|
||||
.. autoclass:: gymnasium.spaces.Space
|
||||
```
|
||||
@@ -28,77 +36,30 @@ Each space implements the following functions:
|
||||
|
||||
## Fundamental Spaces
|
||||
|
||||
### Box
|
||||
|
||||
```{eval-rst}
|
||||
.. autoclass:: gymnasium.spaces.Box
|
||||
.. currentmodule:: gymnasium.spaces
|
||||
|
||||
.. automethod:: is_bounded
|
||||
.. automethod:: sample
|
||||
```
|
||||
|
||||
### Discrete
|
||||
|
||||
```{eval-rst}
|
||||
.. autoclass:: gymnasium.spaces.Discrete
|
||||
|
||||
.. automethod:: sample
|
||||
```
|
||||
|
||||
### MultiBinary
|
||||
|
||||
```{eval-rst}
|
||||
.. autoclass:: gymnasium.spaces.MultiBinary
|
||||
|
||||
.. automethod:: sample
|
||||
```
|
||||
|
||||
### MultiDiscrete
|
||||
|
||||
```{eval-rst}
|
||||
.. autoclass:: gymnasium.spaces.MultiDiscrete
|
||||
|
||||
.. automethod:: sample
|
||||
```
|
||||
|
||||
### Text
|
||||
|
||||
```{eval-rst}
|
||||
.. autoclass:: gymnasium.spaces.Text
|
||||
|
||||
.. automethod:: sample
|
||||
```
|
||||
* :py:class:`Box` - Supports continuous (and discrete) vectors or matrices, used for vector observations, images, etc
|
||||
* :py:class:`Discrete` - Supports a single discrete number of values with an optional start for the values
|
||||
* :py:class:`MultiDiscrete` - Supports single or matrices of binary values, used for holding down a button or if an agent has an object
|
||||
* :py:class:`MultiBinary` - Supports multiple discrete values with multiple axes, used for controller actions
|
||||
* :py:class:`Text` - Supports strings, used for passing agent messages, mission details, etc
|
||||
```
|
||||
|
||||
## Composite Spaces
|
||||
|
||||
### Dict
|
||||
|
||||
```{eval-rst}
|
||||
.. autoclass:: gymnasium.spaces.Dict
|
||||
|
||||
.. automethod:: sample
|
||||
```
|
||||
|
||||
### Graph
|
||||
|
||||
```{eval-rst}
|
||||
.. autoclass:: gymnasium.spaces.Graph
|
||||
|
||||
.. automethod:: sample
|
||||
* :py:class:`Dict` - Supports a dictionary of keys and subspaces, used for a fixed number of unordered spaces
|
||||
* :py:class:`Tuple` - Supports a tuple of subspaces, used for multiple for a fixed number of ordered spaces
|
||||
* :py:class:`Sequence` - Supports a variable number of instances of a single subspace, used for entities spaces or selecting a variable number of actions
|
||||
* :py:class:`Graph` - Supports graph based actions or observations with discrete or continuous nodes and edge values.
|
||||
```
|
||||
|
||||
### Sequence
|
||||
## Utils
|
||||
|
||||
```{eval-rst}
|
||||
.. autoclass:: gymnasium.spaces.Sequence
|
||||
|
||||
.. automethod:: sample
|
||||
```
|
||||
|
||||
### Tuple
|
||||
|
||||
```{eval-rst}
|
||||
.. autoclass:: gymnasium.spaces.Tuple
|
||||
|
||||
.. automethod:: sample
|
||||
```
|
||||
* :py:class:`utils.flatdim` - The number of dimensions the flattened space will contain
|
||||
* :py:class:`utils.flatten_space` - Flattens a space for which the `flattened` space instances will contain
|
||||
* :py:class:`utils.flatten` - Flattens an instance of a space that is contained within the flattened version of the space
|
||||
* :py:class:`utils.unflatten` - The reverse of the `flatten_space` function
|
||||
```
|
||||
|
Reference in New Issue
Block a user