Print

Print


Did you override the Gene.mutate method to mutate in some way appropriate to your problem?  By default all it does is randomize the gene (it calls reset(), which may be too extreme). Without any mutation, you're relying solely on crossover.

Are you sure you need GeneVectorIndividual?  You can't do your task with IntegerVectorIndividual, say?

Sean

On Feb 20, 2014, at 12:20 AM, Victor Miranda Gonçalves Jatobá <[log in to unmask]> wrote:

> Hello,
> 
> I'm working with a GA problem. For this I implemented the Gene and the 
> GeneVectorIndividual. I also had to override the crossover and mutation 
> methods. The weird of the algorithm behave is that if I set the mutation-prob 
> value different of zero my population don't evolve and the best individuals 
> present on the final chart pdf in each generation are very oscillate (see 
> Mutation.pdf attached). In the other way, if I put the mutation-prob to zero, 
> the population are evolve gradually, but this evolution is little and more stable, 
> because don't occurs mutation (see Crossover-Any.pdf attached). Anyone 
> know what is occurs and how do I fix it?
> It seems that after mutate process, the parents (fittest of the population) of 
> the clones are not put in the new Subpopulation then next generations never 
> evoluate.
> 
> My main params:
> 
> pop.subpop.0.species.crossover-prob = 0.25
> pop.subpop.0.species.crossover-type = any
> base.likelihood = 0.5
> pop.subpop.0.species.mutation-prob = 0.1
> pop.subpop.0.species.pipe = ec.vector.breed.VectorMutationPipeline
> pop.subpop.0.species.pipe.source.0 = ec.vector.breed.VectorCrossoverPipeline
> pop.subpop.0.species.pipe.source.0.source.0 = ec.select.TournamentSelection
> pop.subpop.0.species.pipe.source.0.source.1 = ec.select.TournamentSelection
> 
> select.tournament.size = 2
> 
> Best Regards,
> Victor jatob