keep population evolving

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

keep population evolving

Kurt Whittemore
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|

Re: keep population evolving

Illyes Laszlo
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 <[hidden email]>
To: [hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|

Re: keep population evolving

GPMatias
In reply to this post by Kurt Whittemore
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
<[hidden email]> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jgap-users
>

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|

Re: keep population evolving

Kurt Whittemore
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 <[hidden email]> 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
<[hidden email]> 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
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jgap-users
>


------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|

Re: keep population evolving

He-chien Tsai
In reply to this post by Kurt Whittemore
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.

------------------------------------------------------------------------------
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|

Re: keep population evolving

Swen Gaudl
In reply to this post by Illyes Laszlo
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 <[hidden email]> 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 <[hidden email]>
To: [hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users



------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls.
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users