How to create a specific initial population with JGAP?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to create a specific initial population with JGAP?

Johnny Rico

Hello again! I am beginning to understand a little more about JGAP operation.
But now I'm a bit stuck ...

I know how to create a random initial population using the "randomInitialGenotype."
But now I want the initial population was composed of specific chromosomes, i.e. by individuals with a particular set of specific genes. How can I do this?
I would appreciate if someone could help me!

     
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to create a specific initial population with JGAP?

Klaus Meffert-5
Johnny,

you have:
Genotype population = Genotype.randomInitialGenotype(conf);

Then:
Iterate over all chromosomes in the population
(population.getPopulation().getChromosomes()) and set each chromosome as
needed (population.getPopulation().setChromosome(int index, Ichromosome
chrom).
Or set all chromosomes at once:
population.getPopulation().setChromosomes(List<Ichromosome>)

Best

Klaus
www.klaus-meffert.com

 

> -----Original Message-----
> From: Johnny Rico [mailto:[hidden email]]
> Sent: Saturday, July 28, 2012 8:25 PM
> To: [hidden email]
> Subject: [jgap-users] How to create a specific initial
> population with JGAP?
>
>
> Hello again! I am beginning to understand a little more about
> JGAP operation.
> But now I'm a bit stuck ...
>
> I know how to create a random initial population using the
> "randomInitialGenotype."
> But now I want the initial population was composed of
> specific chromosomes, i.e. by individuals with a particular
> set of specific genes. How can I do this?
> I would appreciate if someone could help me!
>
>      
> --------------------------------------------------------------
> ----------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security
> and threat landscape has changed and how IT managers can
> respond. Discussions will include endpoint security, mobile
> security and the latest in malware threats.
> http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> jgap-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/jgap-users


------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and how IT managers can respond. Discussions
will include endpoint security, mobile security and the latest in malware
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
jgap-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/jgap-users
Loading...