New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tetris wrapper's reset_game() doesn't seem to work. #123
Comments
What happens if you run |
This:
|
I built a py_environment for this wrapper to run with tf-agents and for some reason it seems it sometimes works and sometimes doesn't. MarioWrapper works every time. Maybe it is the speed? You said it can lose accuracy on higher speeds. I'm using 0. Just one more thing: when it the reset_game() doesn't work, it gets stuck in the score/level screen. |
I think I understand what is happening. Since the emulation is too fast, it probably is going through the game over state too quickly and my algorithm doesn't catch that so set the No bug, then. Thanks for project. I'm having a lot of fun with it. |
If that example run through, then you have something with your code. Because that tests the reset function (look for the asserts). You should try to find the difference between the example and your code. If you check what’s on the screen at every tick, then it cannot run too fast. Are letting it run while measuring time? If you let it run 60 ticks, it’s equivalent to one second in “real life”. |
I'm not. I'm just measuring the number of steps the agent takes and penalizing it if it takes too many. I'll try to lower the speed because it seems to bug out after a few thousand episodes. The example ran and it was due to the way I was checking the agent lost the game. |
Is it working for you now? Unless there is a major, scary bug somewhere, the speed of execution cannot change the outcome. |
I think he means that there is no function to detect automaticaly if the game is over (like game_over()) and if so reset the environment. This is why the openai_gym wrapper needed that function too ! |
I'll close this, as I think we have solved this by including the OpenAI Gym wrapper. |
After this, calling
reset_game()
does nothing. Even after sending a few WindowEvents andtick()
.The text was updated successfully, but these errors were encountered: