Skip to content
Snippets Groups Projects
Commit 22f746ff authored by Erik Nygren's avatar Erik Nygren :bullettrain_front:
Browse files

Changed renderEnv to render_env

parent ec10827b
No related branches found
No related tags found
No related merge requests found
......@@ -130,6 +130,7 @@ def main(argv):
# Action
for a in range(env.get_num_agents()):
if info['action_required'][a]:
# If an action is require, we want to store the obs a that step as well as the action
update_values = True
action = agent.act(agent_obs[a], eps=eps)
action_prob[action] += 1
......@@ -142,7 +143,7 @@ def main(argv):
next_obs, all_rewards, done, info = env.step(action_dict)
# Update replay buffer and train agent
for a in range(env.get_num_agents()):
# Only update the values when we are done or when an action was taken and thus relevant information is present
if update_values or done[a]:
agent.step(agent_obs_buffer[a], agent_action_buffer[a], all_rewards[a],
agent_obs[a], done[a])
......
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