ClipTerminatedEpisodeTrajectoryProcessor¶
- class maze.core.trajectory_recording.datasets.trajectory_processor.ClipTerminatedEpisodeTrajectoryProcessor(clip_k: int)¶
Implementation of the dead-end-clipping preprocessor. That is for each trajectory the last k states should be clipped iff the env is done in the last state.
- test_for_trajectory_clipping(done_terminated: bool, done_truncated: bool, info: Dict[str, str]) bool¶
(overrides
BaseClippingTrajectoryProcessor)Clip a trajectory if it ended in a done and was not timelimit truncated.
- param done_terminated:
Whether the current trajectory ended in done by termination.
- param done_truncated:
Whether the current trajectory was truncated by the timelimit wrapper.
- param info:
The info of the last environment step.
- return:
Return True if teh trajectory should be clipped, false otherwise.