Monsters v Aliens
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
WHAT IS IT?
Modeling the behavior of two antagonistic breeds.
HOW IT WORKS
Male ghosts and male monsters don't like each other. When given a chance, they'll try to backstab one another. Also, they'll kidnap and convert females of the opposite race. And finally will breed with females of their own race. Ghosts die in 10 ticks.
HOW TO USE IT
Hit setup to spread out the ghosts and monsters. Use the sliders to try different scenarios.
THINGS TO NOTICE
This model exemplifies the phenomenon known as "tipping point". Under certain conditions, the growth will be exponential. Under others, everything dies out.
THINGS TO TRY
Adjust the interaction range to make the effects more pronounced. Also, change the density and the range to see what's necessary to ensure population growth.
EXTENDING THE MODEL
Try adding more species. Experiment with environmental death factors.
NETLOGO FEATURES
Look in the "interact!" procedure for usage of self/myself.
Comments and Questions
turtles-own[ type? ;; Monster (0) or Ghost (1) sex? ;; Male (0) or Female (1) age ;; How many ticks old they are ] to setup clear-all create-turtles num-turtles ask turtles ;; Here, we're distributing the turtles throughout the world ;; and setting initial parameters. [setxy random-xcor random-ycor set age 0 set type? random 2 set sex? random 2 ifelse type? = 1 [set color 55 set shape "ghost"] [set color 105 set shape "monster"]] end to go ask turtles ;; first we tell the turtles to move [facexy random-xcor random-ycor set age age + 1 if age > maximum-age [die] jump random 5 ;; and then they fight! interact!] ;; This is just put in becuase the model is going crazy... if count turtles > 100 or count turtles < 1 [stop] tick end to interact! ;; Since males are the aggressive ones, we ask for gender first. if [sex?] of self = 0 ;; then our turtle looks around [ask other turtles in-radius interaction-radius [ifelse type? = [type?] of myself ;; If it sees a female of it's own type... [if sex? = 1 [if random 2 = 1 [hatch 1 [ lt 45 fd 3 set sex? random 2 ifelse type? = 1 [set color 55 set shape "ghost"] [set color 105 set shape "monster"]]]]] ;; But if it sees a male of the other type, it'll try to ambush him [ifelse sex? = 0 [if random 2 = 1 [die]] ;; Or it will kidnap the female of the other type. [set type? [type?] of myself]]]] end
There is only one version of this model, created almost 14 years ago by Shamiq Islam.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.