Skip to content

Commit

Permalink
Boid flockers: Add Solara viz file
Browse files Browse the repository at this point in the history
  • Loading branch information
rht committed Jan 21, 2024
1 parent 31c9a3c commit ad3cad3
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions examples/boid_flockers/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
from mesa.experimental import JupyterViz

from boid_flockers.model import BoidFlockers


def boid_draw(agent):
return {"color": "tab:red"}


model_params = {
"population": 100,
"width": 100,
"height": 100,
"speed": 5,
"vision": 10,
"separation": 2,
}

page = JupyterViz(
BoidFlockers,
model_params,
measures=[],
name="BoidFlockers",
agent_portrayal=boid_draw,
)
page # noqa

0 comments on commit ad3cad3

Please sign in to comment.