openai / procgen

Procgen Benchmark: Procedurally-Generated Game-Like Gym-Environments
https://openai.com/blog/procgen-benchmark/
MIT License
991 stars 207 forks source link

Improved interactive cli by adding "advanced" switch arguments #58

Closed DBALICKI closed 3 years ago

DBALICKI commented 3 years ago

This PR improves the cli for procgen interactive by adding switch arguments for the more advanced environment options that would previously only be accessible through a traditional creation of an instance. I found that being able to try out these settings interactively is beneficial because you get a hands-on feel for how they impact the environment and observation (both in agent & human vision).

Here is how the cli help would look after this PR:

$ python -m procgen.interactive --help
usage: interactive.py [-h] [--vision {agent,human}] [--record-dir RECORD_DIR] [--distribution-mode DISTRIBUTION_MODE]
                      [--env-name {bigfish,bossfight,caveflyer,chaser,climber,coinrun,dodgeball,fruitbot,heist,jumper,leaper,maze,miner,ninja,plunder,starpilot,coinrun_old}] [--level-seed LEVEL_SEED] [--paint-vel-info]
                      [--use-generated-assets] [--uncenter-agent] [--disable-backgrounds] [--restrict-themes] [--use-monochrome-assets]

Interactive version of Procgen allowing you to play the games

optional arguments:
  -h, --help            show this help message and exit
  --vision {agent,human}
                        level of fidelity of observation (default: human)
  --record-dir RECORD_DIR
                        directory to record movies to
  --distribution-mode DISTRIBUTION_MODE
                        which distribution mode to use for the level generation (default: hard)
  --env-name {bigfish,bossfight,caveflyer,chaser,climber,coinrun,dodgeball,fruitbot,heist,jumper,leaper,maze,miner,ninja,plunder,starpilot,coinrun_old}
                        name of game to create (default: coinrun)
  --level-seed LEVEL_SEED
                        select an individual level to use

advanced optional switch arguments:
  --paint-vel-info      paint player velocity info in the top left corner
  --use-generated-assets
                        use randomly generated assets in place of human designed assets
  --uncenter-agent      display the full level for games that center the observation to the agent
  --disable-backgrounds
                        disable human designed backgrounds
  --restrict-themes     restricts games that use multiple themes to use a single theme
  --use-monochrome-assets
                        use monochromatic rectangles instead of human designed assets

Here is an example of how you would run one of these switch arguments:

$ python -m procgen.interactive --env-name coinrun --paint-vel-info

This PR has no changes that would impact training.

Thank you for making such a great environment for evaluating learning performance.

christopherhesse commented 3 years ago

Thanks!