Activities/Kandid: Difference between revisions

No edit summary
 
(6 intermediate revisions by one other user not shown)
Line 138: Line 138:


=== 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 and draw it repeatedly on a 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 at random positions 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 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.
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 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.
Kandid can display all the details an image is made from. Select "Explain details" and wait a few 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 than the displayed details but the effects during composing are often hard to understand.


[[Image:kandid-details-page-400.png|400px]]
[[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 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.
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 having 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 the current generation and earlier generations.


[[Image:kandid-ancestors-page-400.png|400px]]
[[Image:kandid-ancestors-page-400.png|400px]]


= Kandid and genetic programming =
= Kandid and genetic programming =
Line 165: Line 164:


=== Fitness Function ===
=== Fitness Function ===
In traditional genetic programming a function is needed to calculate an indication how optimal a genome is. This is called fitness function or fitness landscape. The parents with the best results are preferred producing offspring. Unfortunately some problems, like producing interesting digital images, don't have mathematically defined fitness functions. Therefore Kandid has no build in fitness function. No assumption is made how meaningfully an image is for the user. Kasimir Malewitsch 'black square on a white field' can be reinvented with Kandid. But must user wold prefer more colorful images.  
In traditional genetic programming a function is needed to calculate an indication how optimal a genome is. This is called fitness function or fitness landscape. The parents with the best results are preferred producing offspring. Unfortunately some problems, like producing interesting digital images, don't have mathematicall defined fitness functions. Therefore Kandid has no build in fitness function. No assumption is made how meaningfully an image is for the user. Kasimir Malewitsch 'black square on a white field' can be reinvented with Kandid. But most users would prefer more colorful images.


=== Interactive Genetic Algorithm ===
=== Interactive Genetic Algorithm ===
Line 171: Line 170:


=== Different evolution Strategies ===
=== Different evolution Strategies ===
There are different paradigms for implementing a genetic algorithm. ''Evolution Strategies'', invited by Ingo Rechenberg, are suitable for evolving real valued parameters to optimizing the result of a fixed formula. ''Genetic Algorithms'', introduced by John Holland are also for optimizing parameters in hard coded functions. Where the parameters are binary coded instead of floating point numbers. Genetic operations in Kandid can be better understand as 'Evolution Strategy''. But this abstract dispute.
There are different paradigms for implementing a genetic algorithm. ''Evolution Strategies'', invited by Ingo Rechenberg, are suitable for evolving real valued parameters to optimizing the result of a fixed formula. ''Genetic Algorithms'', introduced by John Holland are also for optimizing parameters in hard coded functions. Where the parameters are binary coded instead of floating point numbers. Genetic operations in Kandid can be better understand as 'Evolution Strategy'. But this abstract dispute.


=== Mutation ===
=== Mutation ===
Line 178: Line 177:


=== Crossing over ===
=== Crossing over ===
Merging two genes is called crossing over. It is only used in sexual reproduction. Genetic algorithm can be implemented only with mutation operations. The advantage of crossing over is that the successor gene can take profit from both parent genes. Crossing over is a list operation. The new merged gene list is created by copying elements from both list step by step. At every step a random generator decides between continuing with the current list or changing to the other list as a source for the copying. This leads to multiple crossing over points per gene sequence.
Merging two genes is called crossing over. It is only used in sexual reproduction. Genetic algorithm can be implemented only with mutation operations. The advantage of crossing over is that the successor gene can take profit from both parent genes. Crossing over is a list operation. The new merged gene list is created by copying elements from both lists step by step. At every step a random generator decides between continuing with the current list or changing to the other list as a source for the copying. This leads to multiple crossing over points per gene sequence.
 


= Releases, translation and known bugs =  
= Releases, translation and known bugs =  
Line 210: Line 208:
=== v2: December 2009 ===
=== v2: December 2009 ===
* first public release
* first public release
[[Category:Activities]]