Why is there no real use? I think it is VERY useful.
You write an algorithm which perfects one species, at the same time, produce another perfect species, through the evolution algorithm (process).
How do you program that?
At first this was a couple paragraphs but is now WAY to long on several topics. And is in two parts.
The summary is, you can program a system that would demonstrate macro and micro evolution to create distinct "species" of things in a simulation of varying complexity by emulating natural laws. There is a discussion on how mutation can add information in such a way that complexity can be created from simplicity. All of these discussions have nothing to do with biologic evolution, but evolution from a computer science standpoint which simulates concepts of Darwinian evolution.
Part One
---
---
The general use (note the word general) of genetic algorithms is to optimize a set of parameters (genes) to solve a given problem. In this it resembles a genetically isolated "kind" in a fixed environment. And works similarly to micro evolution and basic farming.
Farmers do this all the time to row better crops and animals and have for millennia.
For example, you want to optimize the mpg on a car. Your goal is to create the car with the best mpg at the lowest cost. You hope for it to have features x, y, z, and it must have features a, b, c. So you set up all the genes needed for resembling that situation. The engine might have 4/6/8/12 cylinders, it may use diesel or gasoline or ethanol, it may have a narrow or wider wheelbase, it may have a variable length, be made of plastic, steel, fibreglass, or carbon fibre.
Now there are a lot of different ways to initialize the different solutions to the car problem you want to test. One way is to simply create a number of solutions, with their parameters randomly assigned. Some cars will have 12 cylinders, some 4, some with a wide wheel base, some narrow, and so on, but you couldn't possibly have every possible car combination, so you might create 20 different cars.
All these different cars are tested via a function which would compute the weight of the car, simulate a wind tunnel, compute the cost of the vehicle from all of the different parts, the wanted feature set, and what the mpg most likely will be. It will score that "car" with a ranking compared to all the other random cars with random parts you created.
At this point, the selection process begin. Using principles of natural selection, two random cars will be selected, with an edge given toward those that have better ranking (more fit) than ones that have worse ranking. Some of their genes (parts) are swapped with each other. The car that was designed with a 12 cylinder engine may be swapped with one with a 4 cylinder engine, and exchange wheelbases as well while keeping all their remaining parts as they are. This produces two "children" cars that are a blend of their parents genetics (car parts). This is called exploitation, where children (new solutions) are created using their parent's good parts (genes) that have already been found to be components of better mpg ranked cars with slightly lower cost to build. It's exploiting knowledge (information) that it has and rearranging it and seeing if that makes an even better car. If this is all it did, you would only be able to combine your various cars and get the "best" solution based on the combination of which parameters happened to be initially set. To get some sort truly optimized solution you would need one instance of every type of parameter and their range of values, which would quickly consume all resources and mathematically take forever.
To facilitate this, the evolutionary idea of mutation is added. The genes of your candidate cars can alter away from what their parents gave them, and change the cars parts differently than any of the original values that had been initialized in the first place. This is the concept in GA of exploration, where it explores the possibilities of all different kind of values for all of its parts once in awhile. When two parents combine their genetics to create two new children, exploitation, you also apply a slight chance of it changing to something completely different, exploration, which may pick a random car part in a car and randomly alter it to something else. Maybe the two cars that ran on gasoline that combined, might end up with a child that mutates its fuel to be ethanol. Or maybe a numeric valued gene may change, such as a car's length may increase by 5 inches.
The genetic algorithm loops over and over with new generations of cars, swapping their genes and occasionally mutating a gene here and there to a totally different value.
This goes on until an acceptable solution is found that meets your criteria based on the new combinations being produced, a number of generations has occurred, or too much time has passed and you restart it with new initialized values, or some other criteria.
The art of programming genetic algorithms is finding the right balance between selection pressure and mutation. If you only choose from the few absolute best cars and don't exploit other information you've discovered, you'll end up with premature convergence (it's not naughty premature) where there is not enough car part variation to get beyond a threshold of change, and all the cars end up being identical to one another but never really achieving a really good optimal mpg. Genetic drift (the statistical distribution of a the car parts in the population of cars) will fixate on a solution that is not what could be the theoretically best possible car. You may have cars that never even try using a different fuel or are 34 feet long.
However, if you overly mutate your cars parts, you have an opposite problem. Your cars will generally get worse and worse or stagnate because the cars are changing too much for the selection process to exploit the new mutations to remove bad cars from the population. Even if a good car was created, it would end up being overly mutated away from that good car. The cars' engines, wheels, dimensions, and various genes are changing so much that they can't manage to ever get any good mpg.
If you looked at a graph of a well designed genetic algorithm, it will show a nice graceful curve showing the car getting incrementally better mpg until it gets to a point where its is as good as you can make it. If that's within your threshold of price and mpg, you could build a car based on those parameters, and assuming your function that ranks them is accurate, you would have an optimal car at low cost and high mpg.
The art of balancing exploration and exploitation that a programmer does also is similar to what sometimes appears in nature. Some bacteria, when in an environment that is toxic or inhospitable, will actually increase its chance of mutation as it attempts to find a genetic structure that allows it a better chance to survive (like antibiotic resistant strains). Reed frogs, if in an overwhelmingly female environment, have developed genetics so that a frog will spontaneously lose their female organs and create male organs to allow the survival of the population and allow more breeding possibilities.
You see exploitation and exploration of information all around us. As probably a bad example, music in the seventies started becoming more and more disco like, and because so many groups were exploiting each others music, a different kind of rock rose up and soon the environment was selecting out disco by burning their albums, sharkskin suits weren't selling..you get the idea. The environment changed but the music couldn't necessarily keep up. If bands had continued just playing that they would have mostly died out and not have been able to perform and survive.
The 80s mutated music and saw new wave come up and exploited it to dozens of bands that were electronic and general 80s weirdness, however what defined a good rock band became dime a dozen spandex hair bands that were basically clones of each other so that they started to die out when the environment changed. Then one day Northwest bands mutated a grunge sound and suddenly groups like Nirvana popped up and lots of aspects of culture changed, fashion, film style, and coffee shops on every block evolved as well from what the 80s looked like, to what the 90s looked like. One day grunge couldn't survive as flannel and depressing lyrics no longer were suitable and had boy bands and Disney pushing out teenage stripper singers appeared and those survived better in the changing environment. New ideas that benefit are exploited, "They sold HOW many albums? Quick! Get me five badly singing young men!", until some new mutation changes something that causes it to be selected more and more in a changing environment, until it stagnates, until a new mutation arises. Socially you see it in culture, art, governments, religions, style, languages are all based on something from the past that changed in some way. Sometimes a large change or a little change in the environment, or a change that no one notices to the "thing" occurs until it suddenly becomes relevant to the environment in a big way (look how fast the US went from a colonial territory to a world superpower in a scant couple hundred years based on world wars in the environment and aspects of government within itself).
Now genetic algorithms aren't like music or art or style or frogs or bacteria. A general GA is micro-evolution oriented. A GA optimizing a car for mpg isn't going to spontaneously decide to grow wings and start flying. Or connect up horses instead of an engine. It can optimize the parameters that have been specified by the intelligent designing programmer as being relevant.
Earlier I said that "general" genetic algorithms are used in a certain way to find optimal solutions to problems. However there's no rule that says they have to do it in any specific way. There are a lot of variation in genetic algorithms, and what you're really doing is managing the how and when of exploration and exploitation so that you can allow a good balance of improving its rank. The fitness "ranking" function, instead of comparing the best mpg for the least amount of money, is in essence just something that controls how long a set of genes might survive by measuring the success of the parameters. The more generations they survive, the more they contribute to the population, and the more the population may receive a beneficial improvement via exploration.
There was a question of how to design a program that might emulate macro evolution, as in, completely new things that didn't exist before becoming completely different things in the future that don't resemble what they were.