Lecture:: 01-03-2013

posted Jan 2, 2013, 10:33 AM by Samuel Konstantinovich   [ updated Jan 3, 2013, 6:19 AM ]

Important: Make sure you show me your colors/edge detection labs from before break. Have it open before you call me over. Have it open in a SECOND netlogo window while you do your work. (If you don't know how to open a second window, ask someone)

Zombies vs Humans

1. Overview:

-You will work on this today. Do not work with you partner on this project, if you want help, please ask someone else. After tomorrow you will be required to swap your file with your partner, and add new features to your partner's code. This means you should be writing things in a readable and clear way (no crazy variable names or poor spacing/newlines)

2. Zombie Behavior:

-When there is a human in a radius of zombie_vision_radius (make a slider), the Zombies chase after the closest human at a speed of 1. Otherwise they shamble. Shamble is a slow wiggle (.3 speed). 

-When a zombie catches a person (the person is on the same patch as the zombie) the person dies, and a new zombie is created it should look like the other zombies. 

3. Human Behavior

-People run away from zombies that are closer than human_vision_radius (make a slider) units away. Humans that are not running just wiggle (speed .5). When a person is running they move at speed 1.5. 

-People can only run if they have some stamina left, otherwise they just wiggle. People start with maximum_stamina (make a slider). Their stamina decreases by 2 every time they are running, but when they wiggle, they gain 1 stamina (but no more than max_stamina.

4. Miscellaneous:

- Make Sliders for starting_zombies ( 1-20), starting_humans (1-100)

- Make Slider for maximum_stamina

- Make Sliders for zombie_vision_radius, and human_vision_radius

- Make Monitors for : the number of zombies and the number of humans

- Your project should run at an appropriate speed. 

- Zombies are all green, humans are all orange.

- Optionally make a custom shape “zombie” in the shapes editor (spend NO MORE THAN 2 minutes on this) Make sure you duplicate the “person” shape instead of just editing it, or you will lose the person shape.