class_docstr: Example of a custom env, for which you can specify rendering behavior.
class_docstr_tok: ["Example","of","a","custom","env",",","for","which","you","can","specify","rendering","behavior","."]
code: def step(self, action):
      self.steps += 1
      assert action in [0, 1], action
      if action == 0 and self.cur_pos > 0:
          self.cur_pos -= 1.0
      elif action == 1:
          self.cur_pos += 1.0
      truncated = self.steps >= self.max_steps
      done = self.cur_pos >= self.end_pos or truncated
      return [self.cur_pos], 10.0 if done else -0.1, done, truncated, {}
  
file_path: ray/rllib/examples/env_rendering_and_recording.py
imports: import argparse
  import gymnasium
  import numpy
  import ray
  from gymnasium.spaces import Box, Discrete
  from ray import air, tune
  from ray.rllib.algorithms.ppo import PPOConfig
  from ray.rllib.env.multi_agent_env import make_multi_agent
label_desc: Use image node_id 3 for calling the CustomRenderedEnv obj's underlying member method code with example usage: obj.step(action) and returns: list,  unknown,  done,  truncated,  dict