Advertisement

Interrelated genes

Started by January 13, 2005 06:16 AM
5 comments, last by DeepButi 19 years, 10 months ago
Coding my first attempt on Genetic AI, I would like some advice on: All I have read uses independent genes, but my code has (among others) a set of related genes. My bot can/must do a series of actions in any order, so I plan to use a gene for each action, order the values of the genes and perform the actions accordingly. Say I have 5 actions and the gene values are {12,3,0,6,9}, the bot will perform Action2 + Action1 + Action3 + Action4 + Action0. A mutation will increase/decrease a gene value by 4, so swapping two consecutive actions. Combinations (and mutations also) will let genes with duplicate values, so "new" genes will be decreased by 1 to avoid them. This will be done in a recursive way to be sure there are no duplicates. Does this make sense? Any other idea on how to deal with Actions to be ordered on a Genetic algorithm? Also ... wich is the "correct" number of members of a population? Related to number of genes? My fitness function requires 1min (and I would like to allow even 10minutes) for every member ... so, population size is important. Thanks in advance
_______________________The best conversation I had was over forty million years ago ... and that was with a coffee machine.
10min per individual per cycle is just..... HUGE.

I would say, that you should speed up the evaluation function, because otherwise your going to sit there until your 110 waiting for it to make some progress.

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Advertisement
Evolution is slow ... and I'm not in a hurry :)

Seriously, I cannot change fitness function time, I expect only small improvements from Genetic AI so to be sure of results I have to check intensively the bots playing a lot of games, and this is slow. Perhaps "bad" individuals could be detected faster, I will think about that.

Any thoughts on population size?

Is correct my related genes approach?

Thanks

[Edited by - DeepButi on January 15, 2005 3:54:27 AM]
_______________________The best conversation I had was over forty million years ago ... and that was with a coffee machine.
Let me put it this way:

Interrelated genes are more complex then normal genes, so, you need a bigger population. (it also makes it harder to get out of a local maxima, because a small change can cause a dramatic shift...)

math time.

You have a population of 100 (very very very very underpopulated, to the point of stupidity).

That would take 100min, or 1hr 40 minutes to finish.

Now, lets say you have maybe 200 generations (just enough to get you to a local maxima, which is enormously small compared to the global one).

that would take 200 * 100 minutes, or 20,000 minutes.
Thats 33 hours, 20 minutes.

Which is one day, nine hours, thirty eight minutes. (a day is 23hrs, 56minutes)

Which is a long time, because there would be little to no improvement during that time.

Now, lets say you have a population of 100K (which is more resonable), and let it run for 100K generations (which is probably how long it'd need, assuming that its not drop-dead-simple).

Then the time taken would be 100,000 * 100,000 * 10 minutes
Or 100,000,000,000 minutes

Thats 1,666,666,666 Hours, 40 minutes.
Thats 69,637,883 days, 12 hours.
Thats 190,655 Years, 3 days, 4 hours, 46 minutes, 12 seconds.
Thats one hundred ninty Meleniums 6 Centuries, five decades, five years, three days, four hours, fourty six minutes and twelve seconds.

Which happens to be a very very very long time.

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Quote: Original post by Nice Coder
Thats 190,655 Years, 3 days, 4 hours, 46 minutes, 12 seconds.
Thats one hundred ninty Meleniums 6 Centuries, five decades, five years, three days, four hours, fourty six minutes and twelve seconds.

Which happens to be a very very very long time.


You could evolve a something-sapiens in that period...
[size="2"]I like the Walrus best.
We could evolve a new planet in that piriod.

:)

Now just remember, those numbers are skimping, you could have as many as 1Million generations (or more), and populations on the order of tens of millions.

From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
Advertisement
OK, understood. Then probably Genetic approach is not a good way for my problem.

Thanks
_______________________The best conversation I had was over forty million years ago ... and that was with a coffee machine.

This topic is closed to new replies.

Advertisement