Class website
 

houck

    Exercise_01
    Exercise_02
  Exercise_03
    Final




Behavior + Adaptation

Based on Daniel Hillis' simulated evolution of sorting algorithms this application attemtps to evolve a drawing program. The code starts with a population of 100,000 random polygon based drawing commands. Only simple four vertex polygons are drawn all complex polygons are discarded. The fitness of each entity is determined by comparing its output with a target image. This is done by taking the average pixel value of the interior of the randomly generated polygon and comparing it with the avgerage pixel value of that polygon mapped over the same area in the target image. If they have the same average pixel value the drawing command is considered to be fit.

Finer grained tuning is then applied to the fitness level. Shapes with a smaller area are given a higher fitness score as they are considered to be more accurate. The absolute difference between the brightest and darkest value of the averaged pixel area is also considered. For example, an area with a large variance in pixel levels is less fit than an area where there is little difference between the lightest and darkest pixels.

The drawing commands of an entity are then drawn starting with the largest to smallest in order to preserve detail. See a simplified version of the software used to generate the following images by clicking applet. Click the following images to see their process of evolution.

img_01 img_02