Kautenja / gym-super-mario-bros

An OpenAI Gym interface to Super Mario Bros. & Super Mario Bros. 2 (Lost Levels) on The NES

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SuperMarioBros-v3 environment color conflicts

dman82499 opened this issue · comments

In SuperMarioBros-v3 (rectangle environment), the floor is the exact same color as the goombas, making it very hard for computer vision systems to differentiate the floor as being separate from goombas. I'm not sure if such a fix (such as slightly altering the color of goombas) could be implemented, as I have not looked at the implementation for the rectangle environment. However, if it is possible to implement this fix, I would be willing to try and submit a PR. That being said, I just wanted to confirm with the owners of the repo first if this should be considered a bug.

Hi thanks for the bug report. I was not aware of this, but would label it as undesired functionality for sure in the context of computer vision research. Could you provide the exact level where this occurs and maybe a screenshot so I can grab the color codes? Thanks!

Hello, thanks for the reply and willingness to help! I have observed the color issue on just the 1-1 level, but theoretically it could occur at any level where the mean ground color is similar to the mean goomba color. I believe that that particular described scenario happens in the above ground, below ground, and castle levels, so this could potentially be an issue in a lot of levels (although I have not explicitly confirmed or investigated this yet). Here is a picture of what this looks like in 1-1.
mario

I confirmed that the goomba and ground color matched R=298, G=92, B=16 through sampling. In addition, I used a Connected Component Algorithm to confirm that the ground and goombas are both the same color and connected to each other (pixels share the same neighbor).