openai/procgen

Why 15 actions available in Maze game

hfeniser opened this issue · 1 comments

I try to reach the actions space of the environment by this call env.action_space where env is an instance of ProcgenEnv class. It returns me Discrete(15) object. I am wondering why 15 actions are available in Maze game.

I looked at to the source code for a while. I found the following 15 actions. However, the agent can not move diagonal in Maze game:
[("LEFT", "DOWN"), ("LEFT",), ("LEFT", "UP"), ("DOWN",), (), ("UP",), ("RIGHT", "DOWN"), ("RIGHT",), ("RIGHT", "UP"), ("D",), ("A",), ("W",), ("S",), ("Q",), ("E",)]

The action space is basically defined as Discrete(15) in env.py and vecgame.cpp. But since not all game needs all actions, some unnecessary actions do not affect an agent or do the same thing with other actions in some games.
In the games such as Mase and Miner which don't have diagonal moves, a diagonal action results in a horizontal move.(See overridden set_action_xy() in each game).