Custom Open AI gym agent

Syntax and standards to code

  1. mkdir custom_agent & mkdir custom_agent/env
  2. echo from custom_agent.envs.custom_env import CustomEnv > custom_agent/

3. Now cd custom_agent/env/

4. touch must be of below structure

Place the files in gym package

  1. Open python gym module in the site-packages directory. For me, it is located here /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/gym/envs
  2. Format is

4. Place out dircustom_agent here

5. We need to register Custom environments here by editing . Add the below lines to the file.

5. In custom_agent the folder add the file