Index: trunk/sources/HeuristicLab 3.3.sln
===================================================================
--- trunk/sources/HeuristicLab 3.3.sln	(revision 3238)
+++ trunk/sources/HeuristicLab 3.3.sln	(revision 3239)
@@ -80,4 +80,5 @@
 		{BF7D9494-A586-457B-8DF9-ED599F9E6A71} = {BF7D9494-A586-457B-8DF9-ED599F9E6A71}
 		{DE12659F-87C4-48E6-B2E3-4E73DD95A540} = {DE12659F-87C4-48E6-B2E3-4E73DD95A540}
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F} = {30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}
 		{F5C0ECAC-EDBA-4024-872A-1F74AFCB20B4} = {F5C0ECAC-EDBA-4024-872A-1F74AFCB20B4}
 		{DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA} = {DBECB8B0-B166-4133-BAF1-ED67C3FD7FCA}
@@ -229,4 +230,6 @@
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.ArtificialAnt-3.3", "HeuristicLab.Problems.ArtificialAnt\3.3\HeuristicLab.Problems.ArtificialAnt-3.3.csproj", "{F5C0ECAC-EDBA-4024-872A-1F74AFCB20B4}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.ArtificialAnt.Views-3.3", "HeuristicLab.Problems.ArtificialAnt.Views\3.3\HeuristicLab.Problems.ArtificialAnt.Views-3.3.csproj", "{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}"
 EndProject
 Global
@@ -1282,4 +1285,19 @@
 		{F5C0ECAC-EDBA-4024-872A-1F74AFCB20B4}.Services|x64.ActiveCfg = Release|x64
 		{F5C0ECAC-EDBA-4024-872A-1F74AFCB20B4}.Services|x86.ActiveCfg = Release|x86
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Debug|x64.ActiveCfg = Debug|x64
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Debug|x64.Build.0 = Debug|x64
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Debug|x86.ActiveCfg = Debug|x86
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Debug|x86.Build.0 = Debug|x86
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Release|Any CPU.Build.0 = Release|Any CPU
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Release|x64.ActiveCfg = Release|x64
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Release|x64.Build.0 = Release|x64
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Release|x86.ActiveCfg = Release|x86
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Release|x86.Build.0 = Release|x86
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Services|Any CPU.ActiveCfg = Release|Any CPU
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Services|x64.ActiveCfg = Release|x64
+		{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}.Services|x86.ActiveCfg = Release|x86
 	EndGlobalSection
 	GlobalSection(SolutionProperties) = preSolution
Index: trunk/sources/HeuristicLab 3.3/Files.txt
===================================================================
--- trunk/sources/HeuristicLab 3.3/Files.txt	(revision 3238)
+++ trunk/sources/HeuristicLab 3.3/Files.txt	(revision 3239)
@@ -42,4 +42,5 @@
 HeuristicLab.PluginAdministrator\3.3:HeuristicLab.PluginAdministrator-3.3.dll
 HeuristicLab.Problems.ArtificialAnt\3.3:HeuristicLab.Problems.ArtificialAnt-3.3.dll
+HeuristicLab.Problems.ArtificialAnt.Views\3.3:HeuristicLab.Problems.ArtificialAnt.Views-3.3.dll
 HeuristicLab.Problems.Knapsack\3.3:HeuristicLab.Problems.Knapsack-3.3.dll
 HeuristicLab.Problems.Knapsack.Views\3.3:HeuristicLab.Problems.Knapsack.Views-3.3.dll
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs	(revision 3238)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Creators/ProbabilisticTreeCreator.cs	(revision 3239)
@@ -32,5 +32,4 @@
   [Item("ProbabilisticTreeCreator", "An operator that creates new symbolic expression trees with uniformly distributed size")]
   public class ProbabilisticTreeCreator : SymbolicExpressionTreeCreator {
-    private const int MAX_TRIES = 100;
     public ProbabilisticTreeCreator()
       : base() {
@@ -48,25 +47,11 @@
       int treeSize = random.Next(allowedMinSize, allowedMaxSize);
       SymbolicExpressionTree tree = new SymbolicExpressionTree();
-      int tries = 0;
       do {
         try {
-          tree.Root = PTC2(random, grammar, grammar.StartSymbol, treeSize+1, maxTreeHeight+1);
-          //// determine possible root symbols to create a tree of the target size
-          //var possibleRootSymbols = from symbol in grammar.AllowedSymbols(grammar.StartSymbol, 0)
-          //                          where treeSize <= grammar.MaximalExpressionLength(symbol)
-          //                          where treeSize >= grammar.MinimalExpressionLength(symbol)
-          //                          select symbol;
-          //Symbol rootSymbol = SelectRandomSymbol(random, possibleRootSymbols);
-          //tree.Root = PTC2(random, grammar, rootSymbol, treeSize, maxTreeHeight);
+          tree.Root = PTC2(random, grammar, grammar.StartSymbol, treeSize + 1, maxTreeHeight + 1);
         }
         catch (ArgumentException) {
           // try a different size
           treeSize = random.Next(allowedMinSize, allowedMaxSize);
-          tries = 0;
-        }
-        if (tries++ >= MAX_TRIES) {
-          // try a different size
-          treeSize = random.Next(allowedMinSize, allowedMaxSize);
-          tries = 0;
         }
       } while (tree.Root == null || tree.Size > maxTreeSize || tree.Height > maxTreeHeight);
@@ -191,35 +176,4 @@
       return tree;
     }
-
-    //private bool IsRecursiveExpansionPossible(Symbol symbol) {
-    //  return FindCycle(function, new Stack<IFunction>());
-    //}
-
-    //private Dictionary<IFunction, bool> inCycle = new Dictionary<IFunction, bool>();
-    //private bool FindCycle(IFunction function, Stack<IFunction> functionChain) {
-    //  if (inCycle.ContainsKey(function)) {
-    //    return inCycle[function];
-    //  } else if (IsTerminal(function)) {
-    //    inCycle[function] = false;
-    //    return false;
-    //  } else if (functionChain.Contains(function)) {
-    //    inCycle[function] = true;
-    //    return true;
-    //  } else {
-    //    functionChain.Push(function);
-    //    bool result = false;
-    //    // all slot indexes
-    //    for (int i = 0; i < function.MaxSubTrees; i++) {
-    //      foreach (IFunction subFunction in GetAllowedSubFunctions(function, i)) {
-    //        result |= FindCycle(subFunction, functionChain);
-    //      }
-    //    }
-
-    //    functionChain.Pop();
-    //    inCycle[function] = result;
-    //    return result;
-    //  }
-    //}
-
   }
 }
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj	(revision 3238)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj	(revision 3239)
@@ -87,4 +87,5 @@
     <Compile Include="Creators\ProbabilisticTreeCreator.cs" />
     <Compile Include="HeuristicLabEncodingsSymbolicExpressionTreeEncodingPlugin.cs" />
+    <Compile Include="Interfaces\ISymbolicExpressionTreeOperator.cs" />
     <Compile Include="SymbolicExpressionGrammar.cs" />
     <Compile Include="SymbolicExpressionTreeCreator.cs" />
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeOperator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeOperator.cs	(revision 3239)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/Interfaces/ISymbolicExpressionTreeOperator.cs	(revision 3239)
@@ -0,0 +1,40 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Operators;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using System;
+using System.Diagnostics;
+
+namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding {
+  /// <summary>
+  /// Interface for operators that can be applied to symbolic expression trees.
+  /// </summary>
+  public interface ISymbolicExpressionTreeOperator : IOperator {
+    IValueLookupParameter<IntValue> MaxTreeSizeParameter { get; }
+    IValueLookupParameter<IntValue> MaxTreeHeightParameter { get; }
+    ILookupParameter<ISymbolicExpressionGrammar> SymbolicExpressionGrammarParameter { get; }
+  }
+}
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCreator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCreator.cs	(revision 3238)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCreator.cs	(revision 3239)
@@ -33,5 +33,5 @@
   [Item("SymbolicExpressionTreeCreator", "A base class for operators creating symbolic expression trees.")]
   [StorableClass]
-  public abstract class SymbolicExpressionTreeCreator : SingleSuccessorOperator, ISolutionCreator, IStochasticOperator {
+  public abstract class SymbolicExpressionTreeCreator : SingleSuccessorOperator, ISolutionCreator, IStochasticOperator, ISymbolicExpressionTreeOperator {
     private const string RandomParameterName = "Random";
     private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCrossover.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCrossover.cs	(revision 3238)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeCrossover.cs	(revision 3239)
@@ -35,5 +35,5 @@
   [Item("SymbolicExpressionTreeCrossover", "A base class for operators that perform a crossover of symbolic expression trees.")]
   [StorableClass]
-  public abstract class SymbolicExpressionTreeCrossover : SingleSuccessorOperator, ICrossover, IStochasticOperator {
+  public abstract class SymbolicExpressionTreeCrossover : SingleSuccessorOperator, ICrossover, IStochasticOperator, ISymbolicExpressionTreeOperator {
     public override bool CanChangeName {
       get { return false; }
Index: trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeManipulator.cs
===================================================================
--- trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeManipulator.cs	(revision 3238)
+++ trunk/sources/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.3/SymbolicExpressionTreeManipulator.cs	(revision 3239)
@@ -33,5 +33,5 @@
   [Item("RealVectorManipulator", "A base class for operators that manipulate real-valued vectors.")]
   [StorableClass]
-  public abstract class RealVectorManipulator : SingleSuccessorOperator, IRealVectorManipulator, IStochasticOperator {
+  public abstract class RealVectorManipulator : SingleSuccessorOperator, IRealVectorManipulator, IStochasticOperator, ISymbolicExpressionTreeOperator {
     public override bool CanChangeName {
       get { return false; }
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailView.Designer.cs	(revision 3239)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailView.Designer.cs	(revision 3239)
@@ -0,0 +1,106 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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
+
+namespace HeuristicLab.Problems.ArtificialAnt.Views {
+  partial class AntTrailView {
+    /// <summary> 
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary> 
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing) {
+        if (components != null) components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Component Designer generated code
+
+    /// <summary> 
+    /// Required method for Designer support - do not modify 
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+      this.pictureBox = new System.Windows.Forms.PictureBox();
+      this.playButton = new System.Windows.Forms.Button();
+      this.animationTimer = new System.Windows.Forms.Timer(this.components);
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // pictureBox
+      // 
+      this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+                  | System.Windows.Forms.AnchorStyles.Left)
+                  | System.Windows.Forms.AnchorStyles.Right)));
+      this.pictureBox.BackColor = System.Drawing.Color.White;
+      this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+      this.pictureBox.Location = new System.Drawing.Point(0, 0);
+      this.pictureBox.Name = "pictureBox";
+      this.pictureBox.Size = new System.Drawing.Size(392, 275);
+      this.pictureBox.TabIndex = 0;
+      this.pictureBox.TabStop = false;
+      this.pictureBox.SizeChanged += new System.EventHandler(this.pictureBox_SizeChanged);
+      // 
+      // playButton
+      // 
+      this.playButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
+      this.playButton.Location = new System.Drawing.Point(4, 281);
+      this.playButton.Name = "playButton";
+      this.playButton.Size = new System.Drawing.Size(75, 23);
+      this.playButton.TabIndex = 1;
+      this.playButton.Text = "Play";
+      this.playButton.UseVisualStyleBackColor = true;
+      this.playButton.Click += new System.EventHandler(this.playButton_Click);
+      // 
+      // animationTimer
+      // 
+      this.animationTimer.Interval = 15;
+      this.animationTimer.Tick += new System.EventHandler(this.animationTimer_Tick);
+      // 
+      // AntTrailView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.playButton);
+      this.Controls.Add(this.pictureBox);
+      this.Name = "AntTrailView";
+      this.Size = new System.Drawing.Size(392, 310);
+      this.EnabledChanged += new System.EventHandler(this.AntTrailView_EnabledChanged);
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.PictureBox pictureBox;
+    private System.Windows.Forms.Button playButton;
+    private System.Windows.Forms.Timer animationTimer;
+
+
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailView.cs	(revision 3239)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/AntTrailView.cs	(revision 3239)
@@ -0,0 +1,232 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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 System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Data;
+using HeuristicLab.MainForm;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using System.Collections.Generic;
+
+namespace HeuristicLab.Problems.ArtificialAnt.Views {
+  [View("AntTrail View")]
+  [Content(typeof(AntTrail), true)]
+  public sealed partial class AntTrailView : ItemView {
+    public new AntTrail Content {
+      get { return (AntTrail)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public AntTrailView() {
+      InitializeComponent();
+    }
+
+    public AntTrailView(AntTrail content)
+      : this() {
+      Content = content;
+    }
+
+    protected override void DeregisterContentEvents() {
+      Content.SymbolicExpressionTreeChanged -= new EventHandler(Content_SymbolicExpressionTreeChanged);
+      base.DeregisterContentEvents();
+    }
+    protected override void RegisterContentEvents() {
+      base.RegisterContentEvents();
+      Content.SymbolicExpressionTreeChanged += new EventHandler(Content_SymbolicExpressionTreeChanged);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        pictureBox.Image = null;
+        pictureBox.Enabled = false;
+      } else {
+        pictureBox.Enabled = true;
+        GenerateImage();
+      }
+    }
+
+    private void GenerateImage() {
+      playButton.Enabled = this.Enabled;
+      animationTimer.Stop();
+      if ((pictureBox.Width > 0) && (pictureBox.Height > 0)) {
+        if (Content == null) {
+          pictureBox.Image = null;
+          playButton.Enabled = false;
+        } else {
+          var nodeStack = new Stack<SymbolicExpressionTreeNode>();
+          int rows = Content.World.Rows;
+          int columns = Content.World.Columns;
+          SymbolicExpressionTree expression = Content.SymbolicExpressionTree;
+
+          DrawWorld();
+          using (Graphics graphics = Graphics.FromImage(pictureBox.Image)) {
+            float cellHeight = pictureBox.Height / (float)rows;
+            float cellWidth = pictureBox.Width / (float)columns;
+
+            AntInterpreter interpreter = new AntInterpreter();
+            interpreter.MaxTimeSteps = Content.MaxTimeSteps.Value;
+            interpreter.Expression = Content.SymbolicExpressionTree;
+            interpreter.World = Content.World;
+            int currentAntLocationColumn;
+            int currentAntLocationRow;
+            // draw initial ant
+            interpreter.AntLocation(out currentAntLocationRow, out currentAntLocationColumn);
+            DrawAnt(graphics, currentAntLocationRow, currentAntLocationColumn, interpreter.AntDirection, cellWidth, cellHeight);
+            // interpret ant code and draw trail
+            while (interpreter.ElapsedTime < interpreter.MaxTimeSteps) {
+              interpreter.Step();
+              interpreter.AntLocation(out currentAntLocationRow, out currentAntLocationColumn);
+              DrawAnt(graphics, currentAntLocationRow, currentAntLocationColumn, interpreter.AntDirection, cellWidth, cellHeight);
+            }
+          }
+          pictureBox.Refresh();
+        }
+      }
+    }
+
+    private void DrawWorld() {
+      int rows = Content.World.Rows;
+      int columns = Content.World.Columns;
+      Bitmap bitmap = new Bitmap(pictureBox.Width, pictureBox.Height);
+      using (Graphics graphics = Graphics.FromImage(bitmap)) {
+        float cellHeight = pictureBox.Height / (float)rows;
+        float cellWidth = pictureBox.Width / (float)columns;
+        // draw world
+        for (int i = 0; i < rows; i++) {
+          graphics.DrawLine(Pens.Black, 0, i * cellHeight, pictureBox.Width, i * cellHeight);
+        }
+        for (int j = 0; j < columns; j++) {
+          graphics.DrawLine(Pens.Black, j * cellWidth, 0, j * cellWidth, pictureBox.Height);
+        }
+        for (int i = 0; i < rows; i++) {
+          for (int j = 0; j < columns; j++) {
+            if (Content.World[i, j])
+              graphics.FillEllipse(Brushes.LightBlue, j * cellWidth, i * cellHeight, cellWidth, cellHeight);
+          }
+        }
+        pictureBox.Image = bitmap;
+      }
+    }
+
+    private void DrawAnt(Graphics g, int row, int column, int direction, float cellWidth, float cellHeight) {
+      //g.FillRectangle(Brushes.White, column * cellWidth, row * cellHeight,
+      //      cellWidth, cellHeight);
+      // draw ant body
+      g.FillRectangle(Brushes.Brown,
+            column * cellWidth + cellWidth * 0.25f, row * cellHeight + cellHeight * 0.25f,
+            cellWidth * 0.5f, cellHeight * 0.5f);
+      // show ant direction
+      float centerX = column * cellWidth + cellWidth * 0.5f;
+      float centerY = row * cellHeight + cellHeight * 0.5f;
+      float directionX = centerX;
+      float directionY = centerY;
+      switch (direction) {
+        case 0: { // EAST
+            directionX = centerX + cellWidth * 0.5f;
+            break;
+          }
+        case 1: { // SOUTH
+            directionY = directionY + cellHeight * 0.5f;
+            break;
+          }
+        case 2: { // WEST 
+            directionX = centerX - cellWidth * 0.5f;
+            break;
+          }
+        case 3: { // NORTH
+            directionY = directionY - cellHeight * 0.5f;
+            break;
+          }
+        default: throw new InvalidOperationException();
+      }
+      g.DrawLine(Pens.Brown, centerX, centerY, directionX, directionY);
+    }
+
+    void Content_SymbolicExpressionTreeChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_SymbolicExpressionTreeChanged), sender, e);
+      else
+        GenerateImage();
+    }
+
+    private void pictureBox_SizeChanged(object sender, EventArgs e) {
+      GenerateImage();
+    }
+
+    #region animation
+    private AntInterpreter animationInterpreter;
+    private void playButton_Click(object sender, EventArgs e) {
+      playButton.Enabled = false;
+      int rows = Content.World.Rows;
+      int columns = Content.World.Columns;
+      SymbolicExpressionTree expression = Content.SymbolicExpressionTree;
+      var nodeStack = new Stack<SymbolicExpressionTreeNode>();
+
+      animationInterpreter = new AntInterpreter();
+      animationInterpreter.MaxTimeSteps = Content.MaxTimeSteps.Value;
+      animationInterpreter.Expression = Content.SymbolicExpressionTree;
+      animationInterpreter.World = Content.World;
+
+      DrawWorld();
+      using (Graphics graphics = Graphics.FromImage(pictureBox.Image)) {
+        float cellHeight = pictureBox.Height / (float)Content.World.Rows;
+        float cellWidth = pictureBox.Width / (float)Content.World.Columns;
+        // draw initial ant
+        int currentAntLocationColumn;
+        int currentAntLocationRow;
+        animationInterpreter.AntLocation(out currentAntLocationRow, out currentAntLocationColumn);
+        DrawAnt(graphics, currentAntLocationRow, currentAntLocationColumn, animationInterpreter.AntDirection, cellWidth, cellHeight);
+        pictureBox.Refresh();
+      }
+
+      animationTimer.Start();
+    }
+
+    private void animationTimer_Tick(object sender, EventArgs e) {
+      using (Graphics graphics = Graphics.FromImage(pictureBox.Image)) {
+        float cellHeight = pictureBox.Height / (float)Content.World.Rows;
+        float cellWidth = pictureBox.Width / (float)Content.World.Columns;
+        int currentAntLocationColumn;
+        int currentAntLocationRow;
+        // interpret ant code and draw trail
+        animationInterpreter.Step();
+        animationInterpreter.AntLocation(out currentAntLocationRow, out currentAntLocationColumn);
+        DrawAnt(graphics, currentAntLocationRow, currentAntLocationColumn, animationInterpreter.AntDirection, cellWidth, cellHeight);
+        pictureBox.Refresh();
+        if (animationInterpreter.ElapsedTime < animationInterpreter.MaxTimeSteps) {
+          animationTimer.Start();
+        } else {
+          animationTimer.Stop();
+          playButton.Enabled = this.Enabled;
+        }
+      }
+    }
+    #endregion
+
+    private void AntTrailView_EnabledChanged(object sender, EventArgs e) {
+      if (this.Enabled) playButton.Enabled = true;
+      else playButton.Enabled = false;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/ArtificialAntProblemView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/ArtificialAntProblemView.Designer.cs	(revision 3239)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/ArtificialAntProblemView.Designer.cs	(revision 3239)
@@ -0,0 +1,31 @@
+﻿namespace HeuristicLab.Problems.ArtificialAnt.Views {
+  partial class ArtificialAntProblemView {
+    /// <summary>
+    /// Required designer variable.
+    /// </summary>
+    private System.ComponentModel.IContainer components = null;
+
+    /// <summary>
+    /// Clean up any resources being used.
+    /// </summary>
+    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+    protected override void Dispose(bool disposing) {
+      if (disposing && (components != null)) {
+        components.Dispose();
+      }
+      base.Dispose(disposing);
+    }
+
+    #region Windows Form Designer generated code
+
+    /// <summary>
+    /// Required method for Designer support - do not modify
+    /// the contents of this method with the code editor.
+    /// </summary>
+    private void InitializeComponent() {
+      this.components = new System.ComponentModel.Container();
+    }
+
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/ArtificialAntProblemView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/ArtificialAntProblemView.cs	(revision 3239)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/ArtificialAntProblemView.cs	(revision 3239)
@@ -0,0 +1,35 @@
+﻿using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using HeuristicLab.Optimization.Views;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Problems.ArtificialAnt.Views {
+  [View("ArtificialAntProblem View")]
+  [Content(typeof(ArtificialAntProblem), true)]
+  public partial class ArtificialAntProblemView : ProblemView {
+    public new ArtificialAntProblem Content {
+      get { return (ArtificialAntProblem)base.Content; }
+      set { base.Content = value; }
+    }
+
+    /// <summary>
+    /// Initializes a new instance of <see cref="ArtificialAntProblemView"/>.
+    /// </summary>
+    public ArtificialAntProblemView() {
+      InitializeComponent();
+    }
+    /// <summary>
+    /// Intializes a new instance of <see cref="ArtificialAntProblemView"/> with the given <paramref name="item"/>.
+    /// </summary>
+    /// <param name="item">The item that should be displayed.</param>
+    public ArtificialAntProblemView(ArtificialAntProblem content)
+      : this() {
+      Content = content;
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/HeuristicLab.Problems.ArtificialAnt.Views-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/HeuristicLab.Problems.ArtificialAnt.Views-3.3.csproj	(revision 3239)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/HeuristicLab.Problems.ArtificialAnt.Views-3.3.csproj	(revision 3239)
@@ -0,0 +1,167 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="3.5" 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>{30DD3DA2-CA57-49DD-A5BA-50CEF19DB45F}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.ArtificialAnt.Views</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.ArtificialAnt.Views-3.3</AssemblyName>
+    <TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+    <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="AntTrailView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="AntTrailView.Designer.cs">
+      <DependentUpon>AntTrailView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="ArtificialAntProblemView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="ArtificialAntProblemView.Designer.cs">
+      <DependentUpon>ArtificialAntProblemView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="HeuristicLabProblemsArtificialAntViewsPlugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="AntTrailView.resx">
+      <DependentUpon>AntTrailView.cs</DependentUpon>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">
+      <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project>
+      <Name>HeuristicLab.Core.Views-3.3</Name>
+    </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>
+    </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>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.3\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj">
+      <Project>{125D3006-67F5-48CB-913E-73C0548F17FA}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.2\HeuristicLab.MainForm.WindowsForms-3.2.csproj">
+      <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
+      <Name>HeuristicLab.MainForm.WindowsForms-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.MainForm\3.2\HeuristicLab.MainForm-3.2.csproj">
+      <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>
+      <Name>HeuristicLab.MainForm-3.2</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj">
+      <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project>
+      <Name>HeuristicLab.Optimization.Views-3.3</Name>
+    </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>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.ArtificialAnt\3.3\HeuristicLab.Problems.ArtificialAnt-3.3.csproj">
+      <Project>{F5C0ECAC-EDBA-4024-872A-1F74AFCB20B4}</Project>
+      <Name>HeuristicLab.Problems.ArtificialAnt-3.3</Name>
+    </ProjectReference>
+  </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>set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabProblemsArtificialAntViewsPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabProblemsArtificialAntViewsPlugin.cs"</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/HeuristicLabProblemsArtificialAntViewsPlugin.cs.frame
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/HeuristicLabProblemsArtificialAntViewsPlugin.cs.frame	(revision 3239)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/HeuristicLabProblemsArtificialAntViewsPlugin.cs.frame	(revision 3239)
@@ -0,0 +1,41 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Views {
+  [Plugin("HeuristicLab.Problems.ArtificialAnt.Views","3.3.0.$WCREV$")]
+  [PluginFile("HeuristicLab.Problems.ArtificialAnt.Views-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Core", "3.3.0.0")]
+  [PluginDependency("HeuristicLab.Core.Views", "3.3.0.0")]
+  [PluginDependency("HeuristicLab.Data", "3.3.0.0")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","3.3.0.0")]
+  [PluginDependency("HeuristicLab.MainForm", "3.2.0.0")]
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.2.0.0")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3.0.0")]
+  [PluginDependency("HeuristicLab.Optimization.Views", "3.3.0.0")]
+  [PluginDependency("HeuristicLab.Problems.ArtificialAnt", "3.3.0.0")]
+  public class HeuristicLabProblemsArtificialAntViewsPlugin : PluginBase {
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/Properties/AssemblyInfo.frame
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/Properties/AssemblyInfo.frame	(revision 3239)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.3/Properties/AssemblyInfo.frame	(revision 3239)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Views")]
+[assembly: AssemblyDescription("HeuristicLab artificial ant problem views")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2010 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("64b22bb4-5eac-46ae-b2b6-c84ff428e177")]
+
+// 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.3.0.0")]
+[assembly: AssemblyFileVersion("3.3.0.$WCREV$")]
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntInterpreter.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntInterpreter.cs	(revision 3238)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntInterpreter.cs	(revision 3239)
@@ -22,125 +22,124 @@
 using System;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Data;
+using System.Collections.Generic;
 
 namespace HeuristicLab.Problems.ArtificialAnt {
-  internal class AntInterpreter {
-    private const int N_FOOD_ITEMS = 89;
-    private const int WORLD_WIDTH = 32;
-    private const int WORLD_HEIGHT = 32;
-    private const int FOOD = 1;
-    private const int EMPTY = 0;
-    private int[] SANTA_FE_TRAIL = new int[] {
-      0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 
-      0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 
-      0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 
-      0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    };
-
-    private int[] trail;
-
-    public int ElapsedTime { get; set; }
+  public class AntInterpreter {
     public int MaxTimeSteps { get; set; }
     public int FoodEaten { get; set; }
-    private int currentDirection;
-    private int currentLocation;
-
-    public AntInterpreter() {
-      currentLocation = 0;
-      currentDirection = 0;
-      FoodEaten = 0;
-      trail = new int[WORLD_HEIGHT * WORLD_WIDTH];
-      Array.Copy(SANTA_FE_TRAIL, trail, SANTA_FE_TRAIL.Length);
-    }
-
-    internal void Run(SymbolicExpressionTree tree) {
-      while (FoodEaten < N_FOOD_ITEMS && ElapsedTime < MaxTimeSteps) {
-        Step(tree.Root.SubTrees[0]);
+    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();
       }
     }
 
-    internal void Step(SymbolicExpressionTreeNode currentNode) {
+    private SymbolicExpressionTree expression;
+    public SymbolicExpressionTree Expression {
+      get { return expression; }
+      set {
+        expression = value;
+      }
+    }
+    public int ElapsedTime { get; set; }
+    private int currentDirection;
+    private int currentAntLocationRow;
+    private int currentAntLocationColumn;
+    private int nFoodItems;
+    private Stack<SymbolicExpressionTreeNode> nodeStack = new Stack<SymbolicExpressionTreeNode>();
+
+    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.SubTrees[0]);
+      var currentNode = nodeStack.Pop();
       if (currentNode.Symbol is Left) {
-        if (ElapsedTime >= MaxTimeSteps || FoodEaten >= N_FOOD_ITEMS) return;
         currentDirection = (currentDirection + 3) % 4;
         ElapsedTime++;
       } else if (currentNode.Symbol is Right) {
-        if (ElapsedTime >= MaxTimeSteps || FoodEaten >= N_FOOD_ITEMS) return;
         currentDirection = (currentDirection + 1) % 4;
         ElapsedTime++;
       } else if (currentNode.Symbol is Move) {
-        if (ElapsedTime >= MaxTimeSteps || FoodEaten >= N_FOOD_ITEMS) return;
-        currentLocation = NextField();
-        FoodEaten += trail[currentLocation];
-        trail[currentLocation] = EMPTY;
+        MoveAntForward();
+        if (World[currentAntLocationRow, currentAntLocationColumn])
+          FoodEaten++;
+        World[currentAntLocationRow, currentAntLocationColumn] = false;
         ElapsedTime++;
       } else if (currentNode.Symbol is IfFoodAhead) {
-        if (trail[NextField()] == FOOD) {
-          Step(currentNode.SubTrees[0]);
+        int nextAntLocationRow;
+        int nextAntLocationColumn;
+        NextField(out nextAntLocationRow, out nextAntLocationColumn);
+        if (World[nextAntLocationRow, nextAntLocationColumn]) {
+          nodeStack.Push(currentNode.SubTrees[0]);
         } else {
-          Step(currentNode.SubTrees[1]);
+          nodeStack.Push(currentNode.SubTrees[1]);
         }
       } else if (currentNode.Symbol is Prog2) {
-        Step(currentNode.SubTrees[0]);
-        Step(currentNode.SubTrees[1]);
+        nodeStack.Push(currentNode.SubTrees[1]);
+        nodeStack.Push(currentNode.SubTrees[0]);
         return;
       } else if (currentNode.Symbol is Prog3) {
-        Step(currentNode.SubTrees[0]);
-        Step(currentNode.SubTrees[1]);
-        Step(currentNode.SubTrees[2]);
+        nodeStack.Push(currentNode.SubTrees[2]);
+        nodeStack.Push(currentNode.SubTrees[1]);
+        nodeStack.Push(currentNode.SubTrees[0]);
         return;
-      } else  {
+      } else {
         throw new InvalidOperationException(currentNode.Symbol.ToString());
       }
     }
 
-    private int NextField() {
-      int currentLocationX = currentLocation % WORLD_WIDTH;
-      int currentLocationY = currentLocation / WORLD_HEIGHT;
+    private void MoveAntForward() {
+      NextField(out currentAntLocationRow, out currentAntLocationColumn);
+    }
 
+    private void NextField(out int nextAntLocationRow, out int nextAntLocationColumn) {
       switch (currentDirection) {
         case 0:
-          currentLocationX = (currentLocationX + 1) % WORLD_WIDTH; // EAST
+          nextAntLocationColumn = (currentAntLocationColumn + 1) % World.Columns; // EAST
+          nextAntLocationRow = currentAntLocationRow;
           break;
         case 1:
-          currentLocationY = (currentLocationY + 1) % WORLD_HEIGHT; // SOUTH
+          nextAntLocationRow = (currentAntLocationRow + 1) % World.Rows; // SOUTH
+          nextAntLocationColumn = currentAntLocationColumn;
           break;
         case 2:
-          currentLocationX = (currentLocationX + WORLD_WIDTH - 1) % WORLD_WIDTH; // WEST
+          nextAntLocationColumn = (currentAntLocationColumn + World.Columns - 1) % World.Columns; // WEST
+          nextAntLocationRow = currentAntLocationRow;
           break;
         case 3:
-          currentLocationY = (currentLocationY + WORLD_HEIGHT - 1) % WORLD_HEIGHT; // NORTH
+          nextAntLocationRow = (currentAntLocationRow + World.Rows - 1) % World.Rows; // NORTH
+          nextAntLocationColumn = currentAntLocationColumn;
           break;
         default:
           throw new InvalidOperationException();
       }
-      return currentLocationY * WORLD_WIDTH + currentLocationX;
     }
   }
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntTrail.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntTrail.cs	(revision 3238)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntTrail.cs	(revision 3239)
@@ -48,8 +48,39 @@
     }
 
+    private BoolMatrix world;
+    [Storable]
+    public BoolMatrix World {
+      get { return world; }
+      set {
+        if (world != value) {
+          if (world != null) DeregisterWorldEvents();
+          world = value;
+          if (world != null) RegisterWorldEvents();
+          OnWorldChanged();
+        }
+      }
+    }
+    private IntValue maxTimeSteps;
+    [Storable]
+    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(SymbolicExpressionTree expression)
+    public AntTrail(BoolMatrix world, SymbolicExpressionTree expression, IntValue maxTimeSteps)
       : this() {
+      World = world;
       SymbolicExpressionTree = expression;
+      MaxTimeSteps = maxTimeSteps;
     }
 
@@ -58,12 +89,27 @@
       cloner.RegisterClonedObject(this, clone);
       clone.expression = (SymbolicExpressionTree)cloner.Clone(expression);
+      clone.world = (BoolMatrix)cloner.Clone(world);
+      clone.maxTimeSteps = (IntValue)cloner.Clone(maxTimeSteps);
       return clone;
     }
 
-    //#region Events
+    #region Events
     public event EventHandler SymbolicExpressionTreeChanged;
     private void OnSymbolicExpressionTreeChanged() {
-      if (SymbolicExpressionTreeChanged != null)
-        SymbolicExpressionTreeChanged(this, EventArgs.Empty);
+      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);
     }
 
@@ -77,11 +123,29 @@
     //}
 
-    //private void SymbolicExpressionTree_ItemChanged(object sender, EventArgs<int> e) {
-    //  OnSymbolicExpressionTreeChanged();
-    //}
-    //private void SymbolicExpressionTree_Reset(object sender, EventArgs e) {
-    //  OnSymbolicExpressionTreeChanged();
-    //}
-    //#endregion
+    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: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntTrailView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntTrailView.Designer.cs	(revision 3238)
+++ 	(revision )
@@ -1,83 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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
-
-namespace HeuristicLab.Problems.ArtificialAnt {
-  partial class AntTrailView {
-    /// <summary> 
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary> 
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing) {
-        if (components != null) components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Component Designer generated code
-
-    /// <summary> 
-    /// Required method for Designer support - do not modify 
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.pictureBox = new System.Windows.Forms.PictureBox();
-      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
-      this.SuspendLayout();
-      // 
-      // pictureBox
-      // 
-      this.pictureBox.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
-                  | System.Windows.Forms.AnchorStyles.Left)
-                  | System.Windows.Forms.AnchorStyles.Right)));
-      this.pictureBox.BackColor = System.Drawing.Color.White;
-      this.pictureBox.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
-      this.pictureBox.Location = new System.Drawing.Point(0, 0);
-      this.pictureBox.Name = "pictureBox";
-      this.pictureBox.Size = new System.Drawing.Size(392, 310);
-      this.pictureBox.TabIndex = 0;
-      this.pictureBox.TabStop = false;
-      this.pictureBox.SizeChanged += new System.EventHandler(this.pictureBox_SizeChanged);
-      // 
-      // PathTSPTourView
-      // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
-      this.Controls.Add(this.pictureBox);
-      this.Name = "PathTSPTourView";
-      this.Size = new System.Drawing.Size(392, 310);
-      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
-      this.ResumeLayout(false);
-
-    }
-
-    #endregion
-
-    private System.Windows.Forms.PictureBox pictureBox;
-
-
-  }
-}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntTrailView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/AntTrailView.cs	(revision 3238)
+++ 	(revision )
@@ -1,233 +1,0 @@
-#region License Information
-/* HeuristicLab
- * Copyright (C) 2002-2010 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 System.Windows.Forms;
-using HeuristicLab.Core.Views;
-using HeuristicLab.Data;
-using HeuristicLab.MainForm;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
-using System.Collections.Generic;
-
-namespace HeuristicLab.Problems.ArtificialAnt {
-  [View("AntTrail View")]
-  [Content(typeof(AntTrail), true)]
-  public sealed partial class AntTrailView : ItemView {
-    private const int N_FOOD_ITEMS = 89;
-    private const int WORLD_WIDTH = 32;
-    private const int WORLD_HEIGHT = 32;
-    private const int FOOD = 1;
-    private const int EMPTY = 0;
-    private int[] SANTA_FE_TRAIL = new int[] {
-      0, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 
-      0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 
-      0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 
-      0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-    };
-
-    private const int MAX_TIME_STEPS = 600;
-
-    private int[] trail;
-    private int currentLocation;
-    private int currentDirection;
-    Stack<SymbolicExpressionTreeNode> nodeStack;
-
-    public new AntTrail Content {
-      get { return (AntTrail)base.Content; }
-      set { base.Content = value; }
-    }
-
-    public AntTrailView() {
-      InitializeComponent();
-      ResetTrailInterpreter();
-    }
-
-    public AntTrailView(AntTrail content)
-      : this() {
-      Content = content;
-    }
-
-    protected override void DeregisterContentEvents() {
-      Content.SymbolicExpressionTreeChanged -= new EventHandler(Content_SymbolicExpressionTreeChanged);
-      base.DeregisterContentEvents();
-    }
-    protected override void RegisterContentEvents() {
-      base.RegisterContentEvents();
-      Content.SymbolicExpressionTreeChanged += new EventHandler(Content_SymbolicExpressionTreeChanged);
-    }
-
-    protected override void OnContentChanged() {
-      base.OnContentChanged();
-      if (Content == null) {
-        pictureBox.Image = null;
-        pictureBox.Enabled = false;
-      } else {
-        pictureBox.Enabled = true;
-        GenerateImage();
-      }
-    }
-
-    private void ResetTrailInterpreter() {
-      nodeStack = new Stack<SymbolicExpressionTreeNode>();
-      currentLocation = 0;
-      currentDirection = 0;
-      trail = new int[WORLD_HEIGHT * WORLD_WIDTH];
-      Array.Copy(SANTA_FE_TRAIL, trail, SANTA_FE_TRAIL.Length);
-    }
-
-
-    private void GenerateImage() {
-      if ((pictureBox.Width > 0) && (pictureBox.Height > 0)) {
-        if (Content == null) {
-          pictureBox.Image = null;
-        } else {
-          ResetTrailInterpreter();
-          SymbolicExpressionTree expression = Content.SymbolicExpressionTree;
-
-          Bitmap bitmap = new Bitmap(pictureBox.Width, pictureBox.Height);
-          using (Graphics graphics = Graphics.FromImage(bitmap)) {
-            int cellHeight = pictureBox.Height / WORLD_HEIGHT;
-            int cellWidth = pictureBox.Width / WORLD_WIDTH;
-            // draw world
-            for (int i = 0; i < WORLD_HEIGHT; i++) {
-              graphics.DrawLine(Pens.Black, 0, i * cellHeight, pictureBox.Width, i * cellHeight);
-            }
-            for (int j = 0; j < WORLD_WIDTH; j++) {
-              graphics.DrawLine(Pens.Black, j * cellWidth, 0, j * cellWidth, pictureBox.Height);
-            }
-            for (int i = 0; i < WORLD_HEIGHT; i++) {
-              for (int j = 0; j < WORLD_WIDTH; j++) {
-                if (trail[i * WORLD_HEIGHT + j] == FOOD) graphics.FillEllipse(Brushes.LightBlue, j * cellWidth, i * cellHeight, cellWidth, cellHeight);
-              }
-            }
-            // step ant and draw trail
-            nodeStack.Clear();
-            int step = 0;
-            while (step < MAX_TIME_STEPS) {
-              // expression evaluated completly => start at root again
-              if (nodeStack.Count == 0)
-                nodeStack.Push(expression.Root.SubTrees[0]);
-
-              var currentNode = nodeStack.Pop();
-              if (currentNode.Symbol is Left) {
-                currentDirection = (currentDirection + 3) % 4;
-                step++;
-              } else if (currentNode.Symbol is Right) {
-                currentDirection = (currentDirection + 1) % 4;
-                step++;
-              } else if (currentNode.Symbol is Move) {
-                currentLocation = NextField();
-                trail[currentLocation] = EMPTY;
-                float currentCellX = currentLocation % WORLD_WIDTH;
-                float currentCellY = currentLocation / WORLD_HEIGHT;
-                graphics.FillRectangle(Brushes.Brown,
-                  currentCellX * cellWidth + cellWidth * 0.25f, currentCellY * cellHeight + cellHeight * 0.25f,
-                  cellWidth * 0.5f, cellHeight * 0.5f);
-                step++;
-              } else if (currentNode.Symbol is IfFoodAhead) {
-                if (trail[NextField()] == FOOD) {
-                  nodeStack.Push(currentNode.SubTrees[0]);
-                } else {
-                  nodeStack.Push(currentNode.SubTrees[1]);
-                }
-              } else if (currentNode.Symbol is Prog2) {
-                nodeStack.Push(currentNode.SubTrees[1]);
-                nodeStack.Push(currentNode.SubTrees[0]);
-              } else if (currentNode.Symbol is Prog3) {
-                nodeStack.Push(currentNode.SubTrees[2]);
-                nodeStack.Push(currentNode.SubTrees[1]);
-                nodeStack.Push(currentNode.SubTrees[0]);
-              } else {
-                throw new InvalidOperationException(currentNode.Symbol.ToString());
-              }
-
-              
-            }
-          }
-          pictureBox.Image = bitmap;
-        }
-      }
-    }
-
-    private int NextField() {
-      int currentLocationX = currentLocation % WORLD_WIDTH;
-      int currentLocationY = currentLocation / WORLD_HEIGHT;
-
-      switch (currentDirection) {
-        case 0:
-          currentLocationX = (currentLocationX + 1) % WORLD_WIDTH; // EAST
-          break;
-        case 1:
-          currentLocationY = (currentLocationY + 1) % WORLD_HEIGHT; // SOUTH
-          break;
-        case 2:
-          currentLocationX = (currentLocationX + WORLD_WIDTH - 1) % WORLD_WIDTH; // WEST
-          break;
-        case 3:
-          currentLocationY = (currentLocationY + WORLD_HEIGHT - 1) % WORLD_HEIGHT; // NORTH
-          break;
-        default:
-          throw new InvalidOperationException();
-      }
-      return currentLocationY * WORLD_WIDTH + currentLocationX;
-    }
-
-    void Content_SymbolicExpressionTreeChanged(object sender, EventArgs e) {
-      if (InvokeRequired)
-        Invoke(new EventHandler(Content_SymbolicExpressionTreeChanged), sender, e);
-      else
-        GenerateImage();
-    }
-
-    private void pictureBox_SizeChanged(object sender, EventArgs e) {
-      GenerateImage();
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs	(revision 3238)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblem.cs	(revision 3239)
@@ -42,4 +42,41 @@
     }
 
+    #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 ValueParameter<BoolValue> MaximizationParameter {
@@ -70,4 +107,10 @@
       get { return (ValueParameter<IntValue>)Parameters["MaxExpressionDepth"]; }
     }
+    public ValueParameter<BoolMatrix> WorldParameter {
+      get { return (ValueParameter<BoolMatrix>)Parameters["World"]; }
+    }
+    public ValueParameter<IntValue> MaxTimeStepsParameter {
+      get { return (ValueParameter<IntValue>)Parameters["MaxTimeSteps"]; }
+    }
 
     public OptionalValueParameter<IAntTrailVisualizer> VisualizerParameter {
@@ -86,4 +129,20 @@
 
     #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 SymbolicExpressionTreeCreator SolutionCreator {
       get { return SolutionCreatorParameter.Value; }
@@ -116,7 +175,7 @@
       get { return BestKnownQualityParameter.Value; }
     }
-    private List<IOperator> operators;
+    private List<ISymbolicExpressionTreeOperator> operators;
     public IEnumerable<IOperator> Operators {
-      get { return operators; }
+      get { return operators.Cast<IOperator>(); }
     }
     #endregion
@@ -128,5 +187,5 @@
       ArtificialAntExpressionGrammar grammar = new ArtificialAntExpressionGrammar();
       BestAntTrailVisualizer visualizer = new BestAntTrailVisualizer();
-
+      BoolMatrix world = new BoolMatrix(santaFeAntTrail);
       Parameters.Add(new ValueParameter<BoolValue>("Maximization", "Set to true as the Artificial Ant Problem is a maximization problem.", new BoolValue(true)));
       Parameters.Add(new ValueParameter<SymbolicExpressionTreeCreator>("SolutionCreator", "The operator which should be used to create new artificial ant solutions.", creator));
@@ -136,4 +195,6 @@
       Parameters.Add(new ValueParameter<IntValue>("MaxExpressionLength", "Maximal length of the expression to control the artificial ant.", new IntValue(100)));
       Parameters.Add(new ValueParameter<IntValue>("MaxExpressionDepth", "Maximal depth of the expression to control the artificial ant.", new IntValue(10)));
+      Parameters.Add(new ValueParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items.", world));
+      Parameters.Add(new ValueParameter<IntValue>("MaxTimeSteps", "The number of time steps the artificial ant has available to collect all food items.", new IntValue(600)));
       Parameters.Add(new ValueParameter<IAntTrailVisualizer>("Visualizer", "The operator which should be used to visualize artificial ant solutions.", visualizer));
 
@@ -159,22 +220,26 @@
     public event EventHandler SolutionCreatorChanged;
     private void OnSolutionCreatorChanged() {
-      if (SolutionCreatorChanged != null)
-        SolutionCreatorChanged(this, EventArgs.Empty);
+      var changed = SolutionCreatorChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
     }
     public event EventHandler EvaluatorChanged;
     private void OnEvaluatorChanged() {
-      if (EvaluatorChanged != null)
-        EvaluatorChanged(this, EventArgs.Empty);
+      var changed = EvaluatorChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
     }
     public event EventHandler VisualizerChanged;
     private void OnVisualizerChanged() {
-      if (VisualizerChanged != null)
-        VisualizerChanged(this, EventArgs.Empty);
+      var changed = VisualizerChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
     }
 
     public event EventHandler OperatorsChanged;
     private void OnOperatorsChanged() {
-      if (OperatorsChanged != null)
-        OperatorsChanged(this, EventArgs.Empty);
+      var changed = OperatorsChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
     }
 
@@ -183,4 +248,5 @@
       ParameterizeSolutionCreator();
       ParameterizeEvaluator();
+      ParameterizeVisualizer();
       ParameterizeOperators();
       OnSolutionCreatorChanged();
@@ -188,10 +254,23 @@
     private void SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged(object sender, EventArgs e) {
       ParameterizeEvaluator();
+      ParameterizeVisualizer();
       ParameterizeOperators();
     }
     private void EvaluatorParameter_ValueChanged(object sender, EventArgs e) {
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
       ParameterizeEvaluator();
+      ParameterizeVisualizer();
       OnEvaluatorChanged();
     }
+
+    private void VisualizerParameter_ValueChanged(object sender, EventArgs e) {
+      ParameterizeVisualizer();
+      OnVisualizerChanged();
+    }
+
+    private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
+      ParameterizeVisualizer();
+    }
+
     #endregion
 
@@ -203,21 +282,38 @@
       SolutionCreator.SymbolicExpressionTreeParameter.ActualNameChanged += new EventHandler(SolutionCreator_SymbolicExpressionTreeParameter_ActualNameChanged);
       EvaluatorParameter.ValueChanged += new EventHandler(EvaluatorParameter_ValueChanged);
-    }
+      Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
+      VisualizerParameter.ValueChanged += new EventHandler(VisualizerParameter_ValueChanged);
+    }
+
+    private void InitializeOperators() {
+      operators = new List<ISymbolicExpressionTreeOperator>();
+      operators.AddRange(ApplicationManager.Manager.GetInstances<ISymbolicExpressionTreeOperator>());
+      ParameterizeOperators();
+    }
+
     private void ParameterizeSolutionCreator() {
       SolutionCreator.SymbolicExpressionGrammarParameter.ActualName = ArtificialAntExpressionGrammarParameter.Name;
+      SolutionCreator.MaxTreeHeightParameter.ActualName = MaxExpressionDepthParameter.Name;
+      SolutionCreator.MaxTreeSizeParameter.ActualName = MaxExpressionLengthParameter.Name;
     }
     private void ParameterizeEvaluator() {
       Evaluator.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
-    }
-    private void InitializeOperators() {
-      operators = new List<IOperator>();
-      operators.Add(Evaluator);
-      operators.Add(SolutionCreator);
-      operators.Add(new SubtreeCrossover());
-      ParameterizeOperators();
+      Evaluator.MaxTimeStepsParameter.ActualName = MaxTimeStepsParameter.Name;
+      Evaluator.WorldParameter.ActualName = WorldParameter.Name;
+    }
+    private void ParameterizeVisualizer() {
+      if (Visualizer != null) {
+        Visualizer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
+        var antTrailVisualizer = Visualizer as IAntTrailVisualizer;
+        if (antTrailVisualizer != null) {
+          antTrailVisualizer.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+          antTrailVisualizer.WorldParameter.ActualName = WorldParameter.Name;
+          antTrailVisualizer.MaxTimeStepsParameter.ActualName = MaxTimeStepsParameter.Name;
+        }
+      }
     }
 
     private void ParameterizeOperators() {
-      foreach (ProbabilisticTreeCreator op in Operators.OfType<ProbabilisticTreeCreator>()) {
+      foreach (ISymbolicExpressionTreeOperator op in Operators.OfType<ISymbolicExpressionTreeOperator>()) {
         op.MaxTreeHeightParameter.ActualName = MaxExpressionDepthParameter.Name;
         op.MaxTreeSizeParameter.ActualName = MaxExpressionLengthParameter.Name;
@@ -226,20 +322,13 @@
       foreach (Evaluator op in Operators.OfType<Evaluator>()) {
         op.SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
+        op.MaxTimeStepsParameter.ActualName = MaxTimeStepsParameter.Name;
+        op.WorldParameter.ActualName = WorldParameter.Name;
       }
       foreach (SymbolicExpressionTreeCrossover op in Operators.OfType<SymbolicExpressionTreeCrossover>()) {
-        op.MaxTreeHeightParameter.ActualName = MaxExpressionDepthParameter.Name;
-        op.MaxTreeSizeParameter.ActualName = MaxExpressionLengthParameter.Name;
-        op.SymbolicExpressionGrammarParameter.ActualName = ArtificialAntExpressionGrammarParameter.Name;
         op.ParentsParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
         op.ChildParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
       }
     }
-    private void ParameterizeVisualizer() {
-      if (Visualizer != null) {
-        Visualizer.QualityParameter.ActualName = Evaluator.QualityParameter.ActualName;
-        if (Visualizer is IAntTrailVisualizer)
-          ((IAntTrailVisualizer)Visualizer).SymbolicExpressionTreeParameter.ActualName = SolutionCreator.SymbolicExpressionTreeParameter.ActualName;
-      }
-    }
+
 
     #endregion
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblemView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblemView.Designer.cs	(revision 3238)
+++ 	(revision )
@@ -1,31 +1,0 @@
-﻿namespace HeuristicLab.Problems.ArtificialAnt {
-  partial class ArtificialAntProblemView {
-    /// <summary>
-    /// Required designer variable.
-    /// </summary>
-    private System.ComponentModel.IContainer components = null;
-
-    /// <summary>
-    /// Clean up any resources being used.
-    /// </summary>
-    /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
-    protected override void Dispose(bool disposing) {
-      if (disposing && (components != null)) {
-        components.Dispose();
-      }
-      base.Dispose(disposing);
-    }
-
-    #region Windows Form Designer generated code
-
-    /// <summary>
-    /// Required method for Designer support - do not modify
-    /// the contents of this method with the code editor.
-    /// </summary>
-    private void InitializeComponent() {
-      this.components = new System.ComponentModel.Container();
-    }
-
-    #endregion
-  }
-}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblemView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/ArtificialAntProblemView.cs	(revision 3238)
+++ 	(revision )
@@ -1,35 +1,0 @@
-﻿using System;
-using System.Collections.Generic;
-using System.ComponentModel;
-using System.Data;
-using System.Drawing;
-using System.Text;
-using System.Windows.Forms;
-using HeuristicLab.Optimization.Views;
-using HeuristicLab.MainForm;
-
-namespace HeuristicLab.Problems.ArtificialAnt {
-  [View("ArtificialAntProblem View")]
-  [Content(typeof(ArtificialAntProblem), true)]
-  public partial class ArtificialAntProblemView : ProblemView {
-    public new ArtificialAntProblem Content {
-      get { return (ArtificialAntProblem)base.Content; }
-      set { base.Content = value; }
-    }
-
-    /// <summary>
-    /// Initializes a new instance of <see cref="ArtificialAntProblemView"/>.
-    /// </summary>
-    public ArtificialAntProblemView() {
-      InitializeComponent();
-    }
-    /// <summary>
-    /// Intializes a new instance of <see cref="ArtificialAntProblemView"/> with the given <paramref name="item"/>.
-    /// </summary>
-    /// <param name="item">The item that should be displayed.</param>
-    public ArtificialAntProblemView(ArtificialAntProblem content)
-      : this() {
-      Content = content;
-    }
-  }
-}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/BestAntTrailVisualizer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/BestAntTrailVisualizer.cs	(revision 3238)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/BestAntTrailVisualizer.cs	(revision 3239)
@@ -36,4 +36,7 @@
   [StorableClass]
   public sealed class BestAntTrailVisualizer : SingleSuccessorOperator, IAntTrailVisualizer {
+    public ILookupParameter<BoolMatrix> WorldParameter {
+      get { return (ILookupParameter<BoolMatrix>)Parameters["World"]; }
+    }
     public ILookupParameter<ItemArray<SymbolicExpressionTree>> SymbolicExpressionTreeParameter {
       get { return (ILookupParameter<ItemArray<SymbolicExpressionTree>>)Parameters["SymbolicExpressionTree"]; }
@@ -42,4 +45,8 @@
       get { return (ILookupParameter<ItemArray<DoubleValue>>)Parameters["Quality"]; }
     }
+    public ILookupParameter<IntValue> MaxTimeStepsParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["MaxTimeSteps"]; }
+    }
+
     public ILookupParameter<AntTrail> AntTrailParameter {
       get { return (ILookupParameter<AntTrail>)Parameters["AntTrail"]; }
@@ -51,8 +58,9 @@
     public BestAntTrailVisualizer()
       : base() {
-      Parameters.Add(new LookupParameter<DoubleMatrix>("Coordinates", "The x- and y-Coordinates of the cities."));
+      Parameters.Add(new LookupParameter<BoolMatrix>("World", "The world with food items for the artificial ant."));
       Parameters.Add(new SubScopesLookupParameter<SymbolicExpressionTree>("SymbolicExpressionTree", "The artificial ant solutions from which the best solution should be visualized."));
       Parameters.Add(new SubScopesLookupParameter<DoubleValue>("Quality", "The qualities of the artificial ant solutions which should be visualized."));
       Parameters.Add(new LookupParameter<AntTrail>("AntTrail", "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."));
     }
 
@@ -60,11 +68,15 @@
       ItemArray<SymbolicExpressionTree> expressions = SymbolicExpressionTreeParameter.ActualValue;
       ItemArray<DoubleValue> qualities = QualityParameter.ActualValue;
+      BoolMatrix world = WorldParameter.ActualValue;
+      IntValue maxTimeSteps = MaxTimeStepsParameter.ActualValue;
 
       int i = qualities.Select((x, index) => new { index, x.Value }).OrderBy(x => -x.Value).First().index;
 
       AntTrail antTrail = AntTrailParameter.ActualValue;
-      if (antTrail == null) AntTrailParameter.ActualValue = new AntTrail(expressions[i]);
+      if (antTrail == null) AntTrailParameter.ActualValue = new AntTrail(world, expressions[i], maxTimeSteps);
       else {
+        antTrail.World = world;
         antTrail.SymbolicExpressionTree = expressions[i];
+        antTrail.MaxTimeSteps = maxTimeSteps;
       }
       return base.Apply();
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Evaluator.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Evaluator.cs	(revision 3238)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/Evaluator.cs	(revision 3239)
@@ -40,16 +40,29 @@
       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"]; }
+    }
+
     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;
 
-      SymbolicExpressionTree solution = SymbolicExpressionTreeParameter.ActualValue;
       AntInterpreter interpreter = new AntInterpreter();
-      interpreter.MaxTimeSteps = 600;
-      interpreter.Run(solution);
+      interpreter.MaxTimeSteps = maxTimeSteps.Value;
+      interpreter.World = world;
+      interpreter.Expression = expression;
+      interpreter.Run();
 
       QualityParameter.ActualValue = new DoubleValue(interpreter.FoodEaten);
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/HeuristicLab.Problems.ArtificialAnt-3.3.csproj
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/HeuristicLab.Problems.ArtificialAnt-3.3.csproj	(revision 3238)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/HeuristicLab.Problems.ArtificialAnt-3.3.csproj	(revision 3239)
@@ -71,8 +71,4 @@
     </Reference>
     <Reference Include="System.Drawing" />
-    <Reference Include="System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>..\..\..\..\..\..\Windows\Microsoft.NET\Framework\v2.0.50727\System.Windows.Forms.dll</HintPath>
-    </Reference>
     <Reference Include="System.Xml.Linq">
       <RequiredTargetFramework>3.5</RequiredTargetFramework>
@@ -92,17 +88,5 @@
     <Compile Include="ArtificialAntExpressionGrammar.cs" />
     <Compile Include="ArtificialAntProblem.cs" />
-    <Compile Include="ArtificialAntProblemView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="ArtificialAntProblemView.Designer.cs">
-      <DependentUpon>ArtificialAntProblemView.cs</DependentUpon>
-    </Compile>
     <Compile Include="AntTrail.cs" />
-    <Compile Include="AntTrailView.cs">
-      <SubType>UserControl</SubType>
-    </Compile>
-    <Compile Include="AntTrailView.Designer.cs">
-      <DependentUpon>AntTrailView.cs</DependentUpon>
-    </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="Symbols\IfFoodAhead.cs" />
@@ -130,8 +114,4 @@
       <Name>HeuristicLab.Common-3.2</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Core.Views\3.3\HeuristicLab.Core.Views-3.3.csproj">
-      <Project>{E226881D-315F-423D-B419-A766FE0D8685}</Project>
-      <Name>HeuristicLab.Core.Views-3.3</Name>
-    </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
       <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
@@ -146,19 +126,7 @@
       <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3</Name>
     </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.2\HeuristicLab.MainForm.WindowsForms-3.2.csproj">
-      <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
-      <Name>HeuristicLab.MainForm.WindowsForms-3.2</Name>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.MainForm\3.2\HeuristicLab.MainForm-3.2.csproj">
-      <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>
-      <Name>HeuristicLab.MainForm-3.2</Name>
-    </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>
-    </ProjectReference>
-    <ProjectReference Include="..\..\HeuristicLab.Optimization.Views\3.3\HeuristicLab.Optimization.Views-3.3.csproj">
-      <Project>{662B4B15-8F4D-4AE5-B3EB-D91C215F5AF2}</Project>
-      <Name>HeuristicLab.Optimization.Views-3.3</Name>
     </ProjectReference>
     <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/HeuristicLabProblemsArtificialAntPlugin.cs.frame
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/HeuristicLabProblemsArtificialAntPlugin.cs.frame	(revision 3238)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/HeuristicLabProblemsArtificialAntPlugin.cs.frame	(revision 3239)
@@ -33,6 +33,6 @@
   [PluginDependency("HeuristicLab.Data", "3.3.0.0")]
   [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","3.3.0.0")]
+  [PluginDependency("HeuristicLab.Operators", "3.3.0.0")]
   [PluginDependency("HeuristicLab.Optimization", "3.3.0.0")]
-  [PluginDependency("HeuristicLab.Operators", "3.3.0.0")]
   [PluginDependency("HeuristicLab.Parameters", "3.3.0.0")]
   [PluginDependency("HeuristicLab.Persistence", "3.3.0.0")]
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/IAntTrailVisualizer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/IAntTrailVisualizer.cs	(revision 3238)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt/3.3/IAntTrailVisualizer.cs	(revision 3239)
@@ -24,8 +24,11 @@
 using HeuristicLab.Optimization;
 using HeuristicLab.Core;
+using HeuristicLab.Data;
 
 namespace HeuristicLab.Problems.ArtificialAnt {
   public interface IAntTrailVisualizer : ISolutionsVisualizer, ISingleObjectiveSolutionsVisualizer {
     ILookupParameter<ItemArray<SymbolicExpressionTree>> SymbolicExpressionTreeParameter { get; }
+    ILookupParameter<BoolMatrix> WorldParameter { get; }
+    ILookupParameter<IntValue> MaxTimeStepsParameter { get; }
   }
 }
Index: trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/PathTSPTour.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/PathTSPTour.cs	(revision 3238)
+++ trunk/sources/HeuristicLab.Problems.TravelingSalesman/3.3/PathTSPTour.cs	(revision 3239)
@@ -82,11 +82,13 @@
     public event EventHandler CoordinatesChanged;
     private void OnCoordinatesChanged() {
-      if (CoordinatesChanged != null)
-        CoordinatesChanged(this, EventArgs.Empty);
+      var changed = CoordinatesChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
     }
     public event EventHandler PermutationChanged;
     private void OnPermutationChanged() {
-      if (PermutationChanged != null)
-        PermutationChanged(this, EventArgs.Empty);
+      var changed = PermutationChanged;
+      if (changed != null)
+        changed(this, EventArgs.Empty);
     }
 
