(genome, **args)
return (sister, brother)
The G1DList Uniform Crossover

   Each gene has a 50% chance of being swapped between mom and dad
The G1DList Uniform Crossover
The G1DList Uniform Crossover
def G1DListCrossoverUniform(genome, **args):
   """ The G1DList Uniform Crossover

   Each gene has a 50% chance of being swapped between mom and dad

   """
   sister = None
   brother = None
   gMom = args["mom"]
   gDad = args["dad"]

   sister = gMom.clone()
   brother = gDad.clone()
   sister.resetStats()
   brother.resetStats()

   for i in xrange(len(gMom)):
      if Util.randomFlipCoin(Consts.CDefG1DListCrossUniformProb):
         temp = sister[i]
         sister[i] = brother[i]
         brother[i] = temp

   return (sister, brother)
def G1DListCrossoverUniform ( genome , * * args ) : sister = None brother = None gMom = args [ "mom" ] gDad = args [ "dad" ] sister = gMom . clone ( ) brother = gDad . clone ( ) sister . resetStats ( ) brother . resetStats ( ) for i in xrange ( len ( gMom ) ) : if Util . randomFlipCoin ( Consts . CDefG1DListCrossUniformProb ) : temp = sister [ i ] sister [ i ] = brother [ i ] brother [ i ] = temp return ( sister , brother )