public struct Collector<Element: TensorNumeric, StateType, EnvType: Env, EnvElement: TensorNumeric>
where EnvType.ObsType == Tensor<EnvElement>, EnvType.ActType == Tensor<EnvElement>

The helper to collect data from the given Envs.

The policy is intentional to be flexible as a simple closure. We collect both the action and state data the closure provides. There may be some type conversions for what the Env expects and what the policy provides, thus, need to specify both. To make this easier to use, the placeholder type would be useful: Collector<Float, (), _, _>(envs: envs) { ... }

Available where EnvType.TerminatedType == Bool, EnvType.RewardType == Float