Table of Contents

Delegate PlayCallback

Namespace
Gym.Utils
Assembly
Gym.Rendering.dll
public delegate void PlayCallback(object? obsT, object? obsTp1, object? action, double rew, bool terminated, bool truncated, Info info)

Parameters

obsT object

The 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).

obsTp1 object

The observation after the action.

action object

The action played: the mapped action of the held keys, or the no-op.

rew double

The reward.

terminated bool

Whether the episode ended in a terminal state.

truncated bool

Whether the episode was cut short.

info Info

The 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.