Table of Contents

Class FilterObservationVector<TObs, TAct>

Namespace
Gym.Wrappers.Vector
Assembly
Gym.dll

Keeps the chosen keys of a Dict or positions of a Tuple observation, per sub-env (Gymnasium's vector FilterObservation).

[PyName("FilterObservation")]
public class FilterObservationVector<TObs, TAct> : VectorizeTransformObservation<TObs, TObs, TAct>, IVectorEnv, IDisposable

Type Parameters

TObs

The batched observation type: Info, object?[] or object.

TAct

The batched action type, passed through.

Inheritance
VectorEnv<TObs, TAct>
VectorWrapper<TObs, TAct, TObs, TAct>
VectorObservationWrapper<TObs, TObs, TAct>
FilterObservationVector<TObs, TAct>
Implements
Inherited Members
Extension Methods

Remarks

Constructors

FilterObservationVector(VectorEnv<TObs, TAct>, object)

Wraps env.

public FilterObservationVector(VectorEnv<TObs, TAct> env, object filterKeys)

Parameters

env VectorEnv<TObs, TAct>

The vector env.

filterKeys object

The keys or positions to keep, as FilterObservation<TObs, TAct> takes them.

Exceptions

TypeError

Thrown for a space that is neither a Dict nor a Tuple, with Gymnasium's message.

ValueError

Thrown for keys the space lacks, or no key left, with Gymnasium's messages.