Kautenja / playing-mario-with-deep-reinforcement-learning

An implementation of (Double/Dueling) Deep-Q Learning to play Super Mario Bros.
MIT License
69 stars 12 forks source link

Training error #35

Closed aadeshnpn closed 6 years ago

aadeshnpn commented 6 years ago

train.py works for Tetris-v0 but throws

_self._did_step(done)
TypeError: _did_step() takes 1 positional argument but 2 were given.

I think there is issue with how the environment is wrapped for Mario. I will try to look deeper and fix the issue but help is appreciated.

Kautenja commented 6 years ago

Hmmm can you run the following script and let me know the output?

import pkg_resources
print(pkg_resources.get_distribution("nes-py").version)
print(pkg_resources.get_distribution("gym-super-mario-bros").version)

My thought is that you have a version mix-match between these two packages

Kautenja commented 6 years ago

also what command are you running to start the training process?

aadeshnpn commented 6 years ago

The first one shows '1.0.0' and the second one is '3.0.5'. Which version is required? I used python . -m train -e SuperMarioBros-1-4-v0 to train supermario and python . -m train -e Tetris-v0 tetris. The training for Tetris works but for Mario it fails.

aadeshnpn commented 6 years ago

I upgraded SuperMarioBro 3.0.5 to 3.0.8 and now the training it working. Thanks

Kautenja commented 6 years ago

whoops i meant to respond earlier but got buried in work projects. It's odd that 3.0.5 and 1.0.0 are interacting in this way (gym-super-mario-bros 3.0.5 should have the new API changes from nes-py 1.0.0), but it seems the newer versions resolve the problem. Closing issue.