Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1335 for trunk/sources


Ignore:
Timestamp:
03/12/09 14:39:44 (16 years ago)
Author:
gkronber
Message:

Fixed hard-coded StandardGP implementations to work with new crossover architecture. #521 (Hard-coded GP implementations do not work with new crossover operator architecture)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/AlgorithmBase.cs

    r1287 r1335  
    3434using HeuristicLab.Data;
    3535using HeuristicLab.Operators.Programmable;
     36using HeuristicLab.Evolutionary;
    3637
    3738namespace HeuristicLab.GP.StructureIdentification {
     
    343344      selector.Name = "Selector (extr.)";
    344345      selector.GetVariableInfo("Operator").ActualName = "Selector";
     346
    345347      SequentialSubScopesProcessor seqScopesProc = new SequentialSubScopesProcessor();
    346348      EmptyOperator emptyOpt = new EmptyOperator();
    347349      SequentialProcessor selectedProc = new SequentialProcessor();
     350      ChildrenInitializer childInitializer = new ChildrenInitializer();
     351      ((IntData)childInitializer.GetVariable("ParentsPerChild").Value).Data = 2;
     352
    348353      OperatorExtractor crossover = new OperatorExtractor();
    349354      crossover.Name = "Crossover (extr.)";
     
    365370      Counter evalCounter = new Counter();
    366371      evalCounter.GetVariableInfo("Value").ActualName = "EvaluatedSolutions";
     372      SubScopesRemover parentRefRemover = new SubScopesRemover();
    367373
    368374      Sorter sorter = new Sorter();
     
    375381      seqScopesProc.AddSubOperator(emptyOpt);
    376382      seqScopesProc.AddSubOperator(selectedProc);
    377       selectedProc.AddSubOperator(crossover);
     383      selectedProc.AddSubOperator(childInitializer);
    378384      selectedProc.AddSubOperator(individualProc);
    379385      individualProc.AddSubOperator(individualSeqProc);
     386      individualSeqProc.AddSubOperator(crossover);
    380387      individualSeqProc.AddSubOperator(cond);
    381388      cond.AddSubOperator(manipulator);
     
    383390      individualSeqProc.AddSubOperator(validationEvaluator);
    384391      individualSeqProc.AddSubOperator(evalCounter);
     392      individualSeqProc.AddSubOperator(parentRefRemover);
    385393      selectedProc.AddSubOperator(sorter);
    386394
Note: See TracChangeset for help on using the changeset viewer.