- Art
- Astronomy
- Biology
- Selection and Mutation Series
- Ant Patterns
- Bacterial Growth
- Bark Beetles
- Biological Buffer
- Birds Competing For Worms
- Color Bunnies
- Ecosystem - Predator, Prey, and Grass
- Ecosystem - Rabbits and Grass
- Ecosystem - Two Species
- Ecosystem With Predator, Prey, And Grass
- Forest Fire
- Honeycomb Formation
- Termites Perimeter
- Yeast Growth
- Chemistry
- Earth Science
- Mathematics
- Physics
- Social Science
Sexual+Selection+Mutation
Submitted by librarian on Wed, 2006-08-16 19:16. :: Category
HOW TO USE IT
Set up
Determine the initial population number with the number slider.
‘setup’ button will distribute rabbits and grass randomly across the land.
‘show statistics’ button will activate monitors, showing you metabogene statistics; minimum, maximum, average metabogene values; as well as the range and standard deviation of metabogene values in the population.
Run
The ‘go’ button will cause the grass to grow, the rabbits to move randomly, and eat grass. Rabbits are born with a randomly determined supply of ‘energy’. They use ‘energy’ to move, and gain ‘energy’ by eating grass. When their ‘energy’ is greater than the hatch-threshold (see below) they can reproduce. If two rabbits with energies above the hatch-threshold meet (land on the same patch), they reproduce. That is, an offspring is produced with 1/2 the parents’ average ‘energy’, moving randomly. Parent’s ‘energy’ is set to 2/3 of their ‘energy’. If rabbit ‘energy’ goes to zero, the rabbit dies. A graph of the number of rabbits (blue) and grass (green) vs. time is activated by ‘go’ button.
‘stop-it’ button stops all of this.
‘grass-rate’ slider determines how fast grass will grow. The ‘hatch-threshold’ slider determines how much ‘energy’ rabbit needs to accumulate before it can reproduce.
‘drought’ button kills 75% of the grass.
'mutation-rate' slider determines the probablity of mutation (10 means a probability of .1) based on a uniform distribution.
EXPLORATIONS
Set up and run model several times. Observe screen and statistics. Refer to graph.
What happens to the range and standard deviation of metabogenes over time? Compare results of several runs. Account for your results. Compare to sexrepro rabbits-no selection. Account for similarities and differences.
Experiment with drought. Does the timing of the drought have an impact on the overall size of the population ?
Turtle procedures
turtles-own [energy species [rabbit grass] colorgene dad metabolism]
;turtles can be of species rabbit or species grass
to setup
setxy random screen-width random screen-height
ifelse who < grass-rate
[setc black ht setspecies grass]
[set colorgene ((random 81) + 20)
setmetabolism colorgene ;colorgene is linked to metabolism
scale-color blue colorgene 20 100 ;scale the color to reflect colorgene
setspecies rabbit
setdad -1
setenergy random 10]
repeat 20 [grow]
end
to grow
if species = grass [ ;only grass turtles should do this
rt random 10 lt random 10
fd 1
if pc-ahead = green [stamp green] ;grass only grows near other grass
]
end
to move
if species = rabbit [ ;only rabbit turtles should do this
takestep
eat-grass
reproduce
death
]
end
to eat-grass ;turn the patch to black and increase energy
if pc = green [stamp brown setenergy energy + 1]
if energy > 30 [setenergy 30]
end
to takestep
rt random 50
lt random 50
setenergy energy - (metabolism / 100)
fd (metabolism / 50)
end
to reproduce
if energy > (hatch-threshold)
[grab one-of-turtles-here
[if ((species-of partner) = rabbit) and ((energy-of partner) > (hatch-threshold))
[setdad partner
reproduce2]
]
]
end
to reproduce2
setenergy-of dad ((energy-of dad) * .667)
setenergy energy * .667
hatch [setenergy (((energy-of dad) + energy) / 2)
setmetabolism (((metabolism-of dad) + metabolism) / 2)
setcolorgene metabolism
if ((random 100) < mutation-rate)
[setcolorgene (colorgene + (random 11) - 5)
if colorgene < 20 [setcolorgene 20]
if colorgene > 100 [setcolorgene 100]
scale-color blue colorgene 20 100
setmetabolism colorgene
]
seth random 360 jump 1]
ifelse energy > (hatch-threshold) and (energy-of dad) > (hatch-threshold)
[reproduce2]
[setdad -1]
end
to death
if energy < 0 [die]
end
Observer procedures
globals [mincolorgene maxcolorgene rangecolorgene avgcolorgene sdcolorgene temp totalcolorgene]
to setup
ca
clearplot
setbg brown
crt number + grass-rate
ask-patches [if (random 100) < 25 [setpc green]]
ask-turtles [setup]
setup-graph
end
to setup-graph
pp1 ppreset setppc green
pp2 ppreset setppc blue
pp3 ppreset setppc black
setplot-title "Rabbits and Grass"
setplot-yrange 0 300
setplot-xrange 0 50
end
to graph-it ;graph the amount of grass (scaled) and turtles
pp1 ppd plot (count-pc green) / 5
pp2 ppd plot count-turtles-with [species = rabbit]
pp3 ppd plot avg-colorgene
end
to total-rabbits
output count-turtles-with [species = rabbit]
end
to avg-colorgene
output ((sum-of-turtles-with (species = rabbit) [colorgene]) / count-turtles-with [species = rabbit])
end
to go
;the movebutton, grassbutton, and graphbutton are pressed
startmovebutton startgrassbutton startgraphbutton
end
to stop-it
;the movebutton, grassbutton, and graphbutton are stopped
stopmovebutton
stopgrassbutton
stopgraphbutton
end
to calcsd
settemp 0
ask-turtles [if color != black [settemp temp + ((colorgene - avgcolorgene) * (colorgene - avgcolorgene))]]
end
to calcstats
setmincolorgene min-of-turtles-with (species = rabbit) [colorgene]
setmaxcolorgene max-of-turtles-with (species = rabbit) [colorgene]
setrangecolorgene (maxcolorgene - mincolorgene)
settotalcolorgene sum-of-turtles-with (species = rabbit) [colorgene]
setavgcolorgene (totalcolorgene / count-turtles-with [species = rabbit])
calcsd
setsdcolorgene sqrt ((temp / (count-turtles-with [species = rabbit])))
end
5391 reads
