Delegate PlayCallback
What Run(IEnv, bool?, double?, double?, PlayCallback?, object?, BigInteger?, object?, bool, EnvViewerFactory?, PygameContext?) calls after every step (Gymnasium's play callback), with the transition the
player caused. Callback(object?, object?, object?, double, bool, bool, Info) is one.
public delegate void PlayCallback(object? obsT, object? obsTp1, object? action, double rew, bool terminated, bool truncated, Info info)
Parameters
obsTobjectThe observation before the action. After a reset it is the whole reset result, a ResetResult<TObs> (Gymnasium passes the
(obs, info)tuple there, and so does Gym.NET).obsTp1objectThe observation after the action.
actionobjectThe action played: the mapped action of the held keys, or the no-op.
rewdoubleThe reward.
terminatedboolWhether the episode ended in a terminal state.
truncatedboolWhether the episode was cut short.
infoInfoThe step's info.
- Extension Methods
Remarks
The arguments are borrowed: play releases each observation and info once it is done with them (an
observation after its second callback, as obsTp1 then obsT). Copy what you
keep.