Courses/CS 461/Winter 2006/Bill Kunyiha/Homework2
From CSWiki
[edit] Flocking
1. Emergence
The emergent phenomenon is the flocking of birds. The birds seam to be moving in an orderly manner. It’s like the birds know the direction the should all turn.
2. Rules
The birds do not have a ruler they follow, but each bird follows the bird that nearest to it and follow three rules
A) "Alignment" whereby a bird tends to turns in such a way that it is moving in the same direction ad the bird nearest to it.
B) "Separation" where by the bird will keep a certain distance from the other bird to avoid collision.
C) "Cohesion" whereby a bird will move towards a bird that’s nearby but avoid moving to close as to cause collision. When two birds are too close, the "separation" rule overrides Cohesion and Alignment, which are deactivated until the minimum separation is achieved.
3. Description
Emergence occurs because each bird follows the bird that’s closest to it. The rules governing this prevent one bird from getting too close to another and thus causing a collision. Also the birds move at uniform speed forward. The birds do not always stay in there groups. This is mostly caused by other birds getting too close and therefore causing one of the birds or even both to move in order to avoid a collision. In so doing the bird might end up being closer to a different flock of birds and thus changing the flock it was flying with or even end up being on its own if it moved many more than once to avoid a collision. With one bird following the one closest to it, flocking takes place, which is an emergent phenomenon
[edit] Follower
1. Emergence
Here turtles connect with each other causing a emergence phenomenon of forming long chains. The emergence phenomenon is long chains.
2. Rules
A turtle follows another turtle, and that turtle can then be followed by another turtle. This means there are four turtle states, each represented by a different color: Magenta: A turtle that’s unattached. Green: A turtle that’s following another turtle (a "tail") Yellow: A turtle that’s being followed by another turtle (a "head") Blue: Turtles following and being followed by other turtles (a "body" segment)
3. Description
Turtles are created in the magenta (unattached) state. At each turn, each turtle checks a random around itself for a turtle that is not already being followed. If it finds one it "latches on" and start following the movements of that turtle. An unattached turtle (one that has not yet "latched on" to another turtle) will move randomly. This effect causes an emergence of lines forming that would not form if there was only one turtle moving or if there were many turtles moving without the governing rules. Thus the turtles and the rules together cause the emergence phenomenon on the lines forming to occur.
[edit] Moths
1. Emergence The emergence phenomenon is moths flying in circles around a light.
2. Rules
Each moth follows a set of rules which do not specify that a moth should fly around a light source in circles. Rather the moths flying around in circles is an emergence as a result of the following rules.
a.) Moths turn towards the direction of where the source of light is.
b.) Moths the intensity of the light next to them to that of the light in front of the and if this comparison is below a certain threshold, then they fly towards the light other wise away from it. The threshold is determined by the moths' sensitivity to light.
c.) If the moths cannot detect any light in the space where it is, it flutters about randomly.
3. Description
When a moth detects light straight ahead of it that is not beyond a certain threshold, it moves towards that source of light. This has the net effect of moths moving towards the source of light. On the other hand when the moth gets to close to the source of light, the threshold is exceeded and the moths fly way from the light but in there escaping the light, the threshold gets smaller the thus seam to be moving around the light source in circles.

