Free cookie consent management tool by TermsFeed Policy Generator

Changeset 813 for trunk/sources


Ignore:
Timestamp:
11/24/08 22:43:05 (16 years ago)
Author:
gkronber
Message:

removed random child ordering because the order of children doesn't matter in the algorithm. #382

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP/Recombination/UniformCrossover.cs

    r807 r813  
    6868        IScope parent2 = scope.SubScopes[0];
    6969        scope.RemoveSubScope(parent2);
    70         IScope child0 = new Scope((i*2).ToString());
    71         IScope child1 = new Scope((i*2+1).ToString());
     70        IScope child0 = new Scope((i * 2).ToString());
     71        IScope child1 = new Scope((i * 2 + 1).ToString());
    7272        Cross(scope, random, gardener, parent1, parent2, child0, child1);
    7373        scope.AddSubScope(child0);
     
    159159        }
    160160      }
    161       if (random.NextDouble() < 0.5) {
    162         child0 = tree0;
    163         child1 = tree1;
    164       } else {
    165         child0 = tree1;
    166         child1 = tree0;
    167       }
     161      child0 = tree0;
     162      child1 = tree1;
    168163    }
    169164
Note: See TracChangeset for help on using the changeset viewer.