class_docstr: Corridor in which an agent must learn to move right to reach the exit.
  
  ---------------------
  | S | 1 | 2 | 3 | G |   S=start; G=goal; corridor_length=5
  ---------------------
  
  Possible actions to chose from are: 0=left; 1=right
  Observations are floats indicating the current field index, e.g. 0.0 for
  starting position, 1.0 for the field next to the starting position, etc..
  Rewards are -0.1 for all steps, except when reaching the goal (+1.0).
docstr: Takes a single step in the episode given `action`.
  
  Returns:
      New observation, reward, terminated-flag, truncated-flag, info-dict (empty).
docstr_tok: ["Takes","a","single","step","in","the","episode","given","`","action","`",".","Returns",":","New","observation",",","reward",",","terminated-flag",",","truncated-flag",",","info-dict","(","empty",")","."]
code: def step(self, action):
      """Takes a single step in the episode given `action`.
  
      Returns:
          New observation, reward, terminated-flag, truncated-flag, info-dict (empty).
      """
      # Walk left.
      if action == 0 and self.cur_pos > 0:
          self.cur_pos -= 1
      # Walk right.
      elif action == 1:
          self.cur_pos += 1
      # Set `terminated` flag when end of corridor (goal) reached.
      terminated = self.cur_pos >= self.end_pos
      truncated = False
      # +1 when goal reached, otherwise -1.
      reward = 1.0 if terminated else -0.1
      return [self.cur_pos], reward, terminated, truncated, {}
  
imports: import gymnasium
  from ray.rllib.algorithms.ppo import PPOConfig
label_desc: Use image node_id 3 for calling the SimpleCorridor obj's underlying member method code with example usage: obj.step(action) and returns: list,  reward,  terminated,  truncated,  dict