mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-26 08:17:18 +00:00
fix and complete docstrings to match the documentation page (#2697)
This commit is contained in:
@@ -12,22 +12,19 @@ from .space import Space
|
||||
|
||||
class MultiDiscrete(Space[np.ndarray]):
|
||||
"""
|
||||
- The multi-discrete action space consists of a series of discrete action spaces with different number of actions in each
|
||||
- It is useful to represent game controllers or keyboards where each key can be represented as a discrete action space
|
||||
- It is parametrized by passing an array of positive integers specifying number of actions for each discrete action space
|
||||
The multi-discrete action space consists of a series of discrete action spaces with different number of actions in each. It is useful to represent game controllers or keyboards where each key can be represented as a discrete action space. It is parametrized by passing an array of positive integers specifying number of actions for each discrete action space.
|
||||
|
||||
Note:
|
||||
|
||||
Some environment wrappers assume a value of 0 always represents the NOOP action.
|
||||
|
||||
Note: Some environment wrappers assume a value of 0 always represents the NOOP action.
|
||||
e.g. Nintendo Game Controller - Can be conceptualized as 3 discrete action spaces:
|
||||
|
||||
e.g. Nintendo Game Controller
|
||||
- Can be conceptualized as 3 discrete action spaces:
|
||||
1. Arrow Keys: Discrete 5 - NOOP[0], UP[1], RIGHT[2], DOWN[3], LEFT[4] - params: min: 0, max: 4
|
||||
2. Button A: Discrete 2 - NOOP[0], Pressed[1] - params: min: 0, max: 1
|
||||
3. Button B: Discrete 2 - NOOP[0], Pressed[1] - params: min: 0, max: 1
|
||||
|
||||
1) Arrow Keys: Discrete 5 - NOOP[0], UP[1], RIGHT[2], DOWN[3], LEFT[4] - params: min: 0, max: 4
|
||||
2) Button A: Discrete 2 - NOOP[0], Pressed[1] - params: min: 0, max: 1
|
||||
3) Button B: Discrete 2 - NOOP[0], Pressed[1] - params: min: 0, max: 1
|
||||
|
||||
- Can be initialized as
|
||||
|
||||
MultiDiscrete([ 5, 2, 2 ])
|
||||
It can be initialized as ``MultiDiscrete([ 5, 2, 2 ])``
|
||||
|
||||
"""
|
||||
|
||||
|
Reference in New Issue
Block a user