From 7c7513b1e4328c18227994e91e6db00e286cd8c3 Mon Sep 17 00:00:00 2001 From: Vaibhav Sharma <88285949+vbv-shm@users.noreply.github.com> Date: Wed, 27 Nov 2024 11:01:11 +0530 Subject: [PATCH] Update agents.py --- mesa/examples/basic/schelling/agents.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mesa/examples/basic/schelling/agents.py b/mesa/examples/basic/schelling/agents.py index a9e6297fd4c..e6562989911 100644 --- a/mesa/examples/basic/schelling/agents.py +++ b/mesa/examples/basic/schelling/agents.py @@ -20,13 +20,13 @@ def step(self) -> None: self.pos, moore=True, radius=self.model.radius ) - neighborsboolean = [neighbor.type == self.type for neighbor in neighbors] + type_of_neighbors = [neighbor.type == self.type for neighbor in neighbors] # Count similar neighbors - similar = sum(neighborsboolean) + similar = sum(type_of_neighbors) # Count total neighbors - total_neighbors = len(neighborsboolean) + total_neighbors = len(type_of_neighbors) # If unhappy, move to a random empty cell: if (