Free cookie consent management tool by TermsFeed Policy Generator

Changeset 16292


Ignore:
Timestamp:
11/12/18 11:38:52 (6 years ago)
Author:
bburlacu
Message:

#2962: Update the population with crossover children.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/HeuristicLab.Tests/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4/SubtreeCrossoverTest.cs

    r15583 r16292  
    4646          SubroutineCreater.CreateSubroutine(random, trees[i], 100, 10, 3, 3);
    4747      }
     48      var children = new List<ISymbolicExpressionTree>(trees);
     49
    4850      Stopwatch stopwatch = new Stopwatch();
    4951      stopwatch.Start();
     
    5254          var par0 = (ISymbolicExpressionTree)trees.SampleRandom(random).Clone();
    5355          var par1 = (ISymbolicExpressionTree)trees.SampleRandom(random).Clone();
    54           SubtreeCrossover.Cross(random, par0, par1, 0.9, 100, 10);
     56          children[i] = SubtreeCrossover.Cross(random, par0, par1, 0.9, 100, 10);
    5557        }
     58        trees = children;
    5659      }
    5760      stopwatch.Stop();
Note: See TracChangeset for help on using the changeset viewer.