Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1065 for trunk


Ignore:
Timestamp:
12/25/08 13:21:37 (16 years ago)
Author:
gkronber
Message:

fixed #445 (StandardCrossover enters an infinite loop when trees are too large).

File:
1 edited

Legend:

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

    r835 r1065  
    6262        IList<IFunction> allowedFunctions = gardener.GetAllowedSubFunctions(parent0.Function, replacedChildIndex);
    6363        allowedCrossoverPoints = GetPossibleCrossoverPoints(gardener, tree1, maxInsertedBranchSize, maxInsertedBranchHeight, allowedFunctions);
    64       } while(allowedCrossoverPoints.Count == 0 || tries++ > MAX_RECOMBINATION_TRIES);
     64      } while(allowedCrossoverPoints.Count == 0 && tries++ < MAX_RECOMBINATION_TRIES);
    6565
    6666      if(allowedCrossoverPoints.Count > 0) {
Note: See TracChangeset for help on using the changeset viewer.