Skip to content

Commit

Permalink
fix: invert the condition for assertions
Browse files Browse the repository at this point in the history
  • Loading branch information
WiemKhlifi committed Oct 25, 2024
1 parent 67878f4 commit b3d2495
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jumanji/environments/routing/lbf/generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b3d2495

Please sign in to comment.