Skip to content

Commit

Permalink
intro_tutorial update
Browse files Browse the repository at this point in the history
- add AgentSet functionality section
- change N parameter to n to be consistent
- improve grammar and readability
  • Loading branch information
tpike3 committed Oct 20, 2024
1 parent 997e7c5 commit e18c288
Show file tree
Hide file tree
Showing 3 changed files with 470 additions and 641 deletions.
4 changes: 2 additions & 2 deletions docs/tutorials/MoneyModel.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def step(self):
class MoneyModel(mesa.Model):
"""A model with some number of agents."""

def __init__(self, N, width, height, seed=None):
def __init__(self, n, width, height, seed=None):
"""Initialize a MoneyModel instance.
Args:
Expand All @@ -58,7 +58,7 @@ def __init__(self, N, width, height, seed=None):
height: Height of the grid.
"""
super().__init__(seed=seed)
self.num_agents = N
self.num_agents = n
self.grid = mesa.space.MultiGrid(width, height, True)
self.schedule = mesa.time.RandomActivation(self)

Expand Down
Loading

0 comments on commit e18c288

Please sign in to comment.