Free cookie consent management tool by TermsFeed Policy Generator

Opened 5 years ago

Closed 4 years ago

#2962 closed defect (done)

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:


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 (5)

comment:1 Changed 5 years ago by bburlacu

  • Status changed from new to accepted

comment:2 Changed 5 years 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 years ago by mkommend

  • Status changed from reviewing to readytorelease

comment:4 Changed 4 years ago by mkommend

r16429: Merged r16292 into stable.

comment:5 Changed 4 years ago by mkommend

  • Resolution set to done
  • Status changed from readytorelease to closed
Note: See TracTickets for help on using tickets.