Genetic algorithms only go so far
“Your results are only as good as the fitness function”
This is generally the difficulty in genetic algorithms. Evolution is a funny thing and capable of coming up with all kinds of wacky solutions to whatever problem is at hand. In a simulated environment where there is a distinct goal, you only want the wacky solutions that pertain to your problem at hand. The fitness function evalutating your gene pool must be very specific. Any loopholes in the fitness function can, and will, be exploited by the simulation. This is one of the greatest difficulties in working with genetic algorithms - creating a tight fitness function that drives evolution towards the solution that you want.
This makes for an interesting situation when your goal is to evolve intelligence. How do you create a fitness function for that? Thoughts on the subject after the jump.
Quantifying Intelligence
Intelligence is a lot of things but it is certainly not quantifiable by a fitness function. How do you define fitness in terms of intelligence? Is it the capability to collect objects? Is it language? Is it visual and spatial recognition? Or maybe it is social interactions and the creation of culture? Do I make a fitness function that evaluates the painting and oratory works of a simulated organism?
Clearly, a fitness function to evaluate intelligence is as complicated as intelligence itself. Intelligence is a complex survival skill that arises from the innumerable challenges present in our world. I can create a sandbox for organisms to live in but I cannot explicitly apply selective pressure to find intelligent organisms. I cannot create a function that gives organisms an arbitrary number representing their fitness. So what to do? Genetic algorithms require a fitness function to work.
As in the past, let evolution work it out. (Don’t worry, I can hear your sighs already)
Genetic algorithms select two parents, generally the more fit individuals from a population, and cross their genes to form a new offspring, a unique genetic variant. The new offspring is evalutated on how fit it is then thrown back into the genepool and the process is repeated. This works when you want to evolve a solution to a definable problem, like maximizing the gain on an antenna. But life is more complicated. Intelligence is as much a result of social phenomena as survival. For true intelligence to emerge, I believe I need to simulate true evolution. Genetic algorithms are the invention of computer scientists approximating life. Just as feedforward back-propogation neural networks are an approximation of the brain (and poor ones at that!), genetic algorithms attempt to quantify the big, complex world we live in.
Sandbox of Life
So lets toss genetic algorithms for the moment. Replace it with the real deal, a true evolutionary environment. What does this entail? Multiple organisms living in the same environment, interacting. Perhaps eating food in the environment, or eachother. Perhaps mating together or living in groups. My job is to create an adequate sandbox for the organisms to play in then turn them lose. For a true evolutionary simulation to work, I need three things:
- Multiple organism interaction - Multiple organisms must co-exist in one environment
- Health- the capability for organisms to live or die, depending on their ability to feed themselves and/or defend themselves form other organisms
- Reproduction - the capability for organisms to create offspring in a manner that produces unique genetic variation (sexual crossover, variation, etc)
Thats it! I promise! Simple on paper, very much more difficult in practice. Lets tackle the first one.
Multiple Organism Interaction
Classic genetic algorithms grab one organism and evaluate their fitness. This happens in a solitary environment with no interaction. Good for engineering problems, bad for intelligence. In DN, organisms will have to coexist in the same environment, capable of interacting with eachother. Organisms can bump into eachother or even eat eachother. It is as real of an environment as the one you are sitting in, except simplified and slightly more digital.
To interact with other organisms, its good to be able to differentiate between objects in your environment. I’m modifying the geneotypes of organisms to include “phenotypic traits”, values that do not directly influence the brain activity. These traits are completely superficial. They are “seen” by other organisms as raw data. How the organisms decide to use the data is up to them. Perhaps, over time, one phenotypic trait will be associated with a good mate. Or perhaps it will provide a distinction between different species. The ability to differentiate organisms based on their phenotypic traits is an important part of having multiple organisms living together in the same environment.
Health
As much as our society doesn’t like it, death is an important part of evolution. Death allows older generations to age and die, allowing younger genetic material to rule the environment. Death also allows competition. Animals in our world have evolved some crafty ways to keep from getting eaten! Distributed Neuron needs to have death. Organisms have a health counter that slowly ticks down to zero as the organism is alive. To keep on trucking, organisms will need to find a source of food. Food can be found as blobs floating around the environment or in the form of other organisms. The ability for one organism to eat another provides more selective pressure than a fitness function ever could. Successful organisms live, unsuccessful ones die. Simpler than a genetic algorithm and far more powerful.
Reproduction
And lastly, reproduction. Genetic algorithms attempt to guess what traits are important. Why guess when I can let the organisms decide for themselves? Successful organisms will find equally successful mates and mix their genetic code together to create (hopefully) more successful offspring. Those that are less fit will naturally die off due to competition. By giving the organisms a method to select their own mate, DN will take the power of genetic algorithms but ditch the requirement of writing an explicit fitness function.
This will take too long
By now you are probably thinking “Evolution takes a long time, this won’t work”. And to that I agree, somewhat. If I were to take random genotypes and start the simulation now, the chances of evolving an organism that can A) feed itself long enough to B) find a mate that has also spontaneously evolved the capability to reproduce and C) actually create offspring is microscopically small. It probably took millions of years before random chemical combinations created the first reproductive molecule. And it was most likely an asexual reproduction, cloning itself using molecules in the primordial goo of yesteryear.
I don’t have a million million years. Which is why I’m going to cheat a little.
While genetic algorithms won’t create intelligence, they can create organisms that are evolved for specific tasks. For instance, a genetic algorithm can evolve organisms that feed themselves. This is a simple, quantifiable task. Organisms that manage to find health blobs get a fitness score higher than those that don’t. I will use genetic algorithms to boostrap the process of evolution. First organisms will be evolved to find food. Once they are competent at feeding themselves, I can start putting selective pressure on those that can find and bump into other organisms (while still feeding themselves). After that, selective pressure can be placed on those that can create offspring (after bumping into other organisms, while still feeding themselves).
This will give me a genetic base that is capable of self-perpetuation. Because genetic algorithms are good at specific tasks like this, they should be able to quickly (relatively speaking) evolve solutions. At this point, genetic algorithms will be tossed aside and this self-perpetuation genetic base will be thrown into a real environment, left to fend for itself. There will no longer be any genetic algorithm deciding the fate of genotypes. There will only be the cold hand of natural evolution.
Sigh
Unfortunately for me, this is a lot more work. The simulator classes need to be modified to include multiple organisms at one time. Computation will take longer as there are more neural networks to process. Genotypes will be more complicated and the fundamentals of sexual crossover is no longer a simple function called at the end of trials. Despite this, I feel it is an important and nescessary step to be taken. I don’t see genetic algorithms evolving anything more complicated than a worm because intelligence is not quantifiable. True evolution is needed.