Kautenja / nes-py

A Python3 NES emulator and OpenAI Gym interface
MIT License
235 stars 63 forks source link

Continuous prediction of action by agent does not result in the desired action in the Env #70

Closed realsama closed 3 years ago

realsama commented 3 years ago

Describe the bug

I am running into an issue where if my agent predicts the ["right", "B"] action continuously, the environment only reacts to the "right" part and the agent character only runs right without firing his gun.

To Reproduce

With a custom environment like this,

CUSTOM_MOVEMENT = [
    ["right", "B"],
    ["right", "A", "B"],
    ["right", "B", "up"],
    ["right", "A", "B", "up"],
    ["left"],
    ["down", "B"],
    ["down", "A", "B"],
    ["up", "B"],
]

the agent predicts index 0 as the action but when I try playing the action the agent only runs right and ignores the B part to fire his gun.

Kautenja commented 3 years ago

you probably have to release b and press it again. play it yourself with a human interface to confirm. closing issue