Module Gym.MakeSource

Parameters

module A : Owl_types_ndarray_algodiff.Sig

Signature

Sourceval discrete : seed:int -> string -> (A.arr, int) Owl_rllib.Ndenv.t

discrete ~seed id is gymnasium.make id with discrete actions. seed seeds the first reset, as env.reset(seed=seed); later resets continue from the environment's own generator, as in Gymnasium. Observations must be a Box; terminated and truncated are Gymnasium's. Raises Invalid_argument if the actions are not discrete. Raises Failure if Python cannot create the environment.

Sourceval discrete_with_renderer : seed:int -> string -> (A.arr, int) Owl_rllib.Ndenv.t * (unit -> int * int * bytes)

Like discrete, with render_mode="rgb_array". The callback returns width, height and row-major RGB bytes for the current state, after reset or step. Rendering does not advance the environment.

Sourceval continuous : seed:int -> string -> (A.arr, A.arr) Owl_rllib.Ndenv.t

The same with Box actions.