openai/train-procgen

Training on custom environments + passing extra command line args for training

max-reuter opened this issue · 2 comments

What's the best way to train this (or any) agent on an environment I created (or edited, such as CoinRun)? It looks like this code draws from procgen==0.9.2.

Also, I have a file that I would like to pass as an argument during training, like this:
python -m train_procgen.train --env_name bossfight --my_file file.txt. This file affects game behavior between episodes, so it should have direct access to coinrun.cpp, for example. Will there be any major complications implementing this as well?

Changing coinrun.cpp while executing would be a bit hard to make work. You'd probably want to create a new procgen environment on each episode and provide settings via the constructor (in the same way the existing settings are passed). Forking this repo to add your own settings that you wish to pass shouldn't be too difficult once you are able to add new settings to procgen (which will be sort of difficult if you are not very familiar with c++).

I have a custom version of bossfight that draws from that file (let's say env_config.txt) and varies custom game behavior (in addition to the out-of-the-box variations) between episodes (randomly). This works interactively and across multiple episodes as expected. And it was a good amount of work!

I think that if I can package my procgen fork properly I'll be good to go. If you don't have a comment on any of this, feel free to close this issue. Thanks!