- Previously we constructed a very simple class to emulate the type of environment which is provided by OpenAI. Windy Walk (part 1)
- Then we implemented the same windy walk model as an extension to OpenAI. For this we created a custom python package, we named it gym_drifty_walk, you can grab it from github .
- These two versions we used, to produce exactly the same “Windy Walks” results, as shown by the plots.
I this addendum post we’ll take a look at the package code in gym_drifty_walk.
There are excellent articles about how to create a python package, I have no intention to duplicate those, I recommend python-packaging. One warning: the packaging article is written for python 2, so be aware of that.
There are things missing in this (like e.g. tests) that you would typically add. We choose to use the most basic approach that works, which we believe lowers the barrier to comprehension.
The most basic steps you need are these:
- ✓ Choose a package name
We have already done that: gym_drifty_walk
- ✓ Follow the basic package structure
Here the structure is like this :
123456789gym_drifty_walk/├── gym_drifty_walk│ ├── envs│ │ ├── drifty_walk_env.py│ │ └── __init__.py│ └── __init__.py├── LICENSE.md├── README.md└── setup.py
(Remark; This tree-representation of the directory structure can be obtained using tree )