def step(self, actions):
    """Takes a step in all environments.

    Subclasses should override _step to do the actual reset if something other
    than the default implementation is desired.

    Args:
      actions: Batch of actions.

    Returns:
      (preprocessed_observations, processed_rewards, dones, infos).
    """

    observations, raw_rewards, dones, infos = self._step(actions)

    # Process rewards.
    raw_rewards = raw_rewards.astype(np.float32)
    processed_rewards = self.process_rewards(raw_rewards)

    # Process observations.
    processed_observations = self.process_observations(observations)

    # Record history.
    self.trajectories.step(processed_observations, raw_rewards,
                           processed_rewards, dones, actions)

    return processed_observations, processed_rewards, dones, infos
def step ( self , actions ) : observations , raw_rewards , dones , infos = self . _step ( actions ) raw_rewards = raw_rewards . astype ( np . float32 ) processed_rewards = self . process_rewards ( raw_rewards ) processed_observations = self . process_observations ( observations ) self . trajectories . step ( processed_observations , raw_rewards , processed_rewards , dones , actions ) return processed_observations , processed_rewards , dones , infos
Takes a step in all environments.

    Subclasses should override _step to do the actual reset if something other
    than the default implementation is desired.

    Args:
      actions: Batch of actions.

    Returns:
      (preprocessed_observations, processed_rewards, dones, infos).