Skip to content

Commit

Permalink
Update pd_grid
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutH committed Sep 21, 2024
1 parent 0b09f5c commit a9d8a6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions examples/pd_grid/pd_grid/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@
class PdGrid(mesa.Model):
"""Model class for iterated, spatial prisoner's dilemma model."""

schedule_types = {
"Sequential": mesa.time.BaseScheduler,
"Random": mesa.time.RandomActivation,
"Simultaneous": mesa.time.SimultaneousActivation,
}
activation_regimes = ["Sequential", "Random", "Simultaneous"]

# This dictionary holds the payoff for this agent,
# keyed on: (my_move, other_move)
Expand Down
4 changes: 2 additions & 2 deletions examples/pd_grid/pd_grid/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"height": 50,
"width": 50,
"activation_order": mesa.visualization.Choice(
"Scheduler type",
"Activation regime",
value="Random",
choices=list(PdGrid.schedule_types.keys()),
choices=PdGrid.activation_regimes,
),
}

Expand Down

0 comments on commit a9d8a6a

Please sign in to comment.