1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-18 11:40:18 +01:00

multiple bug fixes in dealing with measurements + CartPole_DFP preset (#92)

This commit is contained in:
Itai Caspi
2018-04-23 10:44:46 +03:00
committed by GitHub
parent 5d5562bf62
commit 52eb159f69
5 changed files with 31 additions and 9 deletions

View File

@@ -135,7 +135,7 @@ class DoomEnvironmentWrapper(EnvironmentWrapper):
# extract all data from the current state
state = self.game.get_state()
if state is not None and state.screen_buffer is not None:
self.observation = {
self.state = {
'observation': state.screen_buffer,
'measurements': state.game_variables,
}

View File

@@ -113,7 +113,7 @@ class GymEnvironmentWrapper(EnvironmentWrapper):
self.timestep_limit = self.env.spec.timestep_limit
else:
self.timestep_limit = None
self.measurements_size = len(self.step(0)['info'].keys())
self.measurements_size = (len(self.step(0)['info'].keys()),)
self.random_initialization_steps = self.tp.env.random_initialization_steps
def _wrap_state(self, state):