Skip to content

Latest commit

 

History

History
24 lines (16 loc) · 1.38 KB

README.md

File metadata and controls

24 lines (16 loc) · 1.38 KB

How to customize environment

1. Inherit BaseEnv class.

  • If you want to implement a new environment without inheriting the provided environments, you must inherit the base environment.
  • Every environment must includes keward arguments when defined. You should use **kwargs in __init__.

reference: base.py, gym_env.py, atari.py, ...

2. Implement abstract methods.

  • Abstract methods(reset, step, close) should be implemented. Implement these methods by referring to the comments.
  • When you implement a step method, you should expand dimension of state, reward, and done from (d) to (1,d) using expand_dim.

reference: gym_env.py

3. If necessary, implement another method.

  • recordable indicates the environment can be recorded as a gif. If a newly implemented environment has no visual state, set recordable to return False.
  • If you want to record evaluation episode as a gif file, make sure recordable returns True and set train.record in config file to True.

reference: atari.py, procgen.py, nes.py

When adding open source environment.

  • If you want to add an open source environment, we refer to some provided environments; atari, procgen, and nes environments.

reference: atari.py, procgen.py, nes.py