Click here to Skip to main content
15,887,135 members
Home / Discussions / Algorithms
   

Algorithms

 
AnswerRe: a special type of bin packing problem Pin
Patrice T22-Jul-15 8:10
mvePatrice T22-Jul-15 8:10 
GeneralRe: a special type of bin packing problem Pin
Member 1179127122-Jul-15 8:25
Member 1179127122-Jul-15 8:25 
GeneralRe: a special type of bin packing problem Pin
Cenator22-Jul-15 18:53
Cenator22-Jul-15 18:53 
GeneralRe: a special type of bin packing problem Pin
Patrice T22-Jul-15 20:21
mvePatrice T22-Jul-15 20:21 
GeneralRe: a special type of bin packing problem Pin
Patrice T22-Jul-15 22:10
mvePatrice T22-Jul-15 22:10 
GeneralRe: a special type of bin packing problem Pin
Cenator22-Jul-15 22:17
Cenator22-Jul-15 22:17 
GeneralRe: a special type of bin packing problem Pin
Patrice T23-Jul-15 5:07
mvePatrice T23-Jul-15 5:07 
QuestionGA/GEP Mutation Rates Pin
Dominick Marciano17-Jul-15 11:25
professionalDominick Marciano17-Jul-15 11:25 
I wasn't sure if this forum was the best one for this question, so I apologize in advance if it isn't.

I'm currently learned Gene Expression Programming and I'm a little unclear as to how the mutation rate is applied to a population. I've looked at source code from different implementations and I've seen it used different ways and would like to know if there is actually a proper way to implement it or if it can be implement at the programmers discretion.

As an example, say there are 10 chromosomes, each with 2 genes, and each gene has 10 nodes and the mutation rate (mr) is 0.1. I've seen code that mutates nodes implemented in these way:


  1. Loop through each chromosome and generate a random number (rn) between 0 - 1 on each loop. If the rn <= mr then select the gene for mutation. Then loop through every node of the chromosome, ignoring gene boundaries (so in this example there are 20 nodes = 10 nodes/gene * 2 genes) and generate another rn and if the rn <= mr, mutate the node.

  2. Loop through each chromosome and generate a random number (rn) between 0 - 1 on each loop. If the rn <= mr then select the gene for mutation. Then loop through each gene, again generating a rn on each loop, and if the rn <= mr select the gene for mutation, otherwise continue the loop. If the gene is selected for mutation, loop through each node of the selected gene (10 nodes since there are 10 nodes/gene), generating a rn on each loop and mutate the selected node if rn <= mr.

  3. Randomly select 10% of the nodes in the entire populate (in this case 20 nodes since there are 200 nodes = 10 chromosomes * 2 genes/chromosome * 10 nodes/gene).

  4. Randomly select 10% of the chromosomes (in this case 1 chromosome) and then select the nodes for mutation following the same procedure as Item 1 or Item 2 above, starting from the second loop.


I believe that either Item 1 or Item 2 would be the correct way to apply the mutation operator, but I haven't been able to find a definitive answer either through searches on Google/CP or in the book I have been reading.

One other thing that is mentioned in the book I am reading, but isn't explained in detail is the following: there is a population of 10 chromosomes, each with 1 gene, and a total length of 14 nodes. The book states that the mutation rate should be equivalent to two one-point mutations per chromosome, which in this case (because the chromosome's length is 14) should be 0.143. How was a mr of 0.143 derived from the chromosome length of 14? This isn't explained anywhere so far, even though this equivalence has been mentioned multiple times.

Any information, or links to answers, would be greatly appreciated. Thank you in advance for any help.
A black hole is where God tried to divide by zero.

There are 10 kinds of people in the world; those who understand binary and those who don't.

AnswerRe: GA/GEP Mutation Rates Pin
Alan Balkany30-Jul-15 7:19
Alan Balkany30-Jul-15 7:19 
QuestionC/C++ algorithm to reorganize and extract the data Pin
feifeihanyu10-Jul-15 4:22
feifeihanyu10-Jul-15 4:22 
SuggestionRe: C/C++ algorithm to reorganize and extract the data Pin
Richard MacCutchan10-Jul-15 4:47
mveRichard MacCutchan10-Jul-15 4:47 
GeneralRe: C/C++ algorithm to reorganize and extract the data Pin
feifeihanyu10-Jul-15 5:53
feifeihanyu10-Jul-15 5:53 
GeneralRe: C/C++ algorithm to reorganize and extract the data Pin
Member 1184955320-Jul-15 3:53
Member 1184955320-Jul-15 3:53 
GeneralRe: C/C++ algorithm to reorganize and extract the data Pin
Richard MacCutchan20-Jul-15 4:40
mveRichard MacCutchan20-Jul-15 4:40 
AnswerRe: C/C++ algorithm to reorganize and extract the data Pin
Supreme Master27-Jul-15 7:44
Supreme Master27-Jul-15 7:44 
GeneralRe: C/C++ algorithm to reorganize and extract the data Pin
Supreme Master27-Jul-15 8:52
Supreme Master27-Jul-15 8:52 
QuestionAlgorithm/Pseudo code help for swapping/comparing values Pin
Member 118111963-Jul-15 1:21
Member 118111963-Jul-15 1:21 
AnswerRe: Algorithm/Pseudo code help for swapping/comparing values Pin
Alan Balkany9-Jul-15 11:48
Alan Balkany9-Jul-15 11:48 
AnswerRe: Algorithm/Pseudo code help for swapping/comparing values PinPopular
Patrice T10-Jul-15 21:22
mvePatrice T10-Jul-15 21:22 
Generalto downvoter Pin
Patrice T1-Aug-15 12:47
mvePatrice T1-Aug-15 12:47 
GeneralRe: to downvoter Pin
Richard Deeming3-Aug-15 2:26
mveRichard Deeming3-Aug-15 2:26 
GeneralRe: to downvoter Pin
Patrice T3-Aug-15 10:31
mvePatrice T3-Aug-15 10:31 
QuestionMaybe Original Algorithm Created Pin
Rui__Silva25-Jun-15 5:24
professionalRui__Silva25-Jun-15 5:24 
AnswerRe: Maybe Original Algorithm Created Pin
Patrice T25-Jun-15 8:24
mvePatrice T25-Jun-15 8:24 
GeneralRe: Maybe Original Algorithm Created Pin
Rui__Silva26-Jun-15 0:55
professionalRui__Silva26-Jun-15 0:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.