class_docstr: Example of a custom env in which you have to walk down a corridor.
  
  You can configure the length of the corridor via the env config.
class_docstr_tok: ["Example","of","a","custom","env","in","which","you","have","to","walk","down","a","corridor",".","You","can","configure","the","length","of","the","corridor","via","the","env","config","."]
code: def __init__(self, config: EnvContext):
      self.end_pos = config["corridor_length"]
      self.cur_pos = 0
      self.action_space = Discrete(2)
      self.observation_space = Box(
          0.0, self.end_pos, shape=(1,), dtype=np.float32
      )
      # Set the seed. This is only used for the final (reach goal) reward.
      self.reset(seed=config.worker_index * config.num_workers)
  
file_path: ray/rllib/examples/custom_env.py
imports: import argparse
  import gymnasium
  from gymnasium.spaces import Discrete, Box
  import numpy
  import os
  import random
  import ray
  from ray import air, tune
  from ray.rllib.env.env_context import EnvContext
  from ray.rllib.utils.framework import try_import_tf, try_import_torch
  from ray.rllib.utils.test_utils import check_learning_achieved
  from ray.tune.logger import pretty_print
  from ray.tune.registry import get_trainable_cls
label_desc: Use image node_id 1 to create a new SimpleCorridor object from inherited base classes: gym with example: obj = SimpleCorridor(config)