diff --git a/tutorials/SB3/kaz/sb3_kaz_vector.py b/tutorials/SB3/kaz/sb3_kaz_vector.py index b4336d7de..6f5e84283 100644 --- a/tutorials/SB3/kaz/sb3_kaz_vector.py +++ b/tutorials/SB3/kaz/sb3_kaz_vector.py @@ -98,8 +98,8 @@ def eval(env_fn, num_games: int = 100, render_mode: str | None = None, **env_kwa for agent in env.agent_iter(): obs, reward, termination, truncation, info = env.last() - for agent in env.agents: - rewards[agent] += env.rewards[agent] + for a in env.agents: + rewards[a] += env.rewards[a] if termination or truncation: break diff --git a/tutorials/SB3/pistonball/sb3_pistonball_vector.py b/tutorials/SB3/pistonball/sb3_pistonball_vector.py index 3acab9bd2..c3323e213 100644 --- a/tutorials/SB3/pistonball/sb3_pistonball_vector.py +++ b/tutorials/SB3/pistonball/sb3_pistonball_vector.py @@ -99,8 +99,8 @@ def eval(env_fn, num_games: int = 100, render_mode: str | None = None, **env_kwa obs, reward, termination, truncation, info = env.last() if termination or truncation: - for agent in env.agents: - rewards[agent] += env.rewards[agent] + for a in env.agents: + rewards[a] += env.rewards[a] break else: act = model.predict(obs, deterministic=True)[0] diff --git a/tutorials/SB3/waterworld/sb3_waterworld_vector.py b/tutorials/SB3/waterworld/sb3_waterworld_vector.py index 60bb62934..74390e52d 100644 --- a/tutorials/SB3/waterworld/sb3_waterworld_vector.py +++ b/tutorials/SB3/waterworld/sb3_waterworld_vector.py @@ -78,8 +78,8 @@ def eval(env_fn, num_games: int = 100, render_mode: str | None = None, **env_kwa for agent in env.agent_iter(): obs, reward, termination, truncation, info = env.last() - for agent in env.agents: - rewards[agent] += env.rewards[agent] + for a in env.agents: + rewards[a] += env.rewards[a] if termination or truncation: break else: