Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailSymbolicExpressionTreeView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailSymbolicExpressionTreeView.Designer.cs	(revision 5809)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailSymbolicExpressionTreeView.Designer.cs	(revision 5809)
@@ -0,0 +1,86 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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 AntTrailSymbolicExpressionTreeView {
+    /// <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.animationTimer = new System.Windows.Forms.Timer(this.components);
+      this.symExpressionGroupBox = new System.Windows.Forms.GroupBox();
+      this.SuspendLayout();
+      // 
+      // animationTimer
+      // 
+      this.animationTimer.Interval = 15;
+      // 
+      // symExpressionGroupBox
+      // 
+      this.symExpressionGroupBox.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.symExpressionGroupBox.Location = new System.Drawing.Point(3, 3);
+      this.symExpressionGroupBox.Name = "symExpressionGroupBox";
+      this.symExpressionGroupBox.Size = new System.Drawing.Size(386, 304);
+      this.symExpressionGroupBox.TabIndex = 0;
+      this.symExpressionGroupBox.TabStop = false;
+      this.symExpressionGroupBox.Text = "Symbolic Expression Tree";
+      // 
+      // AntTrailSymbolicExpressionTreeView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
+      this.Controls.Add(this.symExpressionGroupBox);
+      this.Name = "AntTrailSymbolicExpressionTreeView";
+      this.Size = new System.Drawing.Size(392, 310);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.Timer animationTimer;
+    private System.Windows.Forms.GroupBox symExpressionGroupBox;
+
+
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailSymbolicExpressionTreeView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailSymbolicExpressionTreeView.cs	(revision 5809)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailSymbolicExpressionTreeView.cs	(revision 5809)
@@ -0,0 +1,71 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Problems.ArtificialAnt.Views {
+  [View("Artificial Ant Symbolic Expression Tree View")]
+  [Content(typeof(AntTrail), false)]
+  public sealed partial class AntTrailSymbolicExpressionTreeView : ItemView {
+    private GraphicalSymbolicExpressionTreeView treeView;
+
+    public new AntTrail Content {
+      get { return (AntTrail)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public AntTrailSymbolicExpressionTreeView() {
+      InitializeComponent();
+      treeView = new GraphicalSymbolicExpressionTreeView();
+      treeView.Dock = DockStyle.Fill;
+      symExpressionGroupBox.Controls.Add(treeView);
+    }
+
+    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) {
+        treeView.Content = null;
+      } else {
+        treeView.Content = Content.SymbolicExpressionTree;
+      }
+    }
+
+    void Content_SymbolicExpressionTreeChanged(object sender, EventArgs e) {
+      if (InvokeRequired)
+        Invoke(new EventHandler(Content_SymbolicExpressionTreeChanged), sender, e);
+      else
+        OnContentChanged();
+    }
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailSymbolicExpressionTreeView.resx
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailSymbolicExpressionTreeView.resx	(revision 5809)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailSymbolicExpressionTreeView.resx	(revision 5809)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="animationTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+</root>
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailView.Designer.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailView.Designer.cs	(revision 5809)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailView.Designer.cs	(revision 5809)
@@ -0,0 +1,105 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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);
+      ((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.4/AntTrailView.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailView.cs	(revision 5809)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/AntTrailView.cs	(revision 5809)
@@ -0,0 +1,218 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.Drawing;
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.MainForm;
+
+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();
+    }
+
+    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();
+      this.playButton.Enabled = Content != null && !Locked;
+      GenerateImage();
+    }
+
+    protected override void OnLockedChanged() {
+      this.playButton.Enabled = Content != null && !Locked;
+      base.OnLockedChanged();
+    }
+
+    private void GenerateImage() {
+      animationTimer.Stop();
+      pictureBox.Image = null;
+      if ((pictureBox.Width > 0) && (pictureBox.Height > 0)) {
+        if (Content != null) {
+          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 = true;
+        }
+      }
+    }
+    #endregion
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/HeuristicLab.Problems.ArtificialAnt.Views-3.4.csproj
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/HeuristicLab.Problems.ArtificialAnt.Views-3.4.csproj	(revision 5809)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/HeuristicLab.Problems.ArtificialAnt.Views-3.4.csproj	(revision 5809)
@@ -0,0 +1,220 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>9.0.30729</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{3083C7AA-5AF4-4C75-BA19-B69B86E2F66A}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.ArtificialAnt.Views</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.ArtificialAnt.Views-3.4</AssemblyName>
+    <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>bin\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x64\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>bin\x64\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>bin\x86\Debug\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>bin\x86\Release\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.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="AntTrailSymbolicExpressionTreeView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="AntTrailSymbolicExpressionTreeView.Designer.cs">
+      <DependentUpon>AntTrailSymbolicExpressionTreeView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="HeuristicLabProblemsArtificialAntViewsPlugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="HeuristicLabProblemsArtificialAntViewsPlugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</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>
+      <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.Views\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4.csproj">
+      <Project>{423BD94F-963A-438E-BA45-3BB3D61CD03B}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
+      <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
+      <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
+      <Name>HeuristicLab.MainForm.WindowsForms-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.MainForm\3.3\HeuristicLab.MainForm-3.3.csproj">
+      <Project>{3BD61258-31DA-4B09-89C0-4F71FEF5F05A}</Project>
+      <Name>HeuristicLab.MainForm-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">
+      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.ArtificialAnt\3.4\HeuristicLab.Problems.ArtificialAnt-3.4.csproj">
+      <Project>{0C67A033-F6D9-4237-B3CA-C033A44706BE}</Project>
+      <Name>HeuristicLab.Problems.ArtificialAnt-3.4</Name>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <EmbeddedResource Include="AntTrailSymbolicExpressionTreeView.resx">
+      <DependentUpon>AntTrailSymbolicExpressionTreeView.cs</DependentUpon>
+    </EmbeddedResource>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent>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.4/HeuristicLabProblemsArtificialAntViewsPlugin.cs.frame
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/HeuristicLabProblemsArtificialAntViewsPlugin.cs.frame	(revision 5809)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/HeuristicLabProblemsArtificialAntViewsPlugin.cs.frame	(revision 5809)
@@ -0,0 +1,40 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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.4.0.$WCREV$")]
+  [PluginFile("HeuristicLab.Problems.ArtificialAnt.Views-3.4.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Core", "3.3.3.0")]
+  [PluginDependency("HeuristicLab.Core.Views", "3.3.3.0")]
+  [PluginDependency("HeuristicLab.Data", "3.3.3.0")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","3.4.0.0")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views","3.4.0.0")]
+  [PluginDependency("HeuristicLab.MainForm", "3.3.3.0")]
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3.3.0")]
+  [PluginDependency("HeuristicLab.Problems.ArtificialAnt", "3.4.0.0")]
+  public class HeuristicLabProblemsArtificialAntViewsPlugin : PluginBase {
+  }
+}
Index: trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/Properties/AssemblyInfo.frame
===================================================================
--- trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/Properties/AssemblyInfo.frame	(revision 5809)
+++ trunk/sources/HeuristicLab.Problems.ArtificialAnt.Views/3.4/Properties/AssemblyInfo.frame	(revision 5809)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2011 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-2011 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("F78103ED-A841-40AF-8216-EBB725E0EA42")]
+
+// Version information for an assembly consists of the following four values:
+//
+//      Major Version
+//      Minor Version 
+//      Build Number
+//      Revision
+//
+// You can specify all the values or you can default the Revision and Build Numbers 
+// by using the '*' as shown below:
+[assembly: AssemblyVersion("3.4.0.0")]
+[assembly: AssemblyFileVersion("3.4.0.$WCREV$")]
