Re: On the Genetic Algorithm
- Posted by DB James <larch at adelphia.net> Sep 16, 2005
- 489 views
Michael Nelson wrote: > > --0-1942697918-1126739617=:63477 > Content-Type: text/plain; charset=iso-8859-1 > Content-Transfer-Encoding: 8bit > > > DB James <guest at RapidEuphoria.com> wrote: > > <snip> > I thought some of you might be interested in my recent investigations on the > genetic algorithm. > </snip> > > > I find this fascinating. Some ideas for improvements spring to mind > immediately: > > 1. Number of steps should be quantified as part of fitness--in the "real > world", a > 95% correct answer in 5 steps is extremely often more successful than a 100% > correct > answer in 100 steps. > > 2. Even the fittest individual will eventually die and even the least fit > individual > may live for a while. > > 3. Not every very fit individual reproduces, some very unfit individuals do. > > 4. Probability of survival and reproduction are however reasonably > proportionate to > fitness. > > > A rough suggestion for using these ideas: > > 1. Calcalate fitness as (100% minus the fitness you are currently > calculating) divided > by the number of steps. > > 2. Normalize these results so that the fittest individual has a fitness of 99% > and > the least fit individual has a fitness of 1%, with other individuals with > proportionate > values in between. (A simple linear proportion could be used, but a standard > deviation > based measure is probably better though harder to code.) Pehaps 99% to 1% > isn't quite > right, perhaps 95% to 5% or somewhere in between would produce better > "evolution". > > 3. Now for each indivdual, calculate whether that individual dies or > reproduces based > on fitness. For example, an individual has 90% fitness. It has a 90% of > survival and > a 90% chance of reproduction. So we generate a random number 1 to 100 for > survival > and if the result is 1 to 90 it lives, if 91-100, it dies. If it lives, then > generate > another random number 1 to 100 for reproduction.... > > I would be quite interested in collaborating on this project. > <Snip html stuff> Hi Michael, Over time, I have looked at, and made a few, techniques to have a smoother, faster, surer evolution toward a goal. It is an interesting and worthwhile thing to do because it feels like a kind of investigation of life itself. However, I personally was not oriented that way when I wrote the GA Math program. There I wanted to cut to the chase and get the job done while making it clear that it is indeed evolution that is driving the creativity of the program. Your direction, now at least, seems more toward setting up a population where the latent possibilities that may be in the long run more effective than the temporarily successful would be allowed to persist in the population until their potential can be realized. I suspect a lot of life's genetic tricks are to do just that. As to collaboration, I think I would just slow you down if you have a good clear idea where you want to go. If you wish, when I get the GA Math program cleaned up, I can send it you you and you can do anything you like with it (or I might upload it to RDS). In fact, all you may want are the structures and constants and maybe a few of the routines I used. Those can be easily modified to do other things. A last thought, doesn't it seem as if a good GA program would be able to er, evolve an optimized set of controls? --Quark