shakenes / vizdoomgym

OpenAI Gym wrapper for ViZDoom enviroments
MIT License
65 stars 27 forks source link

step() returns old observation #5

Closed jacobpbotha closed 4 years ago

jacobpbotha commented 4 years ago

I noticed that in the step function the state is recorded before the action is taken. Which means that the observation returned is one step old and doesn't correspond to the current state. Easy enough to fix by simply putting self.state = self.game.get_state() after reward = self.game.make_action(act).

shakenes commented 4 years ago

Fixed in https://github.com/shakenes/vizdoomgym/commit/28770d0bbecefcfd0f2b536326f156b0d16765d1 Thanks for pointing it out!