Module Space.DiscreteSource

Sourcetype element = (int32, Rune.int32_elt) Rune.t

Discrete action represented as a scalar tensor.

Sourceval create : ?start:int -> int -> element t

create ~start n creates a discrete space with n choices.

Valid values are integers in the range [start, start + n). If start is omitted, defaults to 0, producing the range [0, n).

Common use: Action spaces for environments with discrete actions (e.g., move left, move right, jump).