Quantcast

request for help in my search project with JGAP

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

request for help in my search project with JGAP

djanahana
Good morning 

I’am a student in a doctorial school and I’m preparing a paper this month (if GOD willing of course) 

I have a few questions if you don’t mind 

In my program I will 

1- Generate initial population and a defaultConfiguration //where my chromosomes is an array of CompositeGene ,each composite Gene is a list of IntegerGene  ,and I think this is OK 

2- Fix a CrossOver rate 

3- Choose  a random number V between(0,100) 

4- If (V<Crossover Rate) then  we not will apply  the crossover operator 
        Else we will apply the crossover 

How can we make that the crossover will not be in an iteration ??

      5-Fix the mutation rate 


*Choose a random number M between (0,100) 

6- If (M< Mutation Rate) then  we will not apply  the mutation operator 
        
        Else we will  apply the mutation (choose a random number of chromosomes to mutate, a random choice of chromosome,a random choice for the CompositeGene, a random choice of    Gene in  the CompositeGene that it was  choose  ) 

Can you please tell me how to do this ??is it the way of mutation in CompositeGene??? 

Am I need to specify my own operator, I took a look on the javadocs but I didn’t find a lot of information about mutation in the case of CompositeGene ??? 

I feel lost with Operate,doCrossover,applygeneticOperator,…… I really don’t know what’s the appropriate in my case  ???

As a selector I will use  “WeightedRouletteSelector “,when I made 

conf.addNaturalSelector(new WeightedRouletteSelector(conf), false); 

I apply this selector, that’s it??or I need an applyOperator???   


My last question is how to say that a chromosome will be one of the next generation ?is it automatically when we make 

For(int i=0;i<nbr_iteration;i++){Genotype.evolve();} 


sorry for my english ,i am trying to improuve my skills 

Best regards 

------------------------------------------------------------------------------
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: request for help in my search project with JGAP

Klaus Meffert-5
Amirat,
 
for making a custom crossover or mutation operator, you have to implement your own class for crossover (copy org.jgap.impl.CrossoverOperator to another class and modify it, then set it in your configuration; do the same for class org.jgap.impl.MutationOperator).
--> 1. remove all standard operators via conf.getGeneticOperators().clear()  (conf is an instance of class org.jgp.Configuration)
--> 2. add your custom operators by calling conf.addGeneticOperator(yourOperatorInstance) for your crossover and your mutation operator each.
 
Looking at the examples provided should help a lot in understanding how to configure JGAp appropriately (see package examples).
 
Best
 


From: Amirat Hanane [mailto:[hidden email]]
Sent: Monday, May 07, 2012 11:30 PM
To: [hidden email]
Subject: [jgap-users] request for help in my search project with JGAP

Good morning 

I’am a student in a doctorial school and I’m preparing a paper this month (if GOD willing of course) 

I have a few questions if you don’t mind 

In my program I will 

1- Generate initial population and a defaultConfiguration //where my chromosomes is an array of CompositeGene ,each composite Gene is a list of IntegerGene  ,and I think this is OK 

2- Fix a CrossOver rate 

3- Choose  a random number V between(0,100) 

4- If (V<Crossover Rate) then  we not will apply  the crossover operator 
        Else we will apply the crossover 

How can we make that the crossover will not be in an iteration ??

      5-Fix the mutation rate 


*Choose a random number M between (0,100) 

6- If (M< Mutation Rate) then  we will not apply  the mutation operator 
        
        Else we will  apply the mutation (choose a random number of chromosomes to mutate, a random choice of chromosome,a random choice for the CompositeGene, a random choice of    Gene in  the CompositeGene that it was  choose  ) 

Can you please tell me how to do this ??is it the way of mutation in CompositeGene??? 

Am I need to specify my own operator, I took a look on the javadocs but I didn’t find a lot of information about mutation in the case of CompositeGene ??? 

I feel lost with Operate,doCrossover,applygeneticOperator,…… I really don’t know what’s the appropriate in my case  ???

As a selector I will use  “WeightedRouletteSelector “,when I made 

conf.addNaturalSelector(new WeightedRouletteSelector(conf), false); 

I apply this selector, that’s it??or I need an applyOperator???   


My last question is how to say that a chromosome will be one of the next generation ?is it automatically when we make 

For(int i=0;i<nbr_iteration;i++){Genotype.evolve();} 


sorry for my english ,i am trying to improuve my skills 

Best regards 

------------------------------------------------------------------------------
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: request for help in my search project with JGAP

Mauricio Noda
Amirat,

V and M values are already embedded in the default mutation and crossover operators bundled with the framework, and are passed through constructors. Although the default operators don´t work very well with composite genes.

All chromosomes that are part of the genotype goes to the next iteration. If you don´t want some chromosomes to survive to the next iteration, they should be removed with natural selectors (i.e. those with low fitness values).

The evolution is a combination of genetic operators (increasing population) and natural selectors (decreasing population) being iterated over and over.



From: [hidden email]
To: [hidden email]; [hidden email]
Date: Tue, 8 May 2012 10:56:49 +0200
Subject: Re: [jgap-users] request for help in my search project with JGAP

Amirat,
 
for making a custom crossover or mutation operator, you have to implement your own class for crossover (copy org.jgap.impl.CrossoverOperator to another class and modify it, then set it in your configuration; do the same for class org.jgap.impl.MutationOperator).
--> 1. remove all standard operators via conf.getGeneticOperators().clear()  (conf is an instance of class org.jgp.Configuration)
--> 2. add your custom operators by calling conf.addGeneticOperator(yourOperatorInstance) for your crossover and your mutation operator each.
 
Looking at the examples provided should help a lot in understanding how to configure JGAp appropriately (see package examples).
 
Best
 


From: Amirat Hanane [mailto:[hidden email]]
Sent: Monday, May 07, 2012 11:30 PM
To: [hidden email]
Subject: [jgap-users] request for help in my search project with JGAP

Good morning 

I’am a student in a doctorial school and I’m preparing a paper this month (if GOD willing of course) 

I have a few questions if you don’t mind 

In my program I will 

1- Generate initial population and a defaultConfiguration //where my chromosomes is an array of CompositeGene ,each composite Gene is a list of IntegerGene  ,and I think this is OK 

2- Fix a CrossOver rate 

3- Choose  a random number V between(0,100) 

4- If (V<Crossover Rate) then  we not will apply  the crossover operator 
        Else we will apply the crossover 

How can we make that the crossover will not be in an iteration ??

      5-Fix the mutation rate 


*Choose a random number M between (0,100) 

6- If (M< Mutation Rate) then  we will not apply  the mutation operator 
        
        Else we will  apply the mutation (choose a random number of chromosomes to mutate, a random choice of chromosome,a random choice for the CompositeGene, a random choice of    Gene in  the CompositeGene that it was  choose  ) 

Can you please tell me how to do this ??is it the way of mutation in CompositeGene??? 

Am I need to specify my own operator, I took a look on the javadocs but I didn’t find a lot of information about mutation in the case of CompositeGene ??? 

I feel lost with Operate,doCrossover,applygeneticOperator,…… I really don’t know what’s the appropriate in my case  ???

As a selector I will use  “WeightedRouletteSelector “,when I made 

conf.addNaturalSelector(new WeightedRouletteSelector(conf), false); 

I apply this selector, that’s it??or I need an applyOperator???   


My last question is how to say that a chromosome will be one of the next generation ?is it automatically when we make 

For(int i=0;i<nbr_iteration;i++){Genotype.evolve();} 


sorry for my english ,i am trying to improuve my skills 

Best regards 

------------------------------------------------------------------------------ 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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re : request for help in my search project with JGAP

djanahana
Good morning . I would like to thank you

So much for taking the time to answer meMr.klaus-meffert,Mr.Mauraucio  i will try to custom my operators .


I really hope that you help me to finish this project  ,
  
  i suppose to do the following :(psuedo code only )
 
                 public  NewCrossoverOperator(conf,CrossOverRate,randomV) throws InvalidConfigurationException {
                          if(randomV<rate) {
                                            we do the function of crossover (a new function  for a composite Gene) 
                                                    }

                          
                          }

and when i call this operator in the main class i do 

                                   conf.getGeneticOperators().clear()
                                   NewGeneticOperator op = new NewCrossoverOperator(conf);
                                   conf.addGeneticOperator(op);//that 's it ??


for (int i = 0; i < MAX_ALLOWED_EVOLUTIONS; i++) 
{
  population.evolve();
}

1-Am I need to do      population.applyGeneticOperators();  or the "Operate methode to invoke the operatots i made"..??or they will be called and applied just when i add them to the conf with    conf.addGeneticOperator(op);

2-Concerning the selector ,the same thing :if i add it the conf is that means that it will be applied automateclly  

3-Can you please tell me the order of appling the operators ,i read that they will be apllied in order we add them to the conf ,is it true or i miss undestand some thing??

4-when i don't specify the list_of_condidate_chromosomes to the next generation,and i conf.setKeepPopulationSizeConstant(true);  and i just make 
                        for (int i = 0; i < MAX_ALLOWED_EVOLUTIONS; i++) 
                                {
                               population.evolve();
                                 }
it means that all the result of evolving the population will be the input of the crossover process 




Mr.Mauraucio:Can you please tell me where exactlly i can modify the M,V values (in my case ) ,you told me that they are embedded ?


Thanks once again

Best Regards
                  
Hanane AMIRAT

------------------------------------------------------------------------------
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...