facebookresearch/ELF

Minimum working example for the RTS game with an RL lifecycle?

douglasrizzo opened this issue · 1 comments

I am having quite a bit of trouble trying to create a minimum working example for the RTS game, in which I can get a single state, visualize its variables and pass an action back to the environment.

I took a look at the Basic Usage section of the README.md, but it looks like the code is not supposed to be used, just interpreted as pseudocode. For example, I don't know where functions such as Init() come from, or what is the type and attributes of the context variable.

I then took a look at train.py and eval.py, which use the RTS, but the code is highly abstracted and everything is passed as dictionaries, whose values don't seem to have an explicit documentation. Also, these scripts don't show how a user can get a state and return an action to the environment (or how to work with batches).

The closest I came to an answer was the documentation of the Python wrapper. The page explicitly mentions variables with names such as ["s", "pi", "r", "a"], which I believe are states, rewards, actions and policies, but there is not a full example depicting how to get to these values, only code excerpts which must be pieced together and make no sense on their own.

I believe the project could benefit greatly from a documented minimum working example guiding users on creating their own agent. Maybe create a random agent for the RTS game, which others can then replace for their own agents.

I would like to add that I was able to compile the project and run the train and eval examples both on CPU and GPU, on Python 3.7 under Linux. My frustration comes from being unable to customize anything.

I see that someone already mentioned the same troubles I am having in #16 and #18 (comment). Since they were able to execute the RTS using the Python wrapper, I will try and take a look at their code for now.