From b3d2495d9ef761e5ce5fddd702f9c864aa1e08f2 Mon Sep 17 00:00:00 2001 From: WiemKhlifi Date: Fri, 25 Oct 2024 19:00:41 +0100 Subject: [PATCH] fix: invert the condition for assertions --- jumanji/environments/routing/lbf/generator.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jumanji/environments/routing/lbf/generator.py b/jumanji/environments/routing/lbf/generator.py index 55f89da90..a8b8b3f70 100644 --- a/jumanji/environments/routing/lbf/generator.py +++ b/jumanji/environments/routing/lbf/generator.py @@ -55,10 +55,10 @@ def __init__( assert num_food > 0, "Number of food items must be positive." assert max_agent_level >= 2, "Maximum agent level must be at least 2." - min_required_cells = num_agents + num_food * 3 + min_required_cells = num_agents + num_food assert ( grid_size**2 - ) * 0.4 <= min_required_cells, r"""Ensure at least 40% of the grid cells remain unoccupied + ) * 0.6 >= min_required_cells, r"""Ensure at least 40% of the grid cells remain unoccupied to facilitate smooth placement and movement of agents and food items.""" self.grid_size = grid_size