Enum LunarLanderDiscreteActions
- Namespace
- Gym.Environments.Envs.Box2D
- Assembly
- Gym.Environments.dll
0.2's names for LunarLander's four discrete actions, kept so 0.2 code compiles until 2.0 (DR-58). The values are
Gymnasium's action indices, so env.Step((int)LunarLanderDiscreteActions.FireMainEngine) fires the main
engine of LunarLanderEnv as 0.2's did.
[Obsolete("0.2's action names: Gymnasium's LunarLander takes the action indices 0 (nothing), 1 (left engine), 2 (main engine), 3 (right engine). Removed in 2.0 with Gym.Legacy.")]
public enum LunarLanderDiscreteActions
- Extension Methods
Fields
Nothing = 00: do nothing.
FireLeftThruster = 11: fire the left orientation engine.
FireMainEngine = 22: fire the main engine.
FireRightThruster = 33: fire the right orientation engine.
Remarks
Gymnasium names the actions only in its docs (0 do nothing, 1 fire left orientation engine, 2 fire main engine,
3 fire right orientation engine). Cast to int for the typed Step(NDArray); the untyped
Step(object?) takes the enum itself. Footgun: 0.2's namespace,
Gym.Environments.Envs.Aether, has a twin of this enum, so a file importing both namespaces must drop the
Aether one (CS0104 names it).