From ebbbe6fb0f11a7d92804c65a0aefba42658cf79c Mon Sep 17 00:00:00 2001 From: u214892 <u214892@sbb.ch> Date: Mon, 26 Aug 2019 08:52:33 +0200 Subject: [PATCH] bugfix test_multi_speed --- tests/test_multi_speed.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tests/test_multi_speed.py b/tests/test_multi_speed.py index 8b546871..47aadee7 100644 --- a/tests/test_multi_speed.py +++ b/tests/test_multi_speed.py @@ -66,7 +66,7 @@ def test_multi_speed_init(): # Run episode for step in range(100): - # Chose an action for each agent in the environment + # Choose an action for each agent in the environment for a in range(env.get_num_agents()): action = agent.act(0) action_dict.update({a: action}) @@ -75,12 +75,11 @@ def test_multi_speed_init(): assert old_pos[a] == env.agents[a].position # Environment step which returns the observations for all agents, their corresponding - # reward and whether their are done + # reward and whether they are done _, _, _, _ = env.step(action_dict) # Update old position whenever an agent was allowed to move for i_agent in range(env.get_num_agents()): if (step + 1) % (i_agent + 1) == 0: - print(step, i_agent, env.agents[a].position) - + print(step, i_agent, env.agents[i_agent].position) old_pos[i_agent] = env.agents[i_agent].position -- GitLab