Kautenja / gym-super-mario-bros

An OpenAI Gym interface to Super Mario Bros. & Super Mario Bros. 2 (Lost Levels) on The NES
Other
685 stars 134 forks source link

info dictionary item for Flagpole Get #54

Closed Kautenja closed 6 years ago

Kautenja commented 6 years ago

Is your feature request related to a problem? Please describe.

There is no indication of when Mario gets a flagpole at the end of a level.

Describe the solution you'd like

Describe alternatives you've considered

NA

Additional context

NA

Kautenja commented 6 years ago

flag implemented. environment wrapper excluded for unnecessary complexity. will reconsider if additional interest showed.

sebastianheinz commented 5 years ago

Just tried to use the flag info['flag_get'] to prevent the env from switching to the next level. Seems that it only outputs False, even if the flagpole is reached.

Kautenja commented 5 years ago

Just tested this and I see true when Mario touches the flag (or axe). Also, there are already environments that constrain mario to a level -- i.e., SuperMarioBros-1-1-v0. flag_get is used heavily in the logic of this project (which is stable now) so tbh I think whatever code you wrote has bugs or you're using an out of date version or something. If you have a simple script that can reproduce please post it. If you have a specific reason for re-implementing the level functionality, I'd be curious why too as new features are always great to add!

EDIT: if you post a script, please put this at the top and post output as well.

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