March 27, 2011
A little departure from the realm of coding in favour of the realm of fiction. I like Science Fiction. Really I do. It’s just that I don’t consider many things to be Science Fiction that are typically gathered under this banner. Star Wars isn’t SF, it’s cowboys, knights and wizards in space. Star Trek couldn’t possibly be more pathetic from a purely scientific point of view. Planet Of The Apes? Darwin would spin in his grave so quickly it would destabilize the orbit of the Earth (to loosely borrow from Douglas Adams). Independence Day. Fun? Sure. Science? Bollocks.
source: John Berkey
March 19, 2011
Colour is a tricky subject. From pretty much every angle you look at it. From a chemical point of view we get to deal mostly with pigments, which is to say how molecules (or rather, the electron clouds of molecules) interact with photons. It would be difficult enough to predict the result of mixing two pigments if you didn’t have to take chemical reactions into account. Chemical reactions due to pigments interacting, or due to pigments falling apart as a function of half-life or light or temperature or humidity.
From a physics point of view colour is usually approached from the photon-wave-length direction. Every photon has a wave-length and some of these wave-lengths translate into visible light. Lasers tend to emit light of only a single wavelength (mono chromatic), but most natural light sources emit a continuous range of wavelengths. It’s easy enough to predict the result when mixing two light sources of known wavelength and intensity, but there’s a difference between the harsh numeric wavelength approach and the soft human biological approach. Just because you know the exact mixture of wavelengths in a certain light beam doesn’t mean you know how that colour will be experienced by living creatures. The rods and cones in our eyes do not measure all wavelengths equally well. The following graph shows how, on average, human cones respond to photons of specific wave-lengths:
March 9, 2011
This is the second post on how to define your own Fitness Functions. In the first post we discussed how to combine Fitness variables with different units and ranges. Today we’ll talk about how we can write a Fitness Function that always points the solver in the right direction. I’ll use a simpler example this time, where all the Fitness Variables are of the same type as well as the same range.
March 7, 2011
Often the most difficult thing whilst setting up an Evolutionary Solver run is the definition of the Fitness Function. The sort of problem that is most suited for Evolutionary Solvers typically has a number (sometimes a very large number) of different variables that need to be solved. Sometimes these variables cooperate, in that improving one will also improve the other, sometimes they oppose and sometimes they are completely unconnected.
March 5, 2011
This is the sixth post in a series on Evolutionary Solvers.
All the mechanisms we have discussed so far (Selection, Coupling and Coalescence) are designed to improve the quality of solutions on a generation by generation basis. However all of them have a tendency to reduce the bio-diversity in a population. The only mechanism which can introduce diversity is mutation. Several types of mutation are available in the Galapagos core, though the nature of the implementation in Grasshopper at the moment restricts the possible mutation to only Point mutations.
March 5, 2011
This is the fifth post in a series on Evolutionary Solvers.
Once a mate has been selected from a population, offspring needs to be generated. On the genetic level this is anything but fun and games. The biological process of gene recombination is horrendously complicated and itself subject to evolution (meiotic drive for example, where genes evolve to affect the random process of meiosis and thus improve their chances of ending up in offspring). The digital variant is much simpler. This is partially because genes in evolutionary algorithms are not very similar to biological genes. Ironically, biological genes are far more digital than programmatic genes. As Mendel discovered in the 1860’s, genes are not continuously variable qualities. Instead they behave like on-off switches. Genes in evolutionary solvers like Galapagos behave like floating point numbers, that can assume all the values between two numerical extremes. When Mendel crossed wrinkly and smooth peas, he ended up with specific frequencies of each in the subsequent generations, but never with a pea that was somewhat wrinkly and somewhat smooth. With Evolutionary Algorithms there’s no reason why we couldn’t interpolate genes this way.
March 4, 2011
This is the fourth post in a series on Evolutionary Solvers.
Coupling is the process of finding mates. Once a genome has been elected to mate by the active Selection Algorithm, it has to pick a mate from the population to complete the act. There are of course many ways in which mate selection could occur, but Galapagos at the moment only allows one; selection by genomic distance. In order to explain this in detail, I should first tell you how a Genome Map works. This
is a Genome Map. It displays all the genomes (individuals) in a certain population as dots on a grid. The distance between two genomes on the grid is roughly analogous with the distance between the genomes in gene-space. I say roughly because it is in fact impossible to draw a map with exact distances. A single genome is defined by a number of genes. We assume that all the genomes in a species have the same number of genes (this is not technically a limitation of Evolutionary Algorithms, even though it is currently a limitation of Galapagos). Therefore the distance between two genomes is an N-Dimensional value, where N equals the number of genes. It is not possible to accurately display an N-Dimensional point cloud on a 2-Dimensional screen so the Genome Map is only a coarse approximation. It also follows that the axes of this graph have no meaning whatsoever, the only information a Genome Map conveys is which genomes are more or less similar (close together) and which genomes are more or less different (far apart).