Line 4: |
Line 4: |
| = Introduction = | | = Introduction = |
| Kandid is a tool for breeding graphics. In Kandid a population consist of images looking like abstract | | Kandid is a tool for breeding graphics. In Kandid a population consist of images looking like abstract |
− | art or patterns. These graphical forms are not drawn by hand. | + | art or geometric patterns. These graphical forms are not drawn by hand. |
− | Instead new forms can be found using an interactive genetic | + | Instead new forms can be found using an interactive genetic algorithm. |
− | algorithm. | |
| | | |
| Kandid is a combination of image rendering algorithms, genetic | | Kandid is a combination of image rendering algorithms, genetic |
Line 20: |
Line 19: |
| | | |
| == Background == | | == Background == |
− | Darwinian evolution consists of a simple cycle. The most fit entities in a population reproduce. The resulting offspring are a combination of their parents with some random mutations. Some offspring may be improvements over their parents. The most fit of offspring continue to reproduce. In Kandid the definition of fitness comes from the users aesthetic preferences. The program is a working horse presenting the user proposals for new images letting the user the decision which one is preferable. The concept behind Kandid was introduced by Karl Sims 20 years ago. It is a combination of image rendering algorithms, genetic programming and interactive aesthetic selection. In 2003 I publish a different version based on fractal geometry at http://kandid.sourceforge.net. Kandid for the Sugar desktop is more than a simple port. It is based on different graphic algorithms and shows more introspection. | + | Darwinian evolution consists of a simple cycle. The most fit entities in a population reproduce. The resulting offspring are a combination of their parents with some random mutations. Some offspring may be improvements over their parents. The most fit of offspring continue to reproduce. In Kandid the definition of fitness comes from the users aesthetic preferences. The program is a working horse presenting the user proposals for new images letting the user the decision which one is preferable. The concept behind Kandid was introduced by Karl Sims 20 years ago. It is a combination of image rendering algorithms, genetic programming and interactive aesthetic selection. Back in 2003 I publish a different version of Kandid based on fractal geometry at http://kandid.sourceforge.net. Kandid for the Sugar desktop is more than a simple port. It is based on different graphic algorithms and allows the user more introspection of how the images are composed. |
| | | |
| | | |
| == What you can learn == | | == What you can learn == |
− | You can consider Kandid as a simulation of evolution. But compared with the evolution of live there are some differences. The first is how fitness is handled. In Kandid it needs a human to select the proposed images. Next is the limited range of output. The program can produce lots of color combinations and geometrical shapes. But after using Kandid for a while the style of the images is predictable. | + | You can consider Kandid as a simulation of evolution. But compared with the evolution of live there are some differences. The first is how fitness is handled. In Kandid it needs a human to select the proposed images. Next issue is the limited range of output. The program can produce lots of color combinations and geometrical shapes. But after using Kandid for a while the style of the images is predictable. |
| | | |
| You can use Kandid to improve you aesthetic feeling. Most of the random images are too indifferent. But sometimes you find a surprisingly interesting composition of shapes or a god looking color combination. Maybe you see things you never noticed before. | | You can use Kandid to improve you aesthetic feeling. Most of the random images are too indifferent. But sometimes you find a surprisingly interesting composition of shapes or a god looking color combination. Maybe you see things you never noticed before. |
Line 82: |
Line 81: |
| | | |
| You can repeat this for a long run. | | You can repeat this for a long run. |
− | Always marking the image you find most appealing with a high ranking | + | Always mark the image you find most appealing with a high ranking |
− | and setting the images, that should not appear again in the next generation, | + | and set the images, that should not appear again in the next generation, |
| with a low ranking. | | with a low ranking. |
| | | |
| [[Image:kandid-evolved-population.png|400px]] | | [[Image:kandid-evolved-population.png|400px]] |
| | | |
− | === Tweak the control === | + | === Tweak the controls === |
| The „Flurry rate„ in Kandid is something like the mutation rate. | | The „Flurry rate„ in Kandid is something like the mutation rate. |
| Offspring images will be generated by crossing over the two parent images | | Offspring images will be generated by crossing over the two parent images |
Line 134: |
Line 133: |
| | | |
| == Exporting images to an image manipulation program == | | == Exporting images to an image manipulation program == |
− | You can send an image to the journal and later open it with an image manipulation program. The images are exported in Portable Network Graphics (PNG) format. The RGB colors and the alpha channel is included. In the population view all images are painted on a black background. If the image is partial transparent you see this black background shining through. After loading an exported image to an image manipulation program it my look different. Depending on your image manipulation program a white background or a checkerboard is looking through. | + | You can send an image to the journal and later open it with an image manipulation program. The images are exported in Portable Network Graphics (PNG) format. The RGB colors and the alpha channel is included. In the population view all images are painted on a black background. If the image is partial transparent you see this black background shining through. After loading an exported image to an image manipulation program it my look different. Depending on your image manipulation program a white background or a checkerboard is looking through. Internally Kandid stores the parameters for recreating an image not an pixel per pixel representation. Bitmaps are only used for post processing the images. |
| | | |
| | | |
Line 141: |
Line 140: |
| === What you see is made of several layers each containing only simple signs === | | === What you see is made of several layers each containing only simple signs === |
| The image rendering is made from simple geometrical shapes. For example select a letter from the alphabet or a mathematical sign an draw it repeatedly on an drawing canvas. Or subdivide the drawing area in four smaller squares, pick some of these little squares by random and repeat this process for several times. | | The image rendering is made from simple geometrical shapes. For example select a letter from the alphabet or a mathematical sign an draw it repeatedly on an drawing canvas. Or subdivide the drawing area in four smaller squares, pick some of these little squares by random and repeat this process for several times. |
− | Or select a bulk of points by random and paint a smooth curve using these points. | + | Or select a bulk of points at random positions and paint a smooth curve using these points. |
| | | |
− | Each of this rendering algorithm draws its output to an separate layer. The final image is a combination of less than dozens of these layers. The layers are organized as a tree. The finally visible layer is composed from two secondary layers. The secondary layers are combined from layers below. Until you reach one of the leaf of this image rendering tree. There are different strategies for combining two layers. A simple example is adding the color values of two layers to build the resulting layer. A more complex composing strategy is using one of the layer as an mask channel to clip the other layer. | + | Each of this rendering algorithm draws its output to a separate layer. The final image is a combination of approximately less than dozens of these layers. The layers are organized as a tree. The finally visible layer is composed from two secondary layers. The secondary layers are combined from layers below. Until you reach one of the leafs of this image rendering tree. There are different strategies for combining two layers. A simple example is adding the color values of two layers to build the resulting layer. A more complex composing strategy is using one of the layer as an mask channel to clip the other layer. |
| | | |
− | Kandid can display all the details an image is made from. Select "Explain details" and wait a view seconds. Then the program shows a scrollable view with all images layers and how they are combined. The final image is made of nothing more the the displayed details but the effects during composing are often hard to understand. | + | Kandid can display all the details an image is made from. Select "Explain details" and wait a view seconds. Then the program shows a scrollable view with all image layers and how they are combined. The final image is made of nothing more the the displayed details but the effects during composing are often hard to understand. |
| + | [[Image:kandid-details-page-400.png|400px]] |
| | | |
| === Offspring images differ from there parents === | | === Offspring images differ from there parents === |
− | Select "Show ancestor" to display a family tree of an newly breeded image. On the top of the page you see the youngest image and below its ancestors. Sometimes the offspring looks different form its parents. This has two reasons. One is mutation. In this case the impact of the mutated parameters takes precedence over the inherit genome. The other reason are genome information that have no visual effect in the parent, but now in the offspring it is visible. Don't confuse the details view and the ancestor view. In the details view you see all the elements an image is made off. In the ancestor view you see the final images from earlier generations. | + | Select "Show ancestor" to display a family tree of an newly breeded image. On the top of the page you see the youngest image and below its ancestors. Sometimes the offspring looks different form its parents. This can have two reasons. One is mutation. In this case the impact of the mutated parameters take precedence over the inherit genome. The other reason is genome information that have no visual effect in the parent, but now in the offspring it is visible. Don't confuse the details view and the ancestor view. In the details view you see all the elements an image is made of. In the ancestor view you see the final images from fom the current generation and earlier generations. |
| + | [[Image:kandid-ancestors-page-400.png|400px]] |
| | | |
| | | |
Line 186: |
Line 187: |
| | | |
| == Bug tracking == | | == Bug tracking == |
− | Users can report bugs and suggest an enhancement to [http://bugs.sugarlabs.org/ http://bugs.sugarlabs.org/]. Use Trac component name 'Kandid'. | + | Users can report bugs and suggest an enhancement to [http://bugs.sugarlabs.org/ http://bugs.sugarlabs.org/]. Use component name 'Kandid' to tag your ticket. |
| | | |
| == Version history == | | == Version history == |
| === v5: April 2010 === | | === v5: April 2010 === |
− | * Added a simple ancestors view. The ancestors of newly generated will be displayed as a tree. This is only a temporary solution and should be replaced later. | + | * Added a simple ancestors view. The ancestors of newly generated images will be displayed as a tree. This is only a temporary solution and should be replaced later. |
| * Added a layer for rendering quadtrees. | | * Added a layer for rendering quadtrees. |
| * Bug fixing samplers / rendering engine. The changes in the rendering engine are not backwards compatible. | | * Bug fixing samplers / rendering engine. The changes in the rendering engine are not backwards compatible. |
| * Saving and restoring the graphics context in modifier nodes. Maybe this bug fix is not backward compatible. | | * Saving and restoring the graphics context in modifier nodes. Maybe this bug fix is not backward compatible. |
| + | |
| === v4: February 2010 === | | === v4: February 2010 === |
| * Images generated by Kandid can be exported as PNG images to the journal. You can open an exported image with an image manipulation program. | | * Images generated by Kandid can be exported as PNG images to the journal. You can open an exported image with an image manipulation program. |