ABM showing behavior when people align with others
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
I have made this model to demonstrate how agents behave in dynamic groups.
HOW IT WORKS
We are able to create agents and then agents start moving randomly. Now, if they find some other agents in their close range, they will have two options. One is to face one of them with a given probability of align. The other is to face the same heading as the other agent with that given probability
HOW TO USE IT
You can play with the sliders to change the number of turtles created or change the alignment probability (in percentage) or the options of alignment.
THINGS TO NOTICE
It is interesting to try to change the probability of alignment. And see the behavior.
THINGS TO TRY
CREDITS AND REFERENCES
(c) Muaz A. Niazi 2022 Professor, MCS, NUST, Pakistan
Comments and Questions
to setup setworld maketurtles end to setworld ca ask patches [ set pcolor white ] end to maketurtles create-turtles num [ setxy random-pxcor random-pycor set shape "bug" ] end to go ask turtles [ rt random 30 lt random 30 fd speed let temp turtles in-radius 3 if any? temp [ let r random 100 if r < align [ ifelse not heading-or-facing? [ face one-of temp ] [ let h [heading] of one-of temp set heading h ] ] ] ] ;ask turtles in-radius 3 ;[ ; face self ;] end
There is only one version of this model, created over 3 years ago by Muaz Niazi.
Attached files
File | Type | Description | Last updated | |
---|---|---|---|---|
ABM showing behavior when people align with others.png | preview | Preview for 'ABM showing behavior when people align with others' | over 3 years ago, by Muaz Niazi | Download |
This model does not have any ancestors.
This model does not have any descendants.