Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Analyzers/BestAntTrailAnalyzer.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Analyzers/BestAntTrailAnalyzer.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Analyzers/BestAntTrailAnalyzer.cs	(revision 9285)
@@ -0,0 +1,104 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Linq;
+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.ArtificialAnt.Analyzers {
+  /// <summary>
+  /// An operator for analyzing the best ant trail of an artificial ant problem.
+  /// </summary>
+  [Item("BestAntTrailAnalyzer", "An operator for analyzing the best ant trail of an artificial ant problem.")]
+  [StorableClass]
+  public sealed class BestAntTrailAnalyzer : SingleSuccessorOperator, IAntTrailAnalyzer {
+    public bool EnabledByDefault {
+      get { return true; }
+    }
+
+    public ILookupParameter<BoolMatrix> WorldParameter {
+      get { return (ILookupParameter<BoolMatrix>)Parameters["World"]; }
+    }
+    public ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ScopeTreeLookupParameter<SymbolicExpressionTree>)Parameters["SymbolicExpressionTree"]; }
+    }
+    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public ILookupParameter<IntValue> MaxTimeStepsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["MaxTimeSteps"]; }
+    }
+    public ILookupParameter<AntTrail> BestSolutionParameter {
+      get { return (ILookupParameter<AntTrail>)Parameters["BestSolution"]; }
+    }
+    public ValueLookupParameter<ResultCollection> ResultsParameter {
+      get { return (ValueLookupParameter<ResultCollection>)Parameters["Results"]; }
+    }
+
+    public BestAntTrailAnalyzer()
+      : base() {
+      Parameters.Add(new LookupParameter<BoolMatrix>("World", "The world with food items for the artificial ant."));
+      Parameters.Add(new ScopeTreeLookupParameter<SymbolicExpressionTree>("SymbolicExpressionTree", "The artificial ant solutions from which the best solution should be visualized."));
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "The qualities of the artificial ant solutions which should be visualized."));
+      Parameters.Add(new LookupParameter<AntTrail>("BestSolution", "The visual representation of the best ant trail."));
+      Parameters.Add(new LookupParameter<IntValue>("MaxTimeSteps", "The maximal time steps that the artificial ant has available to collect all food items."));
+      Parameters.Add(new ValueLookupParameter<ResultCollection>("Results", "The result collection where the best artificial ant solution should be stored."));
+    }
+
+    [StorableConstructor]
+    private BestAntTrailAnalyzer(bool deserializing) : base(deserializing) { }
+    private BestAntTrailAnalyzer(BestAntTrailAnalyzer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BestAntTrailAnalyzer(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      ItemArray<SymbolicExpressionTree> expressions = SymbolicExpressionTreeParameter.ActualValue;
+      ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
+      BoolMatrix world = WorldParameter.ActualValue;
+      IntValue maxTimeSteps = MaxTimeStepsParameter.ActualValue;
+      ResultCollection results = ResultsParameter.ActualValue;
+
+      int i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => -x.Value).First().index;
+
+      AntTrail antTrail = BestSolutionParameter.ActualValue;
+      if (antTrail == null) {
+        var bestAntTrail = new AntTrail(world, expressions[i], maxTimeSteps);
+        BestSolutionParameter.ActualValue = bestAntTrail;
+        results.Add(new Result("Best Artificial Ant Solution", bestAntTrail));
+      } else {
+        antTrail.World = world;
+        antTrail.SymbolicExpressionTree = expressions[i];
+        antTrail.MaxTimeSteps = maxTimeSteps;
+        results["Best Artificial Ant Solution"].Value = antTrail;
+      }
+      return base.Apply();
+    }
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Analyzers/IAntTrailAnalyzer.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Analyzers/IAntTrailAnalyzer.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Analyzers/IAntTrailAnalyzer.cs	(revision 9285)
@@ -0,0 +1,35 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+
+namespace HeuristicLab.Problems.ArtificialAnt.Analyzers {
+  public interface IAntTrailAnalyzer : IAnalyzer {
+    ScopeTreeLookupParameter<DoubleValue> QualityParameter { get; }
+    ScopeTreeLookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter { get; }
+    ILookupParameter<BoolMatrix> WorldParameter { get; }
+    ILookupParameter<IntValue> MaxTimeStepsParameter { get; }
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/AntInterpreter.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/AntInterpreter.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/AntInterpreter.cs	(revision 9285)
@@ -0,0 +1,174 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Problems.ArtificialAnt.Symbols;
+
+namespace HeuristicLab.Problems.ArtificialAnt {
+  public class AntInterpreter {
+
+    public int MaxTimeSteps { get; set; }
+    public int FoodEaten { get; set; }
+    private BoolMatrix world;
+    public BoolMatrix World {
+      get { return world; }
+      set {
+        // create a clone of the world because the ant will remove the food items it can find.
+        world = (BoolMatrix)value.Clone();
+        CountFoodItems();
+      }
+    }
+
+    private SymbolicExpressionTree expression;
+    public SymbolicExpressionTree Expression {
+      get { return expression; }
+      set {
+        expression = value;
+      }
+    }
+
+    private SymbolicExpressionTreeNode FindMatchingFunction(string name) {
+      foreach (var defunBranch in expression.Root.Subtrees.OfType<DefunTreeNode>()) {
+        if (defunBranch.FunctionName == name) return defunBranch;
+      }
+      throw new ArgumentException("Function definition for " + name + " not found.");
+    }
+
+
+
+    public int ElapsedTime { get; set; }
+    private int currentDirection;
+    private int currentAntLocationRow;
+    private int currentAntLocationColumn;
+    private int nFoodItems;
+    private Stack<ISymbolicExpressionTreeNode> nodeStack = new Stack<ISymbolicExpressionTreeNode>();
+
+    private void CountFoodItems() {
+      nFoodItems = 0;
+      for (int i = 0; i < World.Rows; i++) {
+        for (int j = 0; j < World.Columns; j++) {
+          if (World[i, j]) nFoodItems++;
+        }
+      }
+    }
+
+    public void AntLocation(out int row, out int column) {
+      row = currentAntLocationRow;
+      column = currentAntLocationColumn;
+    }
+
+    public int AntDirection {
+      get { return currentDirection; }
+    }
+
+    public void Run() {
+      while (ElapsedTime < MaxTimeSteps && FoodEaten < nFoodItems) {
+        Step();
+      }
+    }
+
+    public void Step() {
+      // expression evaluated completly => start at root again
+      if (nodeStack.Count == 0) {
+        nodeStack.Push(Expression.Root.GetSubtree(0).GetSubtree(0));
+      }
+
+      var currentNode = nodeStack.Pop();
+      if (currentNode.Symbol is Left) {
+        currentDirection = (currentDirection + 3) % 4;
+        ElapsedTime++;
+      } else if (currentNode.Symbol is Right) {
+        currentDirection = (currentDirection + 1) % 4;
+        ElapsedTime++;
+      } else if (currentNode.Symbol is Move) {
+        MoveAntForward();
+        if (World[currentAntLocationRow, currentAntLocationColumn])
+          FoodEaten++;
+        World[currentAntLocationRow, currentAntLocationColumn] = false;
+        ElapsedTime++;
+      } else if (currentNode.Symbol is IfFoodAhead) {
+        int nextAntLocationRow;
+        int nextAntLocationColumn;
+        NextField(out nextAntLocationRow, out nextAntLocationColumn);
+        if (World[nextAntLocationRow, nextAntLocationColumn]) {
+          nodeStack.Push(currentNode.GetSubtree(0));
+        } else {
+          nodeStack.Push(currentNode.GetSubtree(1));
+        }
+      } else if (currentNode.Symbol is Prog2) {
+        nodeStack.Push(currentNode.GetSubtree(1));
+        nodeStack.Push(currentNode.GetSubtree(0));
+        return;
+      } else if (currentNode.Symbol is Prog3) {
+        nodeStack.Push(currentNode.GetSubtree(2));
+        nodeStack.Push(currentNode.GetSubtree(1));
+        nodeStack.Push(currentNode.GetSubtree(0));
+        return;
+      } else if (currentNode.Symbol is InvokeFunction) {
+        var invokeNode = currentNode as InvokeFunctionTreeNode;
+        var functionDefinition = (SymbolicExpressionTreeNode)FindMatchingFunction(invokeNode.Symbol.FunctionName).Clone();
+        var argumentCutPoints = (from node in functionDefinition.IterateNodesPrefix()
+                                 where node.Subtrees.Count() > 0
+                                 from subtree in node.Subtrees
+                                 where subtree is ArgumentTreeNode
+                                 select new { Parent = node, Argument = subtree.Symbol as Argument, ChildIndex = node.IndexOfSubtree(subtree) }).ToList();
+        foreach (var cutPoint in argumentCutPoints) {
+          cutPoint.Parent.RemoveSubtree(cutPoint.ChildIndex);
+          cutPoint.Parent.InsertSubtree(cutPoint.ChildIndex, (SymbolicExpressionTreeNode)invokeNode.GetSubtree(cutPoint.Argument.ArgumentIndex).Clone());
+        }
+        nodeStack.Push(functionDefinition.GetSubtree(0));
+      } else {
+        throw new InvalidOperationException(currentNode.Symbol.ToString());
+      }
+    }
+
+    private void MoveAntForward() {
+      NextField(out currentAntLocationRow, out currentAntLocationColumn);
+    }
+
+    private void NextField(out int nextAntLocationRow, out int nextAntLocationColumn) {
+      switch (currentDirection) {
+        case 0:
+          nextAntLocationColumn = (currentAntLocationColumn + 1) % World.Columns; // EAST
+          nextAntLocationRow = currentAntLocationRow;
+          break;
+        case 1:
+          nextAntLocationRow = (currentAntLocationRow + 1) % World.Rows; // SOUTH
+          nextAntLocationColumn = currentAntLocationColumn;
+          break;
+        case 2:
+          nextAntLocationColumn = (currentAntLocationColumn + World.Columns - 1) % World.Columns; // WEST
+          nextAntLocationRow = currentAntLocationRow;
+          break;
+        case 3:
+          nextAntLocationRow = (currentAntLocationRow + World.Rows - 1) % World.Rows; // NORTH
+          nextAntLocationColumn = currentAntLocationColumn;
+          break;
+        default:
+          throw new InvalidOperationException();
+      }
+    }
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/AntTrail.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/AntTrail.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/AntTrail.cs	(revision 9285)
@@ -0,0 +1,167 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 System.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.ArtificialAnt {
+  /// <summary>
+  /// Represents a trail of an artificial ant which can be visualized in the GUI.
+  /// </summary>
+  [Item("AntTrail", "Represents a trail of an artificial ant which can be visualized in the GUI.")]
+  [StorableClass]
+  public sealed class AntTrail : Item {
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Image; }
+    }
+    [Storable]
+    private SymbolicExpressionTree expression;
+    public SymbolicExpressionTree SymbolicExpressionTree {
+      get { return expression; }
+      set {
+        if (expression != value) {
+          //if (expression != null) DeregisterSymbolicExpressionTreeEvents();
+          expression = value;
+          //if (expression != null) RegisterSymbolicExpressionTreeEvents();
+          OnSymbolicExpressionTreeChanged();
+        }
+      }
+    }
+
+    [Storable]
+    private BoolMatrix world;
+    public BoolMatrix World {
+      get { return world; }
+      set {
+        if (world != value) {
+          if (world != null) DeregisterWorldEvents();
+          world = value;
+          if (world != null) RegisterWorldEvents();
+          OnWorldChanged();
+        }
+      }
+    }
+    [Storable]
+    private IntValue maxTimeSteps;
+    public IntValue MaxTimeSteps {
+      get { return maxTimeSteps; }
+      set {
+        if (maxTimeSteps != value) {
+          if (maxTimeSteps != value) {
+            if (maxTimeSteps != null) DeregisterMaxTimeStepsEvents();
+            maxTimeSteps = value;
+            if (maxTimeSteps != null) RegisterMaxTimeStepsEvents();
+            OnWorldChanged();
+          }
+        }
+      }
+    }
+
+    public AntTrail() : base() { }
+    public AntTrail(BoolMatrix world, SymbolicExpressionTree expression, IntValue maxTimeSteps)
+      : this() {
+      this.world = world;
+      this.expression = expression;
+      this.maxTimeSteps = maxTimeSteps;
+      Initialize();
+    }
+
+    [StorableConstructor]
+    private AntTrail(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      Initialize();
+    }
+    private AntTrail(AntTrail original, Cloner cloner)
+      : base(original, cloner) {
+      expression = cloner.Clone(original.expression);
+      world = cloner.Clone(original.world);
+      maxTimeSteps = cloner.Clone(original.maxTimeSteps);
+      Initialize();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new AntTrail(this, cloner);
+    }
+
+    private void Initialize() {
+      //if (expression != null) RegisterSymbolicExpressionTreeEvents();
+      if (world != null) RegisterWorldEvents();
+      if (maxTimeSteps != null) RegisterMaxTimeStepsEvents();
+    }
+
+    #region Events
+    public event EventHandler SymbolicExpressionTreeChanged;
+    private void OnSymbolicExpressionTreeChanged() {
+      var changed = SymbolicExpressionTreeChanged;
+      if (changed != null) changed(this, EventArgs.Empty);
+    }
+    public event EventHandler WorldChanged;
+    private void OnWorldChanged() {
+      var changed = WorldChanged;
+      if (changed != null) changed(this, EventArgs.Empty);
+    }
+    public event EventHandler MaxTimeStepsChanged;
+    private void OnMaxTimeStepsChanged() {
+      var changed = MaxTimeStepsChanged;
+      if (changed != null) changed(this, EventArgs.Empty);
+    }
+
+    //private void RegisterSymbolicExpressionTreeEvents() {
+    //  SymbolicExpressionTree.ItemChanged += new EventHandler<EventArgs<int>>(SymbolicExpressionTree_ItemChanged);
+    //  SymbolicExpressionTree.Reset += new EventHandler(SymbolicExpressionTree_Reset);
+    //}
+    //private void DeregisterSymbolicExpressionTreeEvents() {
+    //  SymbolicExpressionTree.ItemChanged -= new EventHandler<EventArgs<int>>(SymbolicExpressionTree_ItemChanged);
+    //  SymbolicExpressionTree.Reset -= new EventHandler(SymbolicExpressionTree_Reset);
+    //}
+
+    private void RegisterWorldEvents() {
+      World.ItemChanged += new EventHandler<EventArgs<int, int>>(World_ItemChanged);
+      World.Reset += new EventHandler(World_Reset);
+    }
+    private void DeregisterWorldEvents() {
+      World.ItemChanged -= new EventHandler<EventArgs<int, int>>(World_ItemChanged);
+      World.Reset -= new EventHandler(World_Reset);
+    }
+    private void RegisterMaxTimeStepsEvents() {
+      MaxTimeSteps.ValueChanged += new EventHandler(MaxTimeSteps_ValueChanged);
+    }
+    private void DeregisterMaxTimeStepsEvents() {
+      MaxTimeSteps.ValueChanged -= new EventHandler(MaxTimeSteps_ValueChanged);
+    }
+
+    void MaxTimeSteps_ValueChanged(object sender, EventArgs e) {
+      OnMaxTimeStepsChanged();
+    }
+    private void World_ItemChanged(object sender, EventArgs<int, int> e) {
+      OnWorldChanged();
+    }
+    private void World_Reset(object sender, EventArgs e) {
+      OnWorldChanged();
+    }
+    #endregion
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/ArtificialAntExpressionGrammar.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/ArtificialAntExpressionGrammar.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/ArtificialAntExpressionGrammar.cs	(revision 9285)
@@ -0,0 +1,75 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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;
+using HeuristicLab.Problems.ArtificialAnt.Symbols;
+namespace HeuristicLab.Problems.ArtificialAnt {
+  [StorableClass]
+  [Item(Name = "ArtificialAntExpressionGrammar", Description = "The default grammar for an artificial ant problem.")]
+  public class ArtificialAntExpressionGrammar : SymbolicExpressionGrammar {
+
+    public ArtificialAntExpressionGrammar()
+      : base(ItemAttribute.GetName(typeof(ArtificialAntExpressionGrammar)), ItemAttribute.GetDescription(typeof(ArtificialAntExpressionGrammar))) {
+      Initialize();
+    }
+    [StorableConstructor]
+    protected ArtificialAntExpressionGrammar(bool deserializing) : base(deserializing) { }
+    protected ArtificialAntExpressionGrammar(ArtificialAntExpressionGrammar original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ArtificialAntExpressionGrammar(this, cloner);
+    }
+
+    private void Initialize() {
+      var ifFoodAhead = new IfFoodAhead();
+      var prog2 = new Prog2();
+      var prog3 = new Prog3();
+      var move = new Move();
+      var left = new Left();
+      var right = new Right();
+      var allSymbols = new List<Symbol>() { ifFoodAhead, prog2, prog3, move, left, right };
+      var nonTerminalSymbols = new List<Symbol>() { ifFoodAhead, prog2, prog3 };
+
+      allSymbols.ForEach(s => AddSymbol(s));
+      SetSubtreeCount(ifFoodAhead, 2, 2);
+      SetSubtreeCount(prog2, 2, 2);
+      SetSubtreeCount(prog3, 3, 3);
+      SetSubtreeCount(move, 0, 0);
+      SetSubtreeCount(left, 0, 0);
+      SetSubtreeCount(right, 0, 0);
+
+      // each symbols is allowed as child of the start symbol
+      allSymbols.ForEach(s => AddAllowedChildSymbol(StartSymbol, s));
+      allSymbols.ForEach(s => AddAllowedChildSymbol(DefunSymbol, s));
+
+      // each symbol is allowed as child of all other symbols (except for terminals that have MaxSubtreeCount == 0
+      foreach (var parent in nonTerminalSymbols) {
+        foreach (var child in allSymbols) {
+          AddAllowedChildSymbol(parent, child);
+        }
+      }
+    }
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/ArtificialAntProblem.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/ArtificialAntProblem.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/ArtificialAntProblem.cs	(revision 9285)
@@ -0,0 +1,285 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.PluginInfrastructure;
+using HeuristicLab.Problems.ArtificialAnt.Analyzers;
+
+namespace HeuristicLab.Problems.ArtificialAnt {
+  [Item("Artificial Ant Problem", "Represents the Artificial Ant problem.")]
+  [Creatable("Problems")]
+  [StorableClass]
+  public sealed class ArtificialAntProblem : SingleObjectiveHeuristicOptimizationProblem<Evaluator, ISymbolicExpressionTreeCreator>, IStorableContent {
+    public string Filename { get; set; }
+
+    #region constant for default world (Santa Fe)
+    private readonly bool[,] santaFeAntTrail = new bool[,] {
+      {false, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, true, true, false, false, false, false}, 
+      {false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, true, false, false}, 
+      {false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, true, false, false}, 
+      {false, false, false, true, true, true, true, false, true, true, true, true, true, false, false, false, false, false, false, false, false, true, true, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, true, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, true, false, false, false, false, false, true, true, true, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, true, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false}, 
+      {false, false, false, true, true, false, false, true, true, true, true, true, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, true, false, false, false, false, false, false, true, true, true, true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, true, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false}, 
+      {false, false, true, true, true, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false },
+      {false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false, false }
+    };
+    #endregion
+
+    #region Parameter Properties
+    public IValueParameter<ISymbolicExpressionGrammar> ArtificialAntExpressionGrammarParameter {
+      get { return (IValueParameter<ISymbolicExpressionGrammar>)Parameters["ArtificialAntExpressionGrammar"]; }
+    }
+    public IValueParameter<IntValue> MaxExpressionLengthParameter {
+      get { return (IValueParameter<IntValue>)Parameters["MaximumExpressionLength"]; }
+    }
+    public IValueParameter<IntValue> MaxExpressionDepthParameter {
+      get { return (IValueParameter<IntValue>)Parameters["MaximumExpressionDepth"]; }
+    }
+    public IValueParameter<IntValue> MaxFunctionDefinitionsParameter {
+      get { return (IValueParameter<IntValue>)Parameters["MaximumFunctionDefinitions"]; }
+    }
+    public IValueParameter<IntValue> MaxFunctionArgumentsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaximumFunctionArguments"]; }
+    }
+    public IValueParameter<BoolMatrix> WorldParameter {
+      get { return (IValueParameter<BoolMatrix>)Parameters["World"]; }
+    }
+    public IValueParameter<IntValue> MaxTimeStepsParameter {
+      get { return (IValueParameter<IntValue>)Parameters["MaximumTimeSteps"]; }
+    }
+    #endregion
+
+    #region Properties
+    public BoolMatrix World {
+      get { return WorldParameter.Value; }
+      set { WorldParameter.Value = value; }
+    }
+    public IntValue MaxTimeSteps {
+      get { return MaxTimeStepsParameter.Value; }
+      set { MaxTimeStepsParameter.Value = value; }
+    }
+    public IntValue MaxExpressionLength {
+      get { return MaxExpressionLengthParameter.Value; }
+      set { MaxExpressionLengthParameter.Value = value; }
+    }
+    public IntValue MaxExpressionDepth {
+      get { return MaxExpressionDepthParameter.Value; }
+      set { MaxExpressionDepthParameter.Value = value; }
+    }
+    public IntValue MaxFunctionDefinitions {
+      get { return MaxFunctionDefinitionsParameter.Value; }
+      set { MaxFunctionDefinitionsParameter.Value = value; }
+    }
+    public IntValue MaxFunctionArguments {
+      get { return MaxFunctionArgumentsParameter.Value; }
+      set { MaxFunctionArgumentsParameter.Value = value; }
+    }
+    public ArtificialAntExpressionGrammar ArtificialAntExpressionGrammar {
+      get { return (ArtificialAntExpressionGrammar)ArtificialAntExpressionGrammarParameter.Value; }
+    }
+    public IEnumerable<IAntTrailAnalyzer> AntTrailAnalyzers {
+      get { return Operators.OfType<IAntTrailAnalyzer>(); }
+    }
+    #endregion
+
+    // BackwardsCompatibility3.3
+    #region Backwards compatible code, remove with 3.4
+    [Obsolete]
+    [Storable(Name = "operators")]
+    private IEnumerable<IOperator> oldOperators {
+      get { return null; }
+      set {
+        if (value != null && value.Any())
+          Operators.AddRange(value);
+      }
+    }
+    #endregion
+
+    [StorableConstructor]
+    private ArtificialAntProblem(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      RegisterEventHandlers();
+    }
+
+    private ArtificialAntProblem(ArtificialAntProblem original, Cloner cloner)
+      : base(original, cloner) {
+      RegisterEventHandlers();
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ArtificialAntProblem(this, cloner);
+    }
+    public ArtificialAntProblem()
+      : base(new Evaluator(), new ProbabilisticTreeCreator()) {
+      BoolMatrix world = new BoolMatrix(santaFeAntTrail);
+      Parameters.Add(new ValueParameter<IntValue>("MaximumExpressionLength", "Maximal length of the expression to control the artificial ant.", new IntValue(100)));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumExpressionDepth", "Maximal depth of the expression to control the artificial ant.", new IntValue(10)));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumFunctionDefinitions", "Maximal number of automatically defined functions in the expression to control the artificial ant.", new IntValue(3)));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumFunctionArguments", "Maximal number of arguments of automatically defined functions in the expression to control the artificial ant.", new IntValue(3)));
+      Parameters.Add(new ValueParameter<ISymbolicExpressionGrammar>("ArtificialAntExpressionGrammar", "The grammar that should be used for artificial ant expressions.", new ArtificialAntExpressionGrammar()));
+      Parameters.Add(new ValueParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items.", world));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumTimeSteps", "The number of time steps the artificial ant has available to collect all food items.", new IntValue(600)));
+
+      Maximization.Value = true;
+      MaximizationParameter.Hidden = true;
+      BestKnownQuality = new DoubleValue(89);
+      SolutionCreator.SymbolicExpressionTreeParameter.ActualName = "AntTrailSolution";
+      ((ProbabilisticTreeCreator)SolutionCreator).SymbolicExpressionTreeGrammarParameter.ActualName = "ArtificialAntExpressionGrammar";
+      Evaluator.QualityParameter.ActualName = "FoodEaten";
+      InitializeOperators();
+      RegisterEventHandlers();
+    }
+
+    #region Events
+    protected override void OnSolutionCreatorChanged() {
+      base.OnSolutionCreatorChanged();
+      SolutionCreator.SymbolicExpressionTreeParameter.ActualName = "AntTrailSolution";
+      var grammarBased = SolutionCreator as ISymbolicExpressionTreeGrammarBasedOperator;
+      if (grammarBased != null)
+        grammarBased.SymbolicExpressionTreeGrammarParameter.ActualName = "ArtificialAntExpressionGrammar";
+
+      SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged);
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+    protected override void OnEvaluatorChanged() {
+      base.OnEvaluatorChanged();
+      Evaluator.QualityParameter.ActualName = "FoodEaten";
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      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() {
+      SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged);
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      MaxFunctionArgumentsParameter.ValueChanged += new EventHandler(MaxFunctionArgumentsParameter_ValueChanged);
+      MaxFunctionArguments.ValueChanged += new EventHandler(MaxFunctionArgumentsParameter_ValueChanged);
+      MaxFunctionDefinitionsParameter.ValueChanged += new EventHandler(MaxFunctionDefinitionsParameter_ValueChanged);
+      MaxFunctionDefinitions.ValueChanged += new EventHandler(MaxFunctionDefinitionsParameter_ValueChanged);
+    }
+
+    private void MaxFunctionDefinitionsParameter_ValueChanged(object sender, EventArgs e) {
+      ArtificialAntExpressionGrammar.MaximumFunctionDefinitions = MaxFunctionDefinitions.Value;
+      ParameterizeOperators();
+      ParameterizeAnalyzers();
+    }
+    private void MaxFunctionArgumentsParameter_ValueChanged(object sender, EventArgs e) {
+      ArtificialAntExpressionGrammar.MaximumFunctionArguments = MaxFunctionArguments.Value;
+      ParameterizeOperators();
+      ParameterizeAnalyzers();
+    }
+
+    private void InitializeOperators() {
+      Operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>().OfType<IOperator>());
+      Operators.Add(new BestAntTrailAnalyzer());
+      Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer());
+      Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer());
+      ParameterizeAnalyzers();
+      ParameterizeOperators();
+    }
+
+    private void ParameterizeAnalyzers() {
+      foreach (IAntTrailAnalyzer analyzer in AntTrailAnalyzers) {
+        analyzer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+        analyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        analyzer.WorldParameter.ActualName = WorldParameter.Name;
+        analyzer.MaxTimeStepsParameter.ActualName = MaxTimeStepsParameter.Name;
+      }
+      foreach (ISymbolicExpressionTreeAnalyzer analyzer in Operators.OfType<ISymbolicExpressionTreeAnalyzer>()) {
+        analyzer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+    }
+
+    private void ParameterizeOperators() {
+      var operators = Parameters.OfType<IValueParameter>().Select(p => p.Value).OfType<IOperator>().Union(Operators);
+
+      foreach (ISymbolicExpressionTreeGrammarBasedOperator op in operators.OfType<ISymbolicExpressionTreeGrammarBasedOperator>()) {
+        op.SymbolicExpressionTreeGrammarParameter.ActualName = ArtificialAntExpressionGrammarParameter.Name;
+      }
+      foreach (ISymbolicExpressionTreeSizeConstraintOperator op in operators.OfType<ISymbolicExpressionTreeSizeConstraintOperator>()) {
+        op.MaximumSymbolicExpressionTreeDepthParameter.ActualName = MaxExpressionDepthParameter.Name;
+        op.MaximumSymbolicExpressionTreeLengthParameter.ActualName = MaxExpressionLengthParameter.Name;
+
+      }
+      foreach (Evaluator op in operators.OfType<Evaluator>()) {
+        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        op.MaxTimeStepsParameter.ActualName = MaxTimeStepsParameter.Name;
+        op.WorldParameter.ActualName = WorldParameter.Name;
+      }
+      foreach (ISymbolicExpressionTreeCrossover op in operators.OfType<ISymbolicExpressionTreeCrossover>()) {
+        op.ParentsParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        op.ChildParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (ISymbolicExpressionTreeManipulator op in operators.OfType<ISymbolicExpressionTreeManipulator>()) {
+        op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+      }
+      foreach (ISymbolicExpressionTreeArchitectureAlteringOperator op in operators.OfType<ISymbolicExpressionTreeArchitectureAlteringOperator>()) {
+        op.MaximumFunctionDefinitionsParameter.ActualName = MaxFunctionDefinitionsParameter.Name;
+        op.MaximumFunctionArgumentsParameter.ActualName = MaxFunctionArgumentsParameter.Name;
+      }
+    }
+    #endregion
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Evaluator.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Evaluator.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Evaluator.cs	(revision 9285)
@@ -0,0 +1,77 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.ArtificialAnt {
+  [Item("ArtificialAntEvaluator", "Evaluates an artificial ant solution.")]
+  [StorableClass]
+  public class Evaluator : SingleSuccessorOperator, ISingleObjectiveEvaluator {
+
+    public ILookupParameter<DoubleValue> QualityParameter {
+      get { return (ILookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+
+    public ILookupParameter<SymbolicExpressionTree> SymbolicExpressionTreeParameter {
+      get { return (ILookupParameter<SymbolicExpressionTree>)Parameters["SymbolicExpressionTree"]; }
+    }
+    public ILookupParameter<BoolMatrix> WorldParameter {
+      get { return (ILookupParameter<BoolMatrix>)Parameters["World"]; }
+    }
+    public ILookupParameter<IntValue> MaxTimeStepsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["MaxTimeSteps"]; }
+    }
+
+    [StorableConstructor]
+    protected Evaluator(bool deserializing) : base(deserializing) { }
+    protected Evaluator(Evaluator original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) { return new Evaluator(this, cloner); }
+    public Evaluator()
+      : base() {
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "The quality of the evaluated artificial ant solution."));
+      Parameters.Add(new LookupParameter<SymbolicExpressionTree>("SymbolicExpressionTree", "The artificial ant solution encoded as a symbolic expression tree that should be evaluated"));
+      Parameters.Add(new LookupParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items."));
+      Parameters.Add(new LookupParameter<IntValue>("MaxTimeSteps", "The maximal number of time steps that the artificial ant should be simulated."));
+    }
+
+    public sealed override IOperation Apply() {
+      SymbolicExpressionTree expression = SymbolicExpressionTreeParameter.ActualValue;
+      BoolMatrix world = WorldParameter.ActualValue;
+      IntValue maxTimeSteps = MaxTimeStepsParameter.ActualValue;
+
+      AntInterpreter interpreter = new AntInterpreter();
+      interpreter.MaxTimeSteps = maxTimeSteps.Value;
+      interpreter.World = world;
+      interpreter.Expression = expression;
+      interpreter.Run();
+
+      QualityParameter.ActualValue = new DoubleValue(interpreter.FoodEaten);
+      return null;
+    }
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/HeuristicLab.Problems.ArtificialAnt-3.4.csproj
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/HeuristicLab.Problems.ArtificialAnt-3.4.csproj	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/HeuristicLab.Problems.ArtificialAnt-3.4.csproj	(revision 9285)
@@ -0,0 +1,228 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{0C67A033-F6D9-4237-B3CA-C033A44706BE}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.ArtificialAnt</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.ArtificialAnt-3.4</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Xml.Linq">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data.DataSetExtensions">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Data" />
+    <Reference Include="System.Xml" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="Analyzers\BestAntTrailAnalyzer.cs" />
+    <Compile Include="Analyzers\IAntTrailAnalyzer.cs" />
+    <Compile Include="AntInterpreter.cs" />
+    <Compile Include="Evaluator.cs" />
+    <Compile Include="ArtificialAntExpressionGrammar.cs" />
+    <Compile Include="ArtificialAntProblem.cs" />
+    <Compile Include="AntTrail.cs" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="Symbols\IfFoodAhead.cs" />
+    <Compile Include="Symbols\Left.cs" />
+    <Compile Include="Symbols\Move.cs" />
+    <Compile Include="Symbols\Prog2.cs" />
+    <Compile Include="Symbols\Prog3.cs" />
+    <Compile Include="Symbols\Right.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
+      <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
+      <Name>HeuristicLab.Parameters-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+   <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
+<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+export ProjectDir=$(ProjectDir)
+export SolutionDir=$(SolutionDir)
+
+$SolutionDir/PreBuildEvent.sh
+</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Plugin.cs.frame
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Plugin.cs.frame	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Plugin.cs.frame	(revision 9285)
@@ -0,0 +1,42 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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 System.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.ArtificialAnt {
+  [Plugin("HeuristicLab.Problems.ArtificialAnt","Provides all necessary classes to solve the artificial ant problem.", "3.4.3.$WCREV$")]
+  [PluginFile("HeuristicLab.Problems.ArtificialAnt-3.4.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","3.4")]
+  [PluginDependency("HeuristicLab.Operators", "3.3")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  public class HeuristicLabProblemsArtificialAntPlugin : PluginBase {
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Properties/AssemblyInfo.cs.frame
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Properties/AssemblyInfo.cs.frame	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Properties/AssemblyInfo.cs.frame	(revision 9285)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Reflection;
+using System.Runtime.InteropServices;
+
+// General Information about an assembly is controlled through the following 
+// set of attributes. Change these attribute values to modify the information
+// associated with an assembly.
+[assembly: AssemblyTitle("HeuristicLab.Problems.ArtificialAnt")]
+[assembly: AssemblyDescription("Provides all necessary classes to solve the artificial ant problem.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2012 HEAL")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Setting ComVisible to false makes the types in this assembly not visible 
+// to COM components.  If you need to access a type in this assembly from 
+// COM, set the ComVisible attribute to true on that type.
+[assembly: ComVisible(false)]
+
+// The following GUID is for the ID of the typelib if this project is exposed to COM
+[assembly: Guid("74CF50B5-F690-42FC-AFB4-03E9F72D5226")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.4.0.0")]
+[assembly: AssemblyFileVersion("3.4.3.$WCREV$")]
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/IfFoodAhead.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/IfFoodAhead.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/IfFoodAhead.cs	(revision 9285)
@@ -0,0 +1,49 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
+  [StorableClass]
+  [Item("IfFoodAhead", "Represents the if-food-ahead symbol in a artificial ant expression.")]
+  public sealed class IfFoodAhead : Symbol {
+    private const int minimumArity = 2;
+    private const int maximumArity = 2;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private IfFoodAhead(bool deserializing) : base(deserializing) { }
+    private IfFoodAhead(IfFoodAhead original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new IfFoodAhead(this, cloner);
+    }
+
+    public IfFoodAhead() : base("IfFoodAhead", "Represents the if-food-ahead symbol in a artificial ant expression.") { }
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Left.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Left.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Left.cs	(revision 9285)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
+  [StorableClass]
+  [Item("Left", "Represents the turn-left symbol in a artificial ant expression.")]
+  public sealed class Left : Symbol {
+    private const int minimumArity = 0;
+    private const int maximumArity = 0;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Left(bool deserializing) : base(deserializing) { }
+    private Left(Left original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Left(this, cloner);
+    }
+    public Left() : base("Left", "Represents the turn-left symbol in a artificial ant expression.") { }
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Move.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Move.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Move.cs	(revision 9285)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
+  [StorableClass]
+  [Item("Move", "Represents the move-forward symbol in a artificial ant expression.")]
+  public sealed class Move : Symbol {
+    private const int minimumArity = 0;
+    private const int maximumArity = 0;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Move(bool deserializing) : base(deserializing) { }
+    private Move(Move original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Move(this, cloner);
+    }
+    public Move() : base("Move", "Represents the move-forward symbol in a artificial ant expression.") { }
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Prog2.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Prog2.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Prog2.cs	(revision 9285)
@@ -0,0 +1,49 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
+  [StorableClass]
+  [Item("Prog2", "Represents the sequence symbol with 2 sub-trees in a artificial ant expression.")]
+  public sealed class Prog2 : Symbol {
+    private const int minimumArity = 2;
+    private const int maximumArity = 2;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Prog2(bool deserializing) : base(deserializing) { }
+    private Prog2(Prog2 original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Prog2(this, cloner);
+    }
+    public Prog2() : base("Prog2", "Represents the sequence symbol with 2 sub-trees in a artificial ant expression.") { }
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Prog3.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Prog3.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Prog3.cs	(revision 9285)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
+  [StorableClass]
+  [Item("Prog3", "Represents the sequence symbol with 3 sub-trees in a artificial ant expression.")]
+  public sealed class Prog3 : Symbol {
+    private const int minimumArity = 3;
+    private const int maximumArity = 3;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Prog3(bool deserializing) : base(deserializing) { }
+    private Prog3(Prog3 original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Prog3(this, cloner);
+    }
+    public Prog3() : base("Prog3", "Represents the sequence symbol with 3 sub-trees in a artificial ant expression.") { }
+  }
+}
Index: /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Right.cs
===================================================================
--- /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Right.cs	(revision 9285)
+++ /branches/ImprovingStringConvertibleMatrix/HeuristicLab.Problems.ArtificialAnt/3.4/Symbols/Right.cs	(revision 9285)
@@ -0,0 +1,48 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2012 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.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+namespace HeuristicLab.Problems.ArtificialAnt.Symbols {
+  [StorableClass]
+  [Item("Right", "Represents the turn-right symbol in a artificial ant expression.")]
+  public sealed class Right : Symbol {
+    private const int minimumArity = 0;
+    private const int maximumArity = 0;
+
+    public override int MinimumArity {
+      get { return minimumArity; }
+    }
+    public override int MaximumArity {
+      get { return maximumArity; }
+    }
+
+    [StorableConstructor]
+    private Right(bool deserializing) : base(deserializing) { }
+    private Right(Right original, Cloner cloner) : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Right(this, cloner);
+    }
+    public Right() : base("Right", "Represents the turn-right symbol in a artificial ant expression.") { }
+  }
+}
