From b47e4c6bfdf7eaaf3d0ddfb5aa6a38b3c0148ca0 Mon Sep 17 00:00:00 2001 From: elliottower Date: Tue, 14 Mar 2023 17:14:34 -0400 Subject: [PATCH] Fixed logic to remove agents at truncation --- tutorials/EnvironmentCreation/2-AddingGameLogic.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tutorials/EnvironmentCreation/2-AddingGameLogic.py b/tutorials/EnvironmentCreation/2-AddingGameLogic.py index 812ec194a..8ed646f0f 100644 --- a/tutorials/EnvironmentCreation/2-AddingGameLogic.py +++ b/tutorials/EnvironmentCreation/2-AddingGameLogic.py @@ -81,6 +81,7 @@ def step(self, actions): if self.timestep > 100: rewards = {"prisoner": 0, "guard": 0} truncations = {"prisoner": True, "guard": True} + self.agents = [] self.timestep += 1 # Get observations