Courses/CS 461/Winter 2006/Chris Lemcke/Week 2

From CSWiki

< Courses | CS 461 | Winter 2006 | Chris Lemcke
Revision as of 17:35, 21 January 2006 by Chris Lemcke (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Contents

[edit] The Bug-Hunt Camouflage Model

  • This model demonstrates how camouflaging can arise quickly as a genetic trait when a active predator population hunts a species using visual sensing.
  • The model works by randomly distributing agents ("moths") of different colors across an image, such as a field of poppies. The user takes on the role of the predator by clicking on as many moths as he or she can as fast as possible. Slowly, a small population of moths will become harder and harder to detect. This eventually leads to a moth population that is near invisible on the background field.
  • The emergent behavior of camouflaging arises from this model by the process of natural selection. Those moths with the gene that makes them harder to be seen are less likely to be noticed by the predator, and thus are more likely to survive and reproduce. By increasing the initial population of moths, the predator's choice becomes more random and camouflaging takes longer to emerge. By turning on Day/Night, the model is hidden briefly before new moths are introduced, otherwise the predator is more likely to notice the appearance of new moths. The background image also affects the model. If the image has two distinct coloring areas, two distinct populations of moths will arise.

[edit] Initial image:

In this image, the moths are randomly distributed across the image with many different colors. Image:moths-poppystart.jpg

[edit] Initial placement of moths:

Here you can see the placement of the moths in the image above without the background image.

Image:moths-poppy-start.JPG

[edit] Image after predator:

Here is what the screen looks like after natural selection of the obvious moths.

Image:moths-eaten.JPG

[edit] Moths after predator:

As you can see, the rest of the moths are predominately orange, and there are a suprising amount that weren't visible in the screen above.

Image:moths-revealed.JPG

[edit] Fur Coloring Model

  • This model demonstrates a possible way of common fur patterns in mammals, such as spots and stripes, as emergent behaviors.
  • The animal skin is modeled by an array of pigment cells. Each cell is either colored or not. The cells 'secrete' one of two types of chemicals: activators or inhibitors. Activators cause a cell to become colorful, inhibitors cause cells to lose their color. Each cell compares the ratio of both in the neighboring cells and chooses whether to be colorful or not. Cells farther away influence it less, and cells closer influence each cell more, like pools of chemicals spreading. However, while colored cells within a cell's inner perimeter produce activators, colored cells between the cell's inner and outer perimeter (4-6 cells away) will produce inhibitors. Non-colored cells do nothing, and if the influence of activators and inhibitors is equal, the cell will not change. Lastly, we can change the power of the inhibitors or activators by means of a variable, 'w'. In summary, we can calculate the cell's coloration by the following method:
D = # of colored cells in a 6-cell radius.  D(A) is the number of D cells secreting activators in a 6-cell radius.
D(I) is the number of D cells secreting inhibitors in a 3-cell radius.  w is the ratio of power of ihibitors over activators.

therefore, if D(A) - w*D(I) is:
*> 0, the central cell will be colored.
*< 0, the central cell will be non-colored.
*= 0, the central cell will not be changed.
  • All of the cells are updated simultaneously, so each cell affects every other cell on the plane. Increasing the ratio of inhibitors over activators causes the "fur" to become lighter, and decreasing it causes it to become lighter. Within a certain range, decreasing this ratio will cause the fur to be more stripy, and increasing it will cause it to be more splotchy. We can also affect the radius of the circles, or change them to be more elliptical. More elliptical perimeters cause zebra-like stripes, while more equal x and y values will create meandering stripes like leopards. If this model is accurate, it would explain why siblings often have similar, but not identical striping or, such as in the case of cats, coloring patterns. If the activator/inhibitor and the initial colored/non-colored ratios are determined mainly by species DNA, the patterns will be of the same type (splotchy, stripey, etc.), and if the values of the perimeter radii are determined genetically, the offspring will have similar patterning. This is an interesting model to explore for other such patterns, like plumage on birds or shading on housecats.


[edit] Stripey Fur

The default pattern generated by the model.

Image:fur-stripes1.JPG

[edit] Vertical Stripes

With more elliptical radii, the striping pattern is more exaggerated vertically or horizontally.

Image:fur-stripes2.JPG

[edit] Spotty Fur

The fur model with an increased inhibitor/activator ratio.

Image:fur-spotty.JPG

[edit] The Eco-Segregation Model

  • This is an adaptation that I wrote of the classic Segregation Model. I attempted to capture the emergent behavior of economic segregation, where different neighborhoods in real life are clumped based on income, much like they clump based on racial segregation.

The code is here: Media:Eco-Segregation.nlogo

  • Each agent has a random income, between 0 and the max-income. I believe that here is the problem in the model, because for some reason the average income is about the same number, no matter what the max-income is set to. However, ideally, the spread of agents will be random, both by income and across the areas. Each agent will try to reach a neighborhood where the average income of the area is at least a certain percentage of it's own income. The agent will be happy where it is, then.
  • In this model, however, less than 1% of the population is happy, so the model never seems to find a balance. The behavior that "emerges" is just a randomly distributed bunch of turtles wandering around madly. Modifying the range of income, number of turtles, or even altering the %-similar-income wanted don't seem to create any changes in the model.