mucus follower vs random locomotion
Do you have questions or comments about this model? Ask them here! (You'll first need to log in.)
## WHAT IS IT?
(a general understanding of what the model is trying to show or explain)
## HOW IT WORKS
(what rules the agents use to create the overall behavior of the model)
## HOW TO USE IT
(how to use the model, including a description of each of the items in the Interface tab)
## THINGS TO NOTICE
(suggested things for the user to notice while running the model)
## THINGS TO TRY
(suggested things for the user to try to do (move sliders, switches, etc.) with the model)
## EXTENDING THE MODEL
(suggested things to add or change in the Code tab to make the model more complicated, detailed, accurate, etc.)
## NETLOGO FEATURES
(interesting or unusual features of NetLogo that the model uses, particularly in the Code tab; or where workarounds were needed for missing features)
## RELATED MODELS
(models in the NetLogo Models Library and elsewhere which are of related interest)
## CREDITS AND REFERENCES
(a reference to the model's URL on the web if it has one, as well as any other necessary credits, citations, and links)
Comments and Questions
breed[males male] breed[females female] breed[mutant-females mutant-female] globals[ X1 test_mutant_female test_female male_for_mutant male_for_female min_distance3_of_mutant_females min_distance3_of_females test_mutant_male test_male female_for_mutant female_for_male min_distance3_of_mutant_males min_distance3_of_males] patches-own [mucus] to setup __clear-all-and-reset-ticks setup-patch setup-abalone-mutantfemale setup-abalone-female setup-abalone-male reset-ticks end to setup-patch ask patches [set pcolor 97] end to setup-abalone-male create-males 1 [setxy random-xcor random-ycor] ask males [ set pen-size 2 set color blue set size 2 ] end to setup-abalone-female create-females 1 [setxy random-xcor random-ycor] ask females [ set pen-size 2 set color red set size 2 ] end to setup-abalone-mutantfemale create-mutant-females 1 [setxy random-xcor random-ycor] ask mutant-females [ set pen-size 2 set color pink set size 2 ] end ;;;;;;;;;;;;;;;;;;;;; ;;; Go procedures ;;; ;;;;;;;;;;;;;;;;;;;;; to go if ticks >= 30 [ stop ] set-mucus move-abalone disapper-of-mucus check-distance tick end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to set-mucus ask turtles [ set mucus mucus * 0 set mucus mucus + 1 if (mucus > 0) [set pcolor gray] ] end ;;;;;;;;;;;; to move-abalone ask-concurrent turtles with [ color = red or color = blue][ set X1 random-gamma 0.618714 0.011419933 repeat X1 [ ifelse random 1 < 0 [rt random 360][lt random 360] forward 0.25 set mucus mucus * 0 set mucus mucus + 1 if (mucus > 0) [set pcolor gray] ] ] ask-concurrent turtles with [ color = pink or color = sky] [ set X1 random-gamma 0.618714 0.011419933 repeat X1 [ ifelse random 1 < 0 [rt random 360][lt random 360] forward 0.25 set mucus mucus * 0 set mucus mucus + 1 if (mucus > 0) [set pcolor gray] ] ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to disapper-of-mucus ask patches with [pcolor = gray][ set mucus mucus - 1 if (mucus < 0) [set pcolor 97] ] end ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; to check-distance set test_mutant_female one-of mutant-females set test_female one-of females set male_for_mutant [min-one-of turtles with [color = blue or color = sky] [distance myself] ] of test_mutant_female set male_for_female [min-one-of turtles with [color = blue or color = sky] [distance myself] ] of test_female let mutant-near_male_positiony [ycor] of male_for_mutant let mutant-near_male_positionx [xcor] of male_for_mutant let mutant-female_positiony [ycor] of test_mutant_female let mutant-female_positionx [xcor] of test_mutant_female let near_male_positiony [ycor] of male_for_female let near_male_positionx [xcor] of male_for_female let female_positiony [ycor] of test_female let female_positionx [xcor] of test_female set min_distance3_of_mutant_females (sqrt ( (mutant-near_male_positionx - mutant-female_positionx) ^ 2 + ( mutant-near_male_positiony - mutant-female_positiony ) ^ 2)) set min_distance3_of_females (sqrt ( (near_male_positiony - female_positiony) ^ 2 + (near_male_positionx - female_positionx ) ^ 2)) end
There is only one version of this model, created about 6 years ago by Yukio Matsumoto.
Attached files
No files
This model does not have any ancestors.
This model does not have any descendants.