Design question

View: New views
3 Messages — Rating Filter:   Alert me  

Design question

by Luis Garcia-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
I am creating a GA that initially consisted of 4 genes. I was going to create my own genes because the structure of the gene consisted of 1 integer with a min and max and 3 doubles with a min and max as well. I realized that all I needed to create was a chromosome with 12 genes, 4 int and 12 double and should be the same... or at least that was my theory. Am I right in that assumption or should I still create my custom gene? Also, I saw that there exist a composite gene, which may be what I really need since it seems to behave just like a regular gene. Is that correct? Should I just compile a CompositeGene with my four int and doubles and that is it? If some one can give me some pointers in how to design it, it would be really nice. Maybe all three would work just fine! :))
Thanks!

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
jgap-users mailing list
jgap-users@...
https://lists.sourceforge.net/lists/listinfo/jgap-users

Re: Design question

by manolakis :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Luis,

It will be more helpful if you can briefly describe the problem that you want to solve.
Thanks
Emmanouil

Luis Garcia-5 wrote:
I am creating a GA that initially consisted of 4 genes. I was going to create my own genes because the structure of the gene consisted of 1 integer with a min and max and 3 doubles with a min and max as well. I realized that all I needed to create was a chromosome with 12 genes, 4 int and 12 double and should be the same... or at least that was my theory. Am I right in that assumption or should I still create my custom gene? Also, I saw that there exist a composite gene, which may be what I really need since it seems to behave just like a regular gene. Is that correct? Should I just compile a CompositeGene with my four int and doubles and that is it? If some one can give me some pointers in how to design it, it would be really nice. Maybe all three would work just fine! :))
Thanks!
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
jgap-users mailing list
jgap-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jgap-users

Parent Message unknown Re: Design question

by Luis Garcia-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Hi Emmanouil,
Thanks for your reply. Basically I want to test an individual with three genes. But the genes are a combination of values with one integer and three double values. So, I though I could solve it either by designing the gene myself, or using either one of these designs:
 
sampleGenes[1] = new DoubleGene(conf. 0, 1000 );
sampleGenes[2] = new DoubleGene(conf, 0, 1000 );
sampleGenes[3] = new DoubleGene(conf, 0, 1000 );
sampleGenes[4] = new IntegerGene(conf, 0, 21 );
sampleGenes[5] = new DoubleGene(conf. 0, 1000 );
sampleGenes[6] = new DoubleGene(conf, 0, 1000 );
sampleGenes[7] = new DoubleGene(conf, 0, 1000 );
 
sampleGenes[8] = new IntegerGene(conf, 0, 21 );
sampleGenes[9] = new DoubleGene(conf. 0, 1000 );
sampleGenes[10] = new DoubleGene(conf, 0, 1000 );
sampleGenes[11] = new DoubleGene(conf, 0, 1000 );

Chromosome sampleChromosome = new Chromosome(conf, sampleGenes );
 
Or this other one:
 
CompositeGene c1 = new CompositeGene(conf);
c1.addGene(new IntegerGene(conf, 0, 21));
c1.addGene(new DoubleGene(conf, 0, 1000));
c1.addGene(new DoubleGene(conf, 0, 1000)); 
c1.addGene(new DoubleGene(conf, 0, 1000));
CompositeGene c2 = new CompositeGene(conf);
 
c2.addGene(new IntegerGene(conf, 0, 21));
c2.addGene(new DoubleGene(conf, 0, 1000));
c2.addGene(new DoubleGene(conf, 0, 1000)); 
c2.addGene(new DoubleGene(conf, 0, 1000));
CompositeGene c3 = new CompositeGene(conf);
c3.addGene(new IntegerGene(conf, 0, 21));
c3.addGene(new DoubleGene(conf, 0, 1000));
c3.addGene(new DoubleGene(conf, 0, 1000)); 
c3.addGene(new DoubleGene(conf, 0, 1000));
 
 Gene[] sampleGenes = new Gene[] {c1, c2, c3 }
 
Chromosome sampleChromosome = new Chromosome(conf, sampleGenes );
 
This last one seems to be what I want. But I had never used this composite gene and did not know how it behaves; I already tried it and seems to be just like the other ones, so it may be my solution. The other question I had was would I get consistent results for both designs?
 
Thanks!
 


 
----- Original Message ----
From: manolakis <agnostos_7@...>
To: jgap-users@...
Sent: Saturday, June 21, 2008 11:00:36 AM
Subject: Re: [jgap-users] Design question


Luis,

It will be more helpful if you can briefly describe the problem that you
want to solve.
Thanks
Emmanouil


Luis Garcia-5 wrote:

>
> I am creating a GA that initially consisted of 4 genes. I was going to
> create my own genes because the structure of the gene consisted of
> 1 integer with a min and max and 3 doubles with a min and max as well. I
> realized that all I needed to create was a chromosome with 12 genes, 4 int
> and 12 double and should be the same... or at least that was my theory. Am
> I right in that assumption or should I still create my custom gene? Also,
> I saw that there exist a composite gene, which may be what I really need
> since it seems to behave just like a regular gene. Is that correct? Should
> I just compile a CompositeGene with my four int and doubles and that is
> it? If some one can give me some pointers in how to design it, it would be
> really nice. Maybe all three would work just fine! :))
> Thanks!
> -------------------------------------------------------------------------
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> jgap-users mailing list
> jgap-users@...
> https://lists.sourceforge.net/lists/listinfo/jgap-users
>
>

--
View this message in context: http://www.nabble.com/Design-question-tp18034816p18045597.html
Sent from the jgap-users mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
jgap-users mailing list
jgap-users@...
https://lists.sourceforge.net/lists/listinfo/jgap-users

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
jgap-users mailing list
jgap-users@...
https://lists.sourceforge.net/lists/listinfo/jgap-users