Class FilterObservationVector<TObs, TAct>
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
TObsTActThe batched action type, passed through.
- Inheritance
-
VectorEnv<TObs, TAct>VectorWrapper<TObs, TAct, TObs, TAct>VectorObservationWrapper<TObs, TObs, TAct>VectorizeTransformObservation<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
envVectorEnv<TObs, TAct>The vector env.
filterKeysobjectThe keys or positions to keep, as FilterObservation<TObs, TAct> takes them.
Exceptions
- TypeError
Thrown for a space that is neither a
Dictnor aTuple, with Gymnasium's message.- ValueError
Thrown for keys the space lacks, or no key left, with Gymnasium's messages.