CSC107 - Lab 12
Segregation

Assigned Feb 22
Due Feb 25 1 pm


Show your work on all questions for full credit.

References

Question 1

From the initial model linked above, change the setup procedure to make three species: bears, penguins, and one of your choice. Assign this new species a default color. Add in the necessary code to make this new species move when uncomfortable. What differences do you notice between this model and the original?

Question 2

From the initial model linked above, alter the code to have the bears and penguins so that they will also move to find a new location if the diversity of their neighborhood is too low. This way, individuals who are too isolated from their group or those who are completely surrounded by their group will want to find a better location. Use a slider so that it is easy to change this diversity threshold. What differences do you notice between this model and the original?
© Mark Goadrich 2014, Centenary College of Louisiana