Skip to content
Snippets Groups Projects
Commit 016b9a58 authored by Egli Adrian (IT-SCI-API-PFI)'s avatar Egli Adrian (IT-SCI-API-PFI)
Browse files

fix

parent 8749b02f
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,8 @@ class DataBuffers:
return self.memory.get(handle, [])
def push_transition(self, handle, transition):
transitions = self.get_transitions(handle).append(transition)
transitions = self.get_transitions(handle)
transitions.append(transition)
self.memory.update({handle: transitions})
......@@ -103,7 +104,7 @@ class PPOAgent(Policy):
return state, action, reward, s_next, done, prob_action
def train_net(self):
for handle in range(self.n_agents):
for handle in range(len(self.memory)):
agent_episode_history = self.memory.get_transitions(handle)
if len(agent_episode_history) > 0:
# convert the replay buffer to torch tensors (arrays)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment