Thread: [jgap-users] keep population evolving
Brought to you by:
klausikm
From: Kurt W. <kur...@gm...> - 2014-07-20 23:23:37
|
I'm using jgap to evolve some solutions. If a solution has already been found, then I assign a really low fitness value because I want to find the maximum number of different "good" solutions. After several generations, all of the individuals in my population have the same configuration and they don't change, but they all have a low fitness score. I thought that the population would just keep randomly moving around if all of the individuals had a low fitness score, but they just seem to stay the same How should I prevent the population from becoming "locked" like this. For now, I think I will just kind of have my program manually change a chromosome to a random configuration if the lowest fitness value is assigned. I'm just curious if there are other solutions though. Thanks for any help and information you have to offer! Best, Kurt |
From: Laszlo I. <ill...@sa...> - 2014-07-22 13:50:51
|
Hi Kurt, This is a problem of the structure of your problem I think. To not lock in a solution You have to increase the mutation probability. But if do so, it came a time when You are in the random search situation. The genetic algorithm has to converge to a solution for all members, not if You are in genetic drift situation when two good solutions alternate and have similar structure and similar value of the fitness. Solutions are many. 0. Store the best solutions in a solution pool. (for all runs) 1. Start with a high mutation probability for 20-30 generations (depends on problem), let it be (20-40%) and decrease this probability after. 2. Start with a high mutation probability and change it over generations. I don't know if it is possible in jgap, I use it 5 years ago. Mutation explores the solution space. Crossover is the operator that makes the convergence of population. Regards Laszlo ----- Original Message ----- From: Kurt Whittemore <kur...@gm...> To: jga...@li... Sent: Mon, 21 Jul 2014 02:23:31 +0300 (EEST) Subject: [jgap-users] keep population evolving I'm using jgap to evolve some solutions. If a solution has already been found, then I assign a really low fitness value because I want to find the maximum number of different "good" solutions. After several generations, all of the individuals in my population have the same configuration and they don't change, but they all have a low fitness score. I thought that the population would just keep randomly moving around if all of the individuals had a low fitness score, but they just seem to stay the same How should I prevent the population from becoming "locked" like this. For now, I think I will just kind of have my program manually change a chromosome to a random configuration if the lowest fitness value is assigned. I'm just curious if there are other solutions though. Thanks for any help and information you have to offer! Best, Kurt |
From: Swen G. <swe...@gm...> - 2014-07-29 14:47:27
|
Hi Kurt, Laszlo's suggestion is working fine for me though it took some time to find the right balance between mutation rate and xover rate. I am using JGAP to generate GP program trees and I found a couple of issues with the xover in general which I fixed for my own solution. You can also experiment with different selectors which allows a better fitness of your overall gene pool depending on your problem. I normally go for a high mutation rate in the beginning and change it when the average over the whole pool of solutions has reached a certain fitness threshold. Then I increase xover ration instead of allowing the chromosomes to go unchanged into the new pool. Best, Swen On 22 July 2014 14:34, Laszlo Illyes <ill...@sa...> wrote: > Hi Kurt, > > This is a problem of the structure of your problem I think. > To not lock in a solution You have to increase the mutation probability. > But if do so, it came a time when You are in the random search situation. > The genetic algorithm has to converge to a solution for all members, not > if You are in genetic drift situation when two good solutions alternate and > have similar structure and similar value of the fitness. > > Solutions are many. > 0. Store the best solutions in a solution pool. (for all runs) > > 1. Start with a high mutation probability for 20-30 generations (depends > on problem), let it be (20-40%) and decrease this probability after. > 2. Start with a high mutation probability and change it over generations. > > I don't know if it is possible in jgap, I use it 5 years ago. > > Mutation explores the solution space. > Crossover is the operator that makes the convergence of population. > > Regards > > Laszlo > > > ----- Original Message ----- > From: Kurt Whittemore <kur...@gm...> > To: jga...@li... > Sent: Mon, 21 Jul 2014 02:23:31 +0300 (EEST) > Subject: [jgap-users] keep population evolving > > I'm using jgap to evolve some solutions. If a solution has already been > found, then I assign a really low fitness value because I want to find the > maximum number of different "good" solutions. After several generations, > all of the individuals in my population have the same configuration and > they don't change, but they all have a low fitness score. I thought that > the population would just keep randomly moving around if all of the > individuals had a low fitness score, but they just seem to stay the same > How should I prevent the population from becoming "locked" like this. > > For now, I think I will just kind of have my program manually change a > chromosome to a random configuration if the lowest fitness value is > assigned. I'm just curious if there are other solutions though. > > Thanks for any help and information you have to offer! > > Best, > Kurt > > > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > jgap-users mailing list > jga...@li... > https://lists.sourceforge.net/lists/listinfo/jgap-users > > |
From: GPMatias <ign...@gm...> - 2014-07-23 15:56:37
|
Hi Kurt, It does not matter if you give them a low fitness value really, If you want to explore the as much as you can the different solutions you should use weightroulette as natural selector to get diversity. And to avoid the population to be stuck in a local minimum or maximum you may want to add a mutation operator, that would do the trick ;). How is your configuration now?. Best regards, Matias. On Sun, Jul 20, 2014 at 8:23 PM, Kurt Whittemore <kur...@gm...> wrote: > I'm using jgap to evolve some solutions. If a solution has already been > found, then I assign a really low fitness value because I want to find the > maximum number of different "good" solutions. After several generations, > all of the individuals in my population have the same configuration and they > don't change, but they all have a low fitness score. I thought that the > population would just keep randomly moving around if all of the individuals > had a low fitness score, but they just seem to stay the same How should I > prevent the population from becoming "locked" like this. > > For now, I think I will just kind of have my program manually change a > chromosome to a random configuration if the lowest fitness value is > assigned. I'm just curious if there are other solutions though. > > Thanks for any help and information you have to offer! > > Best, > Kurt > > ------------------------------------------------------------------------------ > Want fast and easy access to all the code in your enterprise? Index and > search up to 200,000 lines of code with a free copy of Black Duck > Code Sight - the same software that powers the world's largest code > search on Ohloh, the Black Duck Open Hub! Try it now. > http://p.sf.net/sfu/bds > _______________________________________________ > jgap-users mailing list > jga...@li... > https://lists.sourceforge.net/lists/listinfo/jgap-users > |
From: Kurt W. <kur...@gm...> - 2014-07-23 16:03:48
|
Thanks for the information everyone. I may explore these ideas sometime in the future. For now though, what I tried suits my needs. For any individual that had been around for too many generations, I just basically killed it and randomly assigned the values of all of the genes. I'm getting the behavior I want now, and I found multiple solutions which match what I was looking for. Best, Kurt On Wed, Jul 23, 2014 at 8:55 AM, GPMatias <ign...@gm...> wrote: > Hi Kurt, It does not matter if you give them a low fitness value > really, If you want to explore the as much as you can the different > solutions you should use weightroulette as natural selector to get > diversity. And to avoid the population to be stuck in a local minimum > or maximum you may want to add a mutation operator, that would do the > trick ;). > > How is your configuration now?. > > Best regards, Matias. > > On Sun, Jul 20, 2014 at 8:23 PM, Kurt Whittemore > <kur...@gm...> wrote: > > I'm using jgap to evolve some solutions. If a solution has already been > > found, then I assign a really low fitness value because I want to find > the > > maximum number of different "good" solutions. After several generations, > > all of the individuals in my population have the same configuration and > they > > don't change, but they all have a low fitness score. I thought that the > > population would just keep randomly moving around if all of the > individuals > > had a low fitness score, but they just seem to stay the same How should > I > > prevent the population from becoming "locked" like this. > > > > For now, I think I will just kind of have my program manually change a > > chromosome to a random configuration if the lowest fitness value is > > assigned. I'm just curious if there are other solutions though. > > > > Thanks for any help and information you have to offer! > > > > Best, > > Kurt > > > > > ------------------------------------------------------------------------------ > > Want fast and easy access to all the code in your enterprise? Index and > > search up to 200,000 lines of code with a free copy of Black Duck > > Code Sight - the same software that powers the world's largest code > > search on Ohloh, the Black Duck Open Hub! Try it now. > > http://p.sf.net/sfu/bds > > _______________________________________________ > > jgap-users mailing list > > jga...@li... > > https://lists.sourceforge.net/lists/listinfo/jgap-users > > > |
From: He-chien T. <dep...@gm...> - 2014-07-23 16:14:38
|
These are what I did for that: 1. Add more functions and terminals 2. Tune mutation rate every several generations by how similar the fitness between individuals in the population. 3. Assign lower tuned fitness if there's already many individuals with similar raw fitness. I think measuring structure similarity of individuals is also possible but which costs more efforts. |