Skip to content

Latest commit caused model_vs_model.py to not start + a feature suggestion #1

@isometra

Description

@isometra

Hello,

I would like to start off by saying that I came from unsuccessful attempts at using NEAT, and I love what you have done here! It really makes it easy for me to experiment with artificial intelligence in video gaming.

Anyway, I have a rather unfortunate (possible) bug to report.

While I was testing things out, model_vs_model.py struggled to run:

$ python3.7 model_vs_model.py --env=UrbanChampion-Nes --state=GameB --load_p1_model=~/OUTPUT/UrbanChampion-Nes-2021-12-21_16-10-11/UrbanChampion-Nes-ppo2-CnnPolicy-5000000.zip --load_p2_model=~/OUTPUT/UrbanChampion-Nes-2021-12-21_16-10-11/UrbanChampion-Nes-ppo2-CnnPolicy-5000000.zip

pygame 2.1.0 (SDL 2.0.16, Python 3.7.12)
Hello from the pygame community. https://www.pygame.org/contribute.html
WARNING:tensorflow:
The TensorFlow contrib module will not be included in TensorFlow 2.0.
For more information, please see:
  * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md
  * https://github.com/tensorflow/addons
  * https://github.com/tensorflow/io (for I/O related ops)
If you depend on functionality not listed there, please file an issue.

/home/rein/.local/lib/python3.7/site-packages/stable_baselines/__init__.py:33: UserWarning: stable-baselines is in maintenance mode, please use [Stable-Baselines3 (SB3)](https://github.com/DLR-RM/stable-baselines3) for an up-to-date version. You can find a [migration guide](https://stable-baselines3.readthedocs.io/en/master/guide/migration.html) in SB3 documentation.
  "stable-baselines is in maintenance mode, please use [Stable-Baselines3 (SB3)](https://github.com/DLR-RM/stable-baselines3) for an up-to-date version. You can find a [migration guide](https://stable-baselines3.readthedocs.io/en/master/guide/migration.html) in SB3 documentation."
=========== Params ===========
['--state=GameB', '--load_p1_model=~/OUTPUT/UrbanChampion-Nes-2021-12-21_16-10-11/UrbanChampion-Nes-ppo2-CnnPolicy-5000000.zip', '--load_p2_model=~/OUTPUT/UrbanChampion-Nes-2021-12-21_16-10-11/UrbanChampion-Nes-ppo2-CnnPolicy-5000000.zip']
========= Init =============
Traceback (most recent call last):
  File "model_vs_model.py", line 95, in <module>
    main(sys.argv)
  File "model_vs_model.py", line 49, in main
    play_env = init_play_env(args)
  File "/home/rein/git/retro-scripts/common.py", line 81, in init_play_env
    display_env = env = GameDisplayEnv(env, args, 0, args.model_desc, None)
AttributeError: 'Namespace' object has no attribute 'model_desc'

model_vs_game.py and model_trainer.py start up just fine. I've looked into it and the previous commit has a model_vs_model.py that starts up just fine, too. It appears to be some new code in common.py that caused the breakage.


I might as well kill two birds with one stone and suggest something while I'm at it:

Do you think potential player vs AI capability is possible (preferably with the ability to choose whether you're player 1 or player 2)? It's one thing to see AI play the game against another AI, but it's another to be able to go against the artificial intelligence in my favorite competitive video games, even more if I can train both player 1 and player 2 AI at the same time. I know Gym Retro already has an "interactive" mode (python3 -m retro.examples.interactive UrbanChampion-Nes or python3.7 -m retro.examples.interactive --game UrbanChampion-Nes), so I was just curious. I feel like it'd honestly be a real game changer.

Thanks in advance.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions