Comp Sci What is uniform crossover in genetic algorithm crossover operation?

  • Thread starter Thread starter shivajikobardan
  • Start date Start date
  • Tags Tags
    Algorithm Uniform
Click For Summary
Uniform crossover in genetic algorithms involves randomly selecting genes from two parent genomes to create offspring, with each gene having an equal probability of being inherited from either parent. The process uses a pseudorandom number generator to determine which parent's gene is selected for each position in the offspring's genome. This method contrasts with single-point and double-point crossover techniques, which select contiguous segments of genes. The pseudocode provided illustrates that for each gene index, a random value is generated to decide the source of the gene for the offspring. Uniform crossover ensures genetic diversity by allowing a more varied combination of parental traits in the offspring.
shivajikobardan
Messages
637
Reaction score
54
Homework Statement
genetic algorithm
Relevant Equations
none
1644313134345.png

https://slidetodoc.com/genetic-algorithms-an-example-genetic-algorithm-procedure-ga/
slide is taken from here. is this done total randomly or is it done pseudorandomly. I mean is there some forumula for randomness used in this case?

i learned about single point and double point crossover but confused in this stuff.
 
Physics news on Phys.org
I don't think there is anything unclear here, but just to confirm the procedure is:

[code title=pseudocode]
for geneIndex in (0, genomeLength - 1):
if (random() < 0.5):
offspring1genome[geneIndex] = parent1genome[geneIndex]
offspring2genome[geneIndex] = parent2genome[geneIndex]
else:
offspring1genome[geneIndex] = parent2genome[geneIndex]
offspring2genome[geneIndex] = parent1genome[geneIndex]
[/code]

where random() is a (p)rng in [0, 1).
 
Thread 'Why wasn’t gravity included in the potential energy for this problem?'
I’m looking at the attached vibration problem. The solution in the manual includes the spring potential energy but does NOT include the gravitational potential energy of the hanging mass. Can someone explain why gravitational potential energy is not included when deriving the equation of motion? I tried asking ChatGPT but kept going in circles and couldn't figure out. Thanks!

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
7K
  • · Replies 2 ·
Replies
2
Views
4K
Replies
29
Views
5K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 7 ·
Replies
7
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 152 ·
6
Replies
152
Views
10K
  • · Replies 1 ·
Replies
1
Views
3K