1
0
mirror of https://github.com/gryf/coach.git synced 2025-12-17 19:20:19 +01:00
This commit is contained in:
Zach Dwiel
2018-02-20 11:39:20 -05:00
parent 8fc24a2bbe
commit 86362683b1

View File

@@ -378,9 +378,10 @@ class Agent(object):
state['observation'] = stack_observation([], state['observation'], self.tp.env.observation_stack_size) state['observation'] = stack_observation([], state['observation'], self.tp.env.observation_stack_size)
self.curr_state = state self.curr_state = state
# TODO: this should be handled in the environment
if self.tp.agent.use_measurements: if self.tp.agent.use_measurements:
# TODO: this should be handled in the environment
self.curr_state['measurements'] = self.env.measurements self.curr_state['measurements'] = self.env.measurements
if self.tp.agent.use_accumulated_reward_as_measurement: if self.tp.agent.use_accumulated_reward_as_measurement:
self.curr_state['measurements'] = np.append(self.curr_state['measurements'], 0) self.curr_state['measurements'] = np.append(self.curr_state['measurements'], 0)