VecEnv

public final class VecEnv<EnvType: Env, Element: TensorNumeric>
where EnvType.ActType == Tensor<Element>, EnvType.ObsType == Tensor<Element>
extension VecEnv: Env where EnvType.DoneType == Bool
  • Declaration

    Swift

    public init(count: Int, _ closure: (Int) throws -> EnvType) rethrows

Available where EnvType.DoneType == Bool

  • Declaration

    Swift

    public typealias ActType = EnvType.ActType
  • Declaration

    Swift

    public typealias ObsType = EnvType.ObsType
  • Declaration

    Swift

    public typealias RewardType = [EnvType.RewardType]
  • Declaration

    Swift

    public typealias DoneType = [Bool]
  • Declaration

    Swift

    public func step(action: ActType) -> (ObsType, RewardType, DoneType, [String : Any])
  • Declaration

    Swift

    public func reset(seed: Int?) -> (ObsType, [String : Any])
  • Declaration

    Swift

    public var rewardThreshold: Float { get }