What is uniform crossover in genetic algorithm crossover operation?

  • Context: Comp Sci 
  • Thread starter Thread starter shivajikobardan
  • Start date Start date
  • Tags Tags
    Algorithm Uniform
Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
1 reply · 2K views
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).