Skip to content

Does Mesa support changing agent sizes in a continuous space? #1829

Answered by rht
Lee-Talman asked this question in Q&A
Discussion options

You must be logged in to vote

#1830 implements drawing the continuous space. You can try this with the boid flockers example https://github.com/projectmesa/mesa-examples/tree/main/examples/boid_flockers,

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

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@rht
Comment options

Answer selected by Lee-Talman
@Lee-Talman
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants