Module Space.BoxSource

Sourcetype element = (float, Rune.float32_elt) Rune.t

Continuous vector represented as a float tensor.

Sourceval create : low:float array -> high:float array -> element t

create ~low ~high creates a continuous space with bounded ranges.

Valid values are tensors where each element i satisfies low.(i) <= x.(i) <= high.(i). Arrays low and high must have the same length, defining the space dimensionality.

Common use: Observation spaces for continuous state (e.g., position, velocity) or continuous action spaces (e.g., torque, steering angle).

  • raises Invalid_argument

    if low and high have different lengths or if any low.(i) > high.(i).

Sourceval bounds : element t -> float array * float array

bounds space returns copies of the low and high vectors used to create space. The returned arrays are safe to mutate.