Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
02/24/12 10:58:22 (12 years ago)
Author:
bburlacu
Message:

#1772: Merged latest trunk changes to SymbolicExpressionTreeEncoding. Deleted unneeded obj folder.

Location:
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding

  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4

    • Property svn:ignore set to
      bin
      obj
      HeuristicLabEncodingsSymbolicExpressionTreeEncodingPlugin.cs
      *.user
      *.vs10x
      Plugin.cs
  • branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/TracingSymbolicExpressionTreeCrossover.cs

    r7479 r7514  
    2727using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2828
    29 using TreeCacheType = HeuristicLab.Core.ItemList<HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTree>;
    30 using CloneMapType = HeuristicLab.Core.ItemDictionary<HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTree,
    31                                                       HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTree>;
    32 using TraceMapType = HeuristicLab.Core.ItemDictionary<HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTree,
    33                                                       HeuristicLab.Core.IItemArray<HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.ISymbolicExpressionTree>>;
     29using CloneMapType = HeuristicLab.Core.ItemDictionary<HeuristicLab.Core.IItem, HeuristicLab.Core.IItem>;
     30using TraceMapType = HeuristicLab.Core.ItemDictionary<HeuristicLab.Core.IItem, HeuristicLab.Core.IItemList<HeuristicLab.Core.IItem>>;
    3431
    3532namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
     
    8077      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(ParentsParameterName, "The parent symbolic expression trees which should be crossed."));
    8178      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(ChildParameterName, "The child symbolic expression tree resulting from the crossover."));
    82       Parameters.Add(new LookupParameter<ItemDictionary<ISymbolicExpressionTree, ISymbolicExpressionTree>>(GlobalCloneMapParameterName, "A global map keeping track of trees and their clones (made during selection)."));
    83       Parameters.Add(new LookupParameter<ItemDictionary<ISymbolicExpressionTree, IItemArray<ISymbolicExpressionTree>>>(GlobalTraceMapParameterName, "A global cache containing tracing info."));
     79      Parameters.Add(new LookupParameter<CloneMapType>(GlobalCloneMapParameterName, "A global map keeping track of trees and their clones (made during selection)."));
     80      Parameters.Add(new LookupParameter<TraceMapType>(GlobalTraceMapParameterName, "A global cache containing tracing info."));
    8481    }
    8582
     
    9188        var gScope = ExecutionContext.Scope;
    9289        while (gScope.Parent != null) gScope = gScope.Parent;
    93         gScope.Variables.Add(new Variable(GlobalTraceMapParameterName, new ItemDictionary<ISymbolicExpressionTree, IItemArray<ISymbolicExpressionTree>>()));
     90        gScope.Variables.Add(new Variable(GlobalTraceMapParameterName, new TraceMapType()));
    9491      }
    95       var originalParents = new ItemArray<ISymbolicExpressionTree>(Parents.Select(x => GlobalCloneMap[x]));
    96       // prevent incestuous crossover (an individual mating with itself)
    97       if (originalParents[0] == originalParents[1]) {
    98         Child = Parents[0];
    99         return base.Apply();
    100       }
     92      var originalParents = new ItemList<IItem>(Parents.Select(x => GlobalCloneMap[x]));
    10193      ISymbolicExpressionTree result = Cross(Random, Parents[0], Parents[1]);
    102 
    10394      Child = result;
    10495      GlobalTraceMap.Add(Child, originalParents);
Note: See TracChangeset for help on using the changeset viewer.