Index: /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeProblem.cs	(revision 12900)
+++ /trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/SymbolicExpressionTreeProblem.cs	(revision 12901)
@@ -22,5 +22,4 @@
 #endregion
 
-using System;
 using System.Linq;
 using HeuristicLab.Common;
@@ -51,20 +50,18 @@
     }
 
-    public abstract double Evaluate(ISymbolicExpressionTree tree, IRandom random);
+    public abstract double Evaluate(ISymbolicExpressionTree vector, IRandom random);
     public sealed override double Evaluate(Individual individual, IRandom random) {
       return Evaluate(individual.SymbolicExpressionTree(), random);
     }
 
-    public virtual void Analyze(ISymbolicExpressionTree[] trees, double[] qualities, ResultCollection results, IRandom random) {
-      var bestQuality = Maximization ? qualities.Max() : qualities.Min();
-      var bestIdx = Array.IndexOf(qualities, bestQuality);
-      var best = trees[bestIdx];
+    public override void Analyze(Individual[] individuals, double[] qualities, ResultCollection results, IRandom random) {
+      base.Analyze(individuals, qualities, results, random);
+      var orderedIndividuals = individuals.Zip(qualities, (i, q) => new { Individual = i, Quality = q }).OrderBy(z => z.Quality);
+      var best = Maximization ? orderedIndividuals.Last().Individual : orderedIndividuals.First().Individual;
+
       if (!results.ContainsKey("Best Solution")) {
         results.Add(new Result("Best Solution", typeof(ISymbolicExpressionTree)));
       }
-      results["Best Solution"].Value = (IItem)best.Clone();
-    }
-    public sealed override void Analyze(Individual[] individuals, double[] qualities, ResultCollection results, IRandom random) {
-      Analyze(individuals.Select(ind => ind.SymbolicExpressionTree()).ToArray(), qualities, results, random);
+      results["Best Solution"].Value = (IItem)best.SymbolicExpressionTree().Clone();
     }
   }
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.5/ArtificialAntProblem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.5/ArtificialAntProblem.cs	(revision 12900)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.5/ArtificialAntProblem.cs	(revision 12901)
@@ -22,5 +22,4 @@
 using System;
 using System.Diagnostics.Contracts;
-using System.Drawing.Text;
 using System.Linq;
 using HeuristicLab.Common;
@@ -28,8 +27,7 @@
 using HeuristicLab.Data;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using HeuristicLab.Optimization;
 using HeuristicLab.Parameters;
 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
-
+using HeuristicLab.Problems.ArtificialAnt.Analyzers;
 
 namespace HeuristicLab.Problems.ArtificialAnt {
@@ -116,4 +114,7 @@
       g.AddTerminalSymbols(new string[] { "Left", "Right", "Move" });
       base.Encoding = new SymbolicExpressionTreeEncoding(g, 20, 10);
+
+      InitializeOperators();
+      RegisterEventHandlers();
     }
 
@@ -123,16 +124,4 @@
       interpreter.Run();
       return interpreter.FoodEaten;
-    }
-
-    public override void Analyze(ISymbolicExpressionTree[] trees, double[] qualities, ResultCollection results, IRandom random) {
-      const string bestSolutionResultName = "Best Solution";
-      var bestQuality = Maximization ? qualities.Max() : qualities.Min();
-      var bestIdx = Array.IndexOf(qualities, bestQuality);
-
-      if (!results.ContainsKey(bestSolutionResultName)) {
-        results.Add(new Result(bestSolutionResultName, new AntTrail(World, trees[bestIdx], MaxTimeSteps.Value, qualities[bestIdx])));
-      } else if (((AntTrail)(results[bestSolutionResultName].Value)).Quality < qualities[bestIdx]) {
-        results[bestSolutionResultName].Value = new AntTrail(World, trees[bestIdx], MaxTimeSteps.Value, qualities[bestIdx]);
-      }
     }
 
@@ -142,4 +131,5 @@
     [StorableHook(HookType.AfterDeserialization)]
     private void AfterDeserialization() {
+      RegisterEventHandlers();
     }
 
@@ -147,4 +137,5 @@
     private ArtificialAntProblem(ArtificialAntProblem original, Cloner cloner)
       : base(original, cloner) {
+      RegisterEventHandlers();
     }
     public override IDeepCloneable Clone(Cloner cloner) {
@@ -152,5 +143,50 @@
     }
 
-    #region helpers
+    #region Events
+    protected override void OnSolutionCreatorChanged() {
+      base.OnSolutionCreatorChanged();
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+    private void SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+    #endregion
+
+    #region Helpers
+    private void RegisterEventHandlers() {
+      Encoding.SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged);
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+    }
+
+    private void InitializeOperators() {
+      Operators.Add(new BestAntTrailAnalyzer());
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    private void ParameterizeAnalyzers() {
+      foreach (var analyzer in Operators.OfType<BestAntTrailAnalyzer>()) {
+        analyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+        analyzer.SymbolicExpressionTreeParameter.ActualName = Encoding.SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        analyzer.WorldParameter.ActualName = WorldParameter.Name;
+        analyzer.MaxTimeStepsParameter.ActualName = MaxTimeStepsParameter.Name;
+      }
+    }
+
+    private void ParameterizeOperators() {
+      // no problem-specific operators to parameterize
+    }
+
     private bool[,] ToBoolMatrix(char[][] ch) {
       var rows = ch.Length;
Index: /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.5/HeuristicLab.Problems.ArtificialAnt-3.5.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.5/HeuristicLab.Problems.ArtificialAnt-3.5.csproj	(revision 12900)
+++ /trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.5/HeuristicLab.Problems.ArtificialAnt-3.5.csproj	(revision 12901)
@@ -106,4 +106,5 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Analyzers\BestAntTrailAnalyzer.cs" />
     <Compile Include="AntInterpreter.cs" />
     <Compile Include="ArtificialAntProblem.cs" />
Index: /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/BestSolutionAnalyzer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/BestSolutionAnalyzer.cs	(revision 12901)
+++ /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/BestSolutionAnalyzer.cs	(revision 12901)
@@ -0,0 +1,116 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.LawnMower {
+  [StorableClass]
+  [Item("Best Lawn Mower Solution Analyzer", "Analyzer that stores the best lawn mower solution.")]
+  public class BestSolutionAnalyzer : SingleSuccessorOperator, ISymbolicExpressionTreeAnalyzer {
+
+    private const string QualityParameterName = "Quality";
+    private const string SymbolicExpressionTreeParameterName = "LawnMowerProgram";
+    private const string LawnWidthParameterName = "LawnWidth";
+    private const string LawnLengthParameterName = "LawnLength";
+    private const string BestSolutionParameterName = "Best solution";
+    private const string ResultsParameterName = "Results";
+
+    public IScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+    public IScopeTreeLookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (IScopeTreeLookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }
+    }
+    public ILookupParameter<IntValue> LawnWidthParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[LawnWidthParameterName]; }
+    }
+    public ILookupParameter<IntValue> LawnLengthParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[LawnLengthParameterName]; }
+    }
+    public ILookupParameter<Solution> BestSolutionParameter {
+      get { return (ILookupParameter<Solution>)Parameters[BestSolutionParameterName]; }
+    }
+    public ILookupParameter<ResultCollection> ResultParameter {
+      get { return (ILookupParameter<ResultCollection>)Parameters[ResultsParameterName]; }
+    }
+
+    [StorableConstructor]
+    protected BestSolutionAnalyzer(bool deserializing) : base(deserializing) { }
+    protected BestSolutionAnalyzer(BestSolutionAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public BestSolutionAnalyzer() {
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(QualityParameterName, "The solution quality of the lawn mower program."));
+      Parameters.Add(new ScopeTreeLookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The lawn mower program to evaluate represented as symbolic expression tree."));
+      Parameters.Add(new LookupParameter<Solution>(BestSolutionParameterName, "The best lawn mower solution."));
+      Parameters.Add(new LookupParameter<IntValue>(LawnWidthParameterName, "The width of the lawn to mow."));
+      Parameters.Add(new LookupParameter<IntValue>(LawnLengthParameterName, "The length of the lawn to mow."));
+      Parameters.Add(new LookupParameter<ResultCollection>(ResultsParameterName, "The result collection of the algorithm."));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BestSolutionAnalyzer(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      var trees = SymbolicExpressionTreeParameter.ActualValue;
+      var qualities = QualityParameter.ActualValue;
+
+      // find max tree
+      double maxQuality = double.NegativeInfinity;
+      ISymbolicExpressionTree bestTree = null;
+      for (int i = 0; i < qualities.Length; i++) {
+        if (qualities[i].Value > maxQuality) {
+          maxQuality = qualities[i].Value;
+          bestTree = trees[i];
+        }
+      }
+      int length = LawnLengthParameter.ActualValue.Value;
+      int width = LawnWidthParameter.ActualValue.Value;
+      var bestSolution = new Solution(bestTree, length, width);
+      BestSolutionParameter.ActualValue = bestSolution;
+
+      var resultCollection = ResultParameter.ActualValue;
+      if (!resultCollection.ContainsKey(BestSolutionParameterName)) {
+        resultCollection.Add(new Result(BestSolutionParameterName, "The best lawn mower solution", bestSolution));
+      } else {
+        resultCollection[BestSolutionParameterName].Value = bestSolution;
+      }
+
+      return base.Apply();
+    }
+    public bool EnabledByDefault {
+      get { return true; }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Evaluator.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Evaluator.cs	(revision 12901)
+++ /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Evaluator.cs	(revision 12901)
@@ -0,0 +1,93 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.LawnMower {
+  [StorableClass]
+  [Item("Lawn Mower Evaluator", "Evaluator for the lawn mower demo GP problem.")]
+  public class Evaluator : InstrumentedOperator, ISingleObjectiveEvaluator {
+
+    private const string QualityParameterName = "Quality";
+    private const string LawnMowerProgramParameterName = "LawnMowerProgram";
+    private const string LawnWidthParameterName = "LawnWidth";
+    private const string LawnLengthParameterName = "LawnLength";
+
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters[QualityParameterName]; }
+    }
+    public ILookupParameter<ISymbolicExpressionTree> LawnMowerProgramParameter {
+      get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[LawnMowerProgramParameterName]; }
+    }
+    public ILookupParameter<IntValue> LawnWidthParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[LawnWidthParameterName]; }
+    }
+    public ILookupParameter<IntValue> LawnLengthParameter {
+      get { return (ILookupParameter<IntValue>)Parameters[LawnLengthParameterName]; }
+    }
+
+    [StorableConstructor]
+    protected Evaluator(bool deserializing) : base(deserializing) { }
+    protected Evaluator(Evaluator original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public Evaluator() {
+      Parameters.Add(new LookupParameter<DoubleValue>(QualityParameterName, "The solution quality of the lawn mower program."));
+      Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(LawnMowerProgramParameterName, "The lawn mower program to evaluate represented as symbolic expression tree."));
+      Parameters.Add(new LookupParameter<IntValue>(LawnWidthParameterName, "The width of the lawn to mow."));
+      Parameters.Add(new LookupParameter<IntValue>(LawnLengthParameterName, "The length of the lawn to mow."));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Evaluator(this, cloner);
+    }
+    public override IOperation InstrumentedApply() {
+      int length = LawnLengthParameter.ActualValue.Value;
+      int width = LawnWidthParameter.ActualValue.Value;
+      ISymbolicExpressionTree tree = LawnMowerProgramParameter.ActualValue;
+
+      bool[,] lawn = Interpreter.EvaluateLawnMowerProgram(length, width, tree);
+
+      // count number of squares that have been mowed
+      int numberOfMowedCells = 0;
+      for (int i = 0; i < length; i++)
+        for (int j = 0; j < width; j++)
+          if (lawn[i, j]) {
+            numberOfMowedCells++;
+          }
+
+      QualityParameter.ActualValue = new DoubleValue(numberOfMowedCells);
+      return base.InstrumentedApply();
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Grammar.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Grammar.cs	(revision 12901)
+++ /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Grammar.cs	(revision 12901)
@@ -0,0 +1,75 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Collections.Generic;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.LawnMower {
+  [StorableClass]
+  [Item("Lawn Mower Grammar", "The grammar for the lawn mower GP problem.")]
+  public sealed class Grammar : SymbolicExpressionGrammar {
+    [StorableConstructor]
+    private Grammar(bool deserializing) : base(deserializing) { }
+    private Grammar(Grammar original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public Grammar()
+      : base("Grammar", "Gammar for the lawn mower demo GP problem.") {
+      Initialize();
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Grammar(this, cloner);
+    }
+    private void Initialize() {
+      // create all symbols
+      var sum = new Sum();
+      var prog = new Prog();
+      var frog = new Frog();
+      var left = new Left();
+      var forward = new Forward();
+      var constant = new Constant();
+
+      var allSymbols = new List<ISymbol>() { sum, prog, frog, left, forward, constant };
+
+      // add all symbols to the grammar
+      foreach (var s in allSymbols)
+        AddSymbol(s);
+
+      // define grammar rules
+      foreach (var s in allSymbols) {
+        AddAllowedChildSymbol(sum, s);
+        AddAllowedChildSymbol(sum, s);
+        AddAllowedChildSymbol(prog, s);
+        AddAllowedChildSymbol(prog, s);
+        AddAllowedChildSymbol(frog, s);
+        AddAllowedChildSymbol(StartSymbol, s);
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Constant.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Constant.cs	(revision 12901)
+++ /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Constant.cs	(revision 12901)
@@ -0,0 +1,55 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.LawnMower {
+  [StorableClass]
+  public sealed class Constant : Symbol {
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+    [StorableConstructor]
+    private Constant(bool deserializing) : base(deserializing) { }
+    private Constant(Constant original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public Constant()
+      : base("Constant", "Vector of two random integers.") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    public override ISymbolicExpressionTreeNode CreateTreeNode() {
+      return new ConstantTreeNode();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Constant(this, cloner);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/ConstantTreeNode.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/ConstantTreeNode.cs	(revision 12901)
+++ /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/ConstantTreeNode.cs	(revision 12901)
@@ -0,0 +1,66 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.LawnMower {
+  [StorableClass]
+  public sealed class ConstantTreeNode : SymbolicExpressionTreeTerminalNode {
+    private Tuple<int, int> value;
+
+    public override bool HasLocalParameters {
+      get { return true; }
+    }
+
+    [Storable]
+    public Tuple<int, int> Value { get { return value; } private set { this.value = value; } }
+
+    [StorableConstructor]
+    private ConstantTreeNode(bool deserializing) : base(deserializing) { }
+    private ConstantTreeNode(ConstantTreeNode original, Cloner cloner)
+      : base(original, cloner) {
+      this.value = new Tuple<int, int>(original.value.Item1, original.value.Item2);
+    }
+
+    public ConstantTreeNode()
+      : base(new Constant()) {
+      value = Tuple.Create(0, 0);
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ConstantTreeNode(this, cloner);
+    }
+    public override void ResetLocalParameters(IRandom random) {
+      value = new Tuple<int, int>(random.Next(-20, 20), random.Next(-20, 20));
+    }
+    public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
+      int dX = (int)Math.Round(random.Next(-10, +10) * shakingFactor);
+      int dY = (int)Math.Round(random.Next(-10, +10) * shakingFactor);
+      value = new Tuple<int, int>(value.Item1 + dX, value.Item2 + dY);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Forward.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Forward.cs	(revision 12901)
+++ /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Forward.cs	(revision 12901)
@@ -0,0 +1,51 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.LawnMower {
+  [StorableClass]
+  public sealed class Forward : Symbol {
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+    [StorableConstructor]
+    private Forward(bool deserializing) : base(deserializing) { }
+    private Forward(Forward original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public Forward()
+      : base("Forward", "Moves the lawn mower one square forward.") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Forward(this, cloner);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Frog.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Frog.cs	(revision 12901)
+++ /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Frog.cs	(revision 12901)
@@ -0,0 +1,51 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.LawnMower {
+  [StorableClass]
+  public sealed class Frog : Symbol {
+    public override int MinimumArity {
+      get { return 1; }
+    }
+    public override int MaximumArity {
+      get { return 1; }
+    }
+    [StorableConstructor]
+    private Frog(bool deserializing) : base(deserializing) { }
+    private Frog(Frog original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public Frog()
+      : base("Frog", "Jumps to a relative position (determined by the argument).") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Frog(this, cloner);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Left.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Left.cs	(revision 12901)
+++ /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Left.cs	(revision 12901)
@@ -0,0 +1,53 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.LawnMower {
+  [StorableClass]
+  public sealed class Left : Symbol {
+
+    public override int MinimumArity {
+      get { return 0; }
+    }
+    public override int MaximumArity {
+      get { return 0; }
+    }
+
+    [StorableConstructor]
+    private Left(bool deserializing) : base(deserializing) { }
+    private Left(Left original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public Left()
+      : base("Left", "Turns the lawn mower to the left.") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Left(this, cloner);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Prog.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Prog.cs	(revision 12901)
+++ /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Prog.cs	(revision 12901)
@@ -0,0 +1,51 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.LawnMower {
+  [StorableClass]
+  public sealed class Prog : Symbol {
+    public override int MinimumArity {
+      get { return 2; }
+    }
+    public override int MaximumArity {
+      get { return 2; }
+    }
+    [StorableConstructor]
+    private Prog(bool deserializing) : base(deserializing) { }
+    private Prog(Prog original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public Prog()
+      : base("Prog", "Prog executes two branches sequentially and returns the result of the last branch.") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Prog(this, cloner);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Sum.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Sum.cs	(revision 12901)
+++ /trunk/sources/HeuristicLab.Problems.LawnMower/3.4/Symbols/Sum.cs	(revision 12901)
@@ -0,0 +1,51 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.LawnMower {
+  [StorableClass]
+  public sealed class Sum : Symbol {
+    public override int MinimumArity {
+      get { return 2; }
+    }
+    public override int MaximumArity {
+      get { return 2; }
+    }
+    [StorableConstructor]
+    private Sum(bool deserializing) : base(deserializing) { }
+    private Sum(Sum original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public Sum()
+      : base("Sum", "Sum of two integer vectors.") {
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Sum(this, cloner);
+    }
+  }
+}
