Commit bcd651eb authored by manuschn's avatar manuschn

check if num_swaps is in agent_info in train.py

parent 79edf57b
......@@ -43,7 +43,8 @@ def on_episode_end(info):
episode_num_agents = agent_info["num_agents"]
episode_steps = max(episode_steps, agent_info["agent_step"])
episode_score += agent_info["agent_score"]
episode_num_swaps += agent_info["num_swaps"]
if "num_swaps" in agent_info:
episode_num_swaps += agent_info["num_swaps"]
if agent_info["agent_done"]:
episode_done_agents += 1
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment