Opened 5 weeks ago

Last modified 4 days ago

#2962 readytorelease defect

Subtree crossover distribution test displays incorrect statistics

Reported by: bburlacu Owned by: mkommend
Priority: medium Milestone: HeuristicLab 3.3.16
Component: Encodings.SymbolicExpressionTreeEncoding Version:
Keywords: Cc:

Description

In the SubtreeCrossoverDistributionsTest, we have the following code which tests the effects of crossover:

for (int gCount = 0; gCount < generations; gCount++) {
  for (int i = 0; i < POPULATION_SIZE; i++) {
    var par0 = (ISymbolicExpressionTree)trees.SampleRandom(random).Clone(); // parents are cloned
    var par1 = (ISymbolicExpressionTree)trees.SampleRandom(random).Clone(); // parents are cloned
    SubtreeCrossover.Cross(random, par0, par1, 0.9, 100, 10); // population is never updated
  }
}

Since the parents are cloned and result of SubtreeCrossover.Cross is discarded and trees is never actually updated, the statistics displayed at the end do not reflect the effects of crossover, but just show the initial distribution returned by the tree creator.

Change History (3)

comment:1 Changed 5 weeks ago by bburlacu

  • Status changed from new to accepted

comment:2 Changed 5 weeks ago by bburlacu

  • Owner changed from bburlacu to mkommend
  • Status changed from accepted to reviewing

r16292: Update the population with crossover children.

comment:3 Changed 4 days ago by mkommend

  • Status changed from reviewing to readytorelease
Note: See TracTickets for help on using tickets.