Class ToyTextTransition
- Namespace
- Gym.Environments.Envs.ToyText
- Assembly
- Gym.Environments.dll
One possible outcome of an action in a toy_text env's transition table P[s][a]: Gymnasium's 4-tuple
(probability, next_state, reward, terminated), in the order Gymnasium lists the outcomes.
public sealed record ToyTextTransition : IEquatable<ToyTextTransition>
- Inheritance
-
ToyTextTransition
- Implements
- Inherited Members
- Extension Methods
Remarks
Steps draw an outcome with CategoricalSample(IReadOnlyList<double>, Generator) over the probabilities, one float64 from the env's generator, so a table with a single certain outcome still draws.
Constructors
ToyTextTransition(double, long, double, bool)
One possible outcome of an action in a toy_text env's transition table P[s][a]: Gymnasium's 4-tuple
(probability, next_state, reward, terminated), in the order Gymnasium lists the outcomes.
public ToyTextTransition(double Probability, long NextState, double Reward, bool Terminated)
Parameters
ProbabilitydoubleThe outcome's probability; the outcomes of one action sum to 1 (up to rounding).
NextStatelongThe state the outcome leads to.
RewarddoubleThe reward, as a float64 (Gymnasium's are Python ints in FrozenLake, CliffWalking and Taxi, of the same value).
TerminatedboolWhether the outcome ends the episode.
Remarks
Steps draw an outcome with CategoricalSample(IReadOnlyList<double>, Generator) over the probabilities, one float64 from the env's generator, so a table with a single certain outcome still draws.
Properties
NextState
The state the outcome leads to.
public long NextState { get; init; }
Property Value
Probability
The outcome's probability; the outcomes of one action sum to 1 (up to rounding).
public double Probability { get; init; }
Property Value
Reward
The reward, as a float64 (Gymnasium's are Python ints in FrozenLake, CliffWalking and Taxi, of the same value).
public double Reward { get; init; }
Property Value
Terminated
Whether the outcome ends the episode.
public bool Terminated { get; init; }