Changeset 9835 for branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/Operators/SymbolicExpressionTreeGenealogyGraphBuilder.cs
- Timestamp:
- 08/01/13 13:01:40 (11 years ago)
- Location:
- branches/HeuristicLab.EvolutionaryTracking
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionaryTracking
- Property svn:ignore
-
old new 1 *.suo 2 _ReSharper.HeuristicLab.Tracking 1 _ReSharper.Sliding Window GP 3 2 bin
-
- Property svn:mergeinfo changed
/branches/Sliding Window GP (added) merged: 7820,7837,7845,7850,9047,9126,9145,9162-9165 -
Property
svn:global-ignores
set to
_ReSharper.HeuristicLab.Tracking
- Property svn:ignore
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/Operators/SymbolicExpressionTreeGenealogyGraphBuilder.cs
r9419 r9835 207 207 int generation = Generations.Value; 208 208 209 var pairs = 210 trees.Zip(qualities, (t, q) => new { Tree = t, Quality = q.Value }).OrderByDescending(x => x.Quality).ToList(); 209 var pairs = trees.Zip(qualities, (t, q) => new { Tree = t, Quality = q.Value }).OrderByDescending(x => x.Quality).ToList(); 211 210 212 211 if (generation == 0) { … … 245 244 Quality = Evaluate(p), 246 245 Rank = generation - 0.5 247 // an intermediate parent that would normal ebe 'invisible' to the evolutionary process246 // an intermediate parent that would normally be 'invisible' to the evolutionary process 248 247 } 249 248 ).ToList(); … … 262 261 // link elites from previous generation 263 262 var last = nodes[nodes.Count - 2]; 264 var arc = new Arc { Source = last, Target = node, Data = new Fragment (null)};263 var arc = new Arc { Source = last, Target = node, Data = new Fragment { Root = null } }; 265 264 last.AddForwardArc(arc); 266 265 node.AddReverseArc(arc); … … 268 267 continue; 269 268 } 269 270 270 var parents = GlobalTraceMap[tree].Cast<ISymbolicExpressionTree>().ToList(); 271 271 var fragment = GlobalFragmentMap[tree]; … … 286 286 // so it does not actually pass a subtree to the child, therefore the fragment is null 287 287 // so in case of crossover, we add a null fragment below 288 if (parents.Count > 1) node.InEdges[0].Data = new Fragment (null);288 if (parents.Count > 1) node.InEdges[0].Data = new Fragment { Root = null }; 289 289 } 290 290 … … 299 299 /// </summary> 300 300 /// <param name="tree">The symbolic expression tree to evaluate</param> 301 /// <returns>A double value representing the fitness</returns>301 /// <returns>A double value representing the individual quality</returns> 302 302 private double Evaluate(IItem tree) { 303 303 var subScope = new Scope();
Note: See TracChangeset
for help on using the changeset viewer.