Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/ArtificialAnt/SolutionProgramView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/ArtificialAnt/SolutionProgramView.Designer.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/ArtificialAnt/SolutionProgramView.Designer.cs	(revision 12911)
@@ -0,0 +1,81 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.GeneticProgramming.Views.ArtificialAnt {
+  partial class SolutionProgramView {
+    /// <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.symExpressionGroupBox = new System.Windows.Forms.GroupBox();
+      this.SuspendLayout();
+
+      // 
+      // 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.Inherit;
+      this.Controls.Add(this.symExpressionGroupBox);
+      this.Name = "SolutionProgramView";
+      this.Size = new System.Drawing.Size(392, 310);
+      this.ResumeLayout(false);
+
+    }
+
+    #endregion
+
+    private System.Windows.Forms.GroupBox symExpressionGroupBox;
+
+
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/ArtificialAnt/SolutionProgramView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/ArtificialAnt/SolutionProgramView.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/ArtificialAnt/SolutionProgramView.cs	(revision 12911)
@@ -0,0 +1,56 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.Problems.GeneticProgramming.ArtificialAnt;
+
+namespace HeuristicLab.Problems.GeneticProgramming.Views.ArtificialAnt {
+  [View("Artificial Ant Program View")]
+  [Content(typeof(Solution), false)]
+  public sealed partial class SolutionProgramView : ItemView {
+    private readonly GraphicalSymbolicExpressionTreeView treeView;
+
+    public new Solution Content {
+      get { return (Solution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public SolutionProgramView() {
+      InitializeComponent();
+      treeView = new GraphicalSymbolicExpressionTreeView();
+      treeView.Dock = DockStyle.Fill;
+      symExpressionGroupBox.Controls.Add(treeView);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        treeView.Content = null;
+      } else {
+        treeView.Content = Content.SymbolicExpressionTree;
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/ArtificialAnt/SolutionView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/ArtificialAnt/SolutionView.Designer.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/ArtificialAnt/SolutionView.Designer.cs	(revision 12911)
@@ -0,0 +1,105 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+namespace HeuristicLab.Problems.GeneticProgramming.Views.ArtificialAnt {
+  partial class SolutionView {
+    /// <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.Inherit;
+      this.Controls.Add(this.playButton);
+      this.Controls.Add(this.pictureBox);
+      this.Name = "SolutionView";
+      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.GeneticProgramming.Views/3.3/ArtificialAnt/SolutionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/ArtificialAnt/SolutionView.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/ArtificialAnt/SolutionView.cs	(revision 12911)
@@ -0,0 +1,193 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Drawing;
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.MainForm;
+using HeuristicLab.Problems.GeneticProgramming.ArtificialAnt;
+
+namespace HeuristicLab.Problems.GeneticProgramming.Views.ArtificialAnt {
+  [View("Artificial Ant Trail View")]
+  [Content(typeof(Solution), true)]
+  public sealed partial class SolutionView : ItemView {
+    public new Solution Content {
+      get { return (Solution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public SolutionView() {
+      InitializeComponent();
+    }
+
+    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;
+          var expression = Content.SymbolicExpressionTree;
+
+          DrawWorld();
+          using (Graphics graphics = Graphics.FromImage(pictureBox.Image)) {
+            float cellHeight = pictureBox.Height / (float)rows;
+            float cellWidth = pictureBox.Width / (float)columns;
+
+            Interpreter interpreter = new Interpreter(Content.SymbolicExpressionTree, Content.World, Content.MaxTimeSteps);
+            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);
+    }
+
+    private void pictureBox_SizeChanged(object sender, EventArgs e) {
+      GenerateImage();
+    }
+
+    #region animation
+    private Interpreter animationInterpreter;
+    private void playButton_Click(object sender, EventArgs e) {
+      playButton.Enabled = false;
+
+      animationInterpreter = new Interpreter(Content.SymbolicExpressionTree, Content.World, Content.MaxTimeSteps);
+
+      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.GeneticProgramming.Views/3.3/HeuristicLab.Problems.GeneticProgramming.Views-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/HeuristicLab.Problems.GeneticProgramming.Views-3.3.csproj	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/HeuristicLab.Problems.GeneticProgramming.Views-3.3.csproj	(revision 12911)
@@ -0,0 +1,233 @@
+﻿<?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>{26349C8D-72A1-4BAE-95A3-14E96A3B4AE8}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.GeneticProgramming.Views</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.GeneticProgramming.Views-3.3</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+    <Reference Include="System.Windows.Forms" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ArtificialAnt\SolutionProgramView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="ArtificialAnt\SolutionProgramView.Designer.cs">
+      <DependentUpon>SolutionProgramView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="ArtificialAnt\SolutionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="ArtificialAnt\SolutionView.Designer.cs">
+      <DependentUpon>SolutionView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="LawnMower\SolutionProgramView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="LawnMower\SolutionProgramView.Designer.cs">
+      <DependentUpon>SolutionProgramView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="LawnMower\SolutionView.cs">
+      <SubType>UserControl</SubType>
+    </Compile>
+    <Compile Include="LawnMower\SolutionView.Designer.cs">
+      <DependentUpon>SolutionView.cs</DependentUpon>
+    </Compile>
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.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>
+      <Private>False</Private>
+    </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>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.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>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
+      <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.MainForm.WindowsForms\3.3\HeuristicLab.MainForm.WindowsForms-3.3.csproj">
+      <Project>{AB687BBE-1BFE-476B-906D-44237135431D}</Project>
+      <Name>HeuristicLab.MainForm.WindowsForms-3.3</Name>
+      <Private>False</Private>
+    </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>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186a6a-5176-4402-ae83-886557b53cca}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Problems.GeneticProgramming\3.3\HeuristicLab.Problems.GeneticProgramming-3.3.csproj">
+      <Project>{02cddbf5-42a7-4c40-ae6c-e5d29ac9ccec}</Project>
+      <Name>HeuristicLab.Problems.GeneticProgramming-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+export ProjectDir=$(ProjectDir)
+export SolutionDir=$(SolutionDir)
+
+$SolutionDir/PreBuildEvent.sh
+</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/LawnMower/SolutionProgramView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/LawnMower/SolutionProgramView.Designer.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/LawnMower/SolutionProgramView.Designer.cs	(revision 12911)
@@ -0,0 +1,68 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Problems.GeneticProgramming.Views.LawnMower {
+  partial class SolutionProgramView {
+    private Panel panel;
+    private GraphicalSymbolicExpressionTreeView graphTreeView;
+
+    private void InitializeComponent() {
+      this.panel = new System.Windows.Forms.Panel();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      // 
+      // panel
+      // 
+      this.panel.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.panel.Location = new System.Drawing.Point(3, 26);
+      this.panel.Name = "panel";
+      this.panel.Size = new System.Drawing.Size(345, 190);
+      this.panel.TabIndex = 3;
+      // 
+      // SolutionProgramView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.Controls.Add(this.panel);
+      this.Name = "SolutionProgramView";
+      this.Size = new System.Drawing.Size(351, 219);
+      this.Controls.SetChildIndex(this.panel, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/LawnMower/SolutionProgramView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/LawnMower/SolutionProgramView.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/LawnMower/SolutionProgramView.cs	(revision 12911)
@@ -0,0 +1,53 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.Problems.GeneticProgramming.LawnMower;
+
+namespace HeuristicLab.Problems.GeneticProgramming.Views.LawnMower {
+  [View("Lawn Mower Program View")]
+  [Content(typeof(Solution), IsDefaultView = false)]
+  public sealed partial class SolutionProgramView : NamedItemView {
+    public new Solution Content {
+      get { return (Solution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public SolutionProgramView() {
+      InitializeComponent();
+      this.graphTreeView = new GraphicalSymbolicExpressionTreeView();
+      graphTreeView.Dock = DockStyle.Fill;
+      panel.Controls.Add(graphTreeView);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        graphTreeView.Content = null;
+      } else {
+        graphTreeView.Content = Content.Tree;
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/LawnMower/SolutionView.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/LawnMower/SolutionView.Designer.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/LawnMower/SolutionView.Designer.cs	(revision 12911)
@@ -0,0 +1,96 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+
+namespace HeuristicLab.Problems.GeneticProgramming.Views.LawnMower {
+  partial class SolutionView : NamedItemView {
+    private PictureBox pictureBox;
+    private System.Windows.Forms.GroupBox groupBox;
+
+
+    private void InitializeComponent() {
+      this.groupBox = new System.Windows.Forms.GroupBox();
+      this.pictureBox = new System.Windows.Forms.PictureBox();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      this.groupBox.SuspendLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).BeginInit();
+      this.SuspendLayout();
+      // 
+      // nameTextBox
+      // 
+      this.errorProvider.SetIconAlignment(this.nameTextBox, System.Windows.Forms.ErrorIconAlignment.MiddleLeft);
+      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
+      this.nameTextBox.Size = new System.Drawing.Size(270, 20);
+      // 
+      // infoLabel
+      // 
+      this.infoLabel.Location = new System.Drawing.Point(334, 3);
+      // 
+      // groupBox
+      // 
+      this.groupBox.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.groupBox.Controls.Add(this.pictureBox);
+      this.groupBox.Location = new System.Drawing.Point(3, 26);
+      this.groupBox.Name = "groupBox";
+      this.groupBox.Size = new System.Drawing.Size(347, 232);
+      this.groupBox.TabIndex = 3;
+      this.groupBox.TabStop = false;
+      this.groupBox.Text = "Lawn mower solution";
+      // 
+      // 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.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None;
+      this.pictureBox.Location = new System.Drawing.Point(6, 19);
+      this.pictureBox.Name = "pictureBox";
+      this.pictureBox.Size = new System.Drawing.Size(335, 207);
+      this.pictureBox.SizeMode = System.Windows.Forms.PictureBoxSizeMode.Zoom;
+      this.pictureBox.TabIndex = 0;
+      this.pictureBox.TabStop = false;
+      // 
+      // SolutionView
+      // 
+      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
+      this.Controls.Add(this.groupBox);
+      this.Name = "SolutionView";
+      this.Size = new System.Drawing.Size(353, 261);
+      this.Controls.SetChildIndex(this.groupBox, 0);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.groupBox.ResumeLayout(false);
+      ((System.ComponentModel.ISupportInitialize)(this.pictureBox)).EndInit();
+      this.ResumeLayout(false);
+      this.PerformLayout();
+
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/LawnMower/SolutionView.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/LawnMower/SolutionView.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/LawnMower/SolutionView.cs	(revision 12911)
@@ -0,0 +1,77 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Drawing;
+using System.Windows.Forms;
+using HeuristicLab.Core.Views;
+using HeuristicLab.MainForm;
+using HeuristicLab.Problems.GeneticProgramming.LawnMower;
+
+namespace HeuristicLab.Problems.GeneticProgramming.Views.LawnMower {
+  [View("Lawn Mower View")]
+  [Content(typeof(Solution), IsDefaultView = true)]
+  public sealed partial class SolutionView : NamedItemView {
+    public new Solution Content {
+      get { return (Solution)base.Content; }
+      set { base.Content = value; }
+    }
+
+    public SolutionView()
+      : base() {
+      InitializeComponent();
+      pictureBox.Image = new Bitmap(200, 200);
+    }
+
+    protected override void OnContentChanged() {
+      base.OnContentChanged();
+      if (Content == null) {
+        using (var g = Graphics.FromImage(pictureBox.Image))
+          g.Clear(DefaultBackColor);
+      } else {
+        bool[,] lawn = Interpreter.EvaluateLawnMowerProgram(Content.Length, Content.Width, Content.Tree);
+        PaintTiles(pictureBox.Image, lawn);
+      }
+    }
+
+    private void PaintTiles(Image lawnImage, bool[,] mowed) {
+      int w = lawnImage.Width;
+      int h = lawnImage.Height;
+
+      float tileHeight = h / (float)mowed.GetLength(0);
+      float tileWidth = w / (float)mowed.GetLength(1);
+
+      tileWidth = Math.Min(tileWidth, tileHeight);
+      tileHeight = tileWidth; // draw square tiles
+
+      using (var g = Graphics.FromImage(lawnImage)) {
+        g.Clear(DefaultBackColor);
+        for (int i = 0; i < Content.Length; i++)
+          for (int j = 0; j < Content.Width; j++)
+            if (mowed[i, j]) {
+              g.FillRectangle(Brushes.Chartreuse, tileWidth * j, tileHeight * i, tileWidth, tileHeight);
+            } else {
+              g.FillRectangle(Brushes.DarkGreen, tileWidth * j, tileHeight * i, tileWidth, tileHeight);
+            }
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/Plugin.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/Plugin.cs.frame	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/Plugin.cs.frame	(revision 12911)
@@ -0,0 +1,41 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.GeneticProgramming.Views {
+  [Plugin("HeuristicLab.Problems.GeneticProgramming.Views","Provides views for for genetic programming problems such as the artificial ant problem.", "3.3.0.$WCREV$")]
+  [PluginFile("HeuristicLab.Problems.GeneticProgramming.Views-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Common","3.3")]
+  [PluginDependency("HeuristicLab.Core","3.3")]
+  [PluginDependency("HeuristicLab.Core.Views","3.3")]
+  [PluginDependency("HeuristicLab.Data","3.3")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","3.4")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views","3.4")]
+  [PluginDependency("HeuristicLab.MainForm","3.3")]
+  [PluginDependency("HeuristicLab.MainForm.WindowsForms","3.3")]
+  [PluginDependency("HeuristicLab.Problems.GeneticProgramming","3.3")]
+  public class HeuristicLabProblemsGeneticProgrammingViewsPlugin : PluginBase {
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/Properties/AssemblyInfo.cs.frame	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming.Views/3.3/Properties/AssemblyInfo.cs.frame	(revision 12911)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using 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.GeneticProgramming.Views")]
+[assembly: AssemblyDescription("Provides views for genetic programming problems such as the artificial ant problem.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2015 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("76E5DE50-FF82-417F-AD70-035023CB386F")]
+
+// 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.GeneticProgramming/3.3/ArtificialAnt/Interpreter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Interpreter.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Interpreter.cs	(revision 12911)
@@ -0,0 +1,166 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.GeneticProgramming.ArtificialAnt {
+  public class Interpreter {
+
+    public int MaxTimeSteps { get; private set; }
+    public int FoodEaten { get; private set; }
+    public BoolMatrix World { get; private set; }
+
+    public ISymbolicExpressionTree Expression { get; private set; }
+
+
+    public int ElapsedTime { get; set; }
+    private int currentDirection;
+    private int currentAntLocationRow;
+    private int currentAntLocationColumn;
+    private int nFoodItems;
+    private Stack<ISymbolicExpressionTreeNode> nodeStack = new Stack<ISymbolicExpressionTreeNode>();
+
+    public Interpreter(ISymbolicExpressionTree tree, BoolMatrix world, int maxTimeSteps) {
+      this.Expression = tree;
+      this.MaxTimeSteps = maxTimeSteps;
+      // create a clone of the world because the ant will remove the food items it can find.
+      World = (BoolMatrix)world.Clone();
+      CountFoodItems();
+    }
+
+    private void CountFoodItems() {
+      nFoodItems = 0;
+      for (int i = 0; i < World.Rows; i++) {
+        for (int j = 0; j < World.Columns; j++) {
+          if (World[i, j]) nFoodItems++;
+        }
+      }
+    }
+
+    public void AntLocation(out int row, out int column) {
+      row = currentAntLocationRow;
+      column = currentAntLocationColumn;
+    }
+
+    public int AntDirection {
+      get { return currentDirection; }
+    }
+
+    public void Run() {
+      while (ElapsedTime < MaxTimeSteps && FoodEaten < nFoodItems) {
+        Step();
+      }
+    }
+
+    public void Step() {
+      // expression evaluated completly => start at root again
+      if (nodeStack.Count == 0) {
+        nodeStack.Push(Expression.Root.GetSubtree(0).GetSubtree(0));
+      }
+
+      var currentNode = nodeStack.Pop();
+      if (currentNode.Symbol.Name == "Left") {
+        currentDirection = (currentDirection + 3) % 4;
+        ElapsedTime++;
+      } else if (currentNode.Symbol.Name == "Right") {
+        currentDirection = (currentDirection + 1) % 4;
+        ElapsedTime++;
+      } else if (currentNode.Symbol.Name == "Move") {
+        MoveAntForward();
+        if (World[currentAntLocationRow, currentAntLocationColumn]) {
+          FoodEaten++;
+          World[currentAntLocationRow, currentAntLocationColumn] = false;
+        }
+        ElapsedTime++;
+      } else if (currentNode.Symbol.Name == "IfFoodAhead") {
+        int nextAntLocationRow;
+        int nextAntLocationColumn;
+        NextField(out nextAntLocationRow, out nextAntLocationColumn);
+        if (World[nextAntLocationRow, nextAntLocationColumn]) {
+          nodeStack.Push(currentNode.GetSubtree(0));
+        } else {
+          nodeStack.Push(currentNode.GetSubtree(1));
+        }
+      } else if (currentNode.Symbol.Name == "Prog2") {
+        nodeStack.Push(currentNode.GetSubtree(1));
+        nodeStack.Push(currentNode.GetSubtree(0));
+      } else if (currentNode.Symbol.Name == "Prog3") {
+        nodeStack.Push(currentNode.GetSubtree(2));
+        nodeStack.Push(currentNode.GetSubtree(1));
+        nodeStack.Push(currentNode.GetSubtree(0));
+      } else if (currentNode.Symbol is InvokeFunction) {
+        var invokeNode = currentNode as InvokeFunctionTreeNode;
+        var functionDefinition = (SymbolicExpressionTreeNode)FindMatchingFunction(invokeNode.Symbol.FunctionName).Clone();
+        var argumentCutPoints = (from node in functionDefinition.IterateNodesPrefix()
+                                 where node.Subtrees.Count() > 0
+                                 from subtree in node.Subtrees
+                                 where subtree is ArgumentTreeNode
+                                 select new { Parent = node, Argument = subtree.Symbol as Argument, ChildIndex = node.IndexOfSubtree(subtree) }).ToList();
+        foreach (var cutPoint in argumentCutPoints) {
+          cutPoint.Parent.RemoveSubtree(cutPoint.ChildIndex);
+          cutPoint.Parent.InsertSubtree(cutPoint.ChildIndex, (SymbolicExpressionTreeNode)invokeNode.GetSubtree(cutPoint.Argument.ArgumentIndex).Clone());
+        }
+        nodeStack.Push(functionDefinition.GetSubtree(0));
+      } else {
+        throw new InvalidOperationException(currentNode.Symbol.ToString());
+      }
+    }
+
+    private void MoveAntForward() {
+      NextField(out currentAntLocationRow, out currentAntLocationColumn);
+    }
+
+    private void NextField(out int nextAntLocationRow, out int nextAntLocationColumn) {
+      switch (currentDirection) {
+        case 0:
+          nextAntLocationColumn = (currentAntLocationColumn + 1) % World.Columns; // EAST
+          nextAntLocationRow = currentAntLocationRow;
+          break;
+        case 1:
+          nextAntLocationRow = (currentAntLocationRow + 1) % World.Rows; // SOUTH
+          nextAntLocationColumn = currentAntLocationColumn;
+          break;
+        case 2:
+          nextAntLocationColumn = (currentAntLocationColumn + World.Columns - 1) % World.Columns; // WEST
+          nextAntLocationRow = currentAntLocationRow;
+          break;
+        case 3:
+          nextAntLocationRow = (currentAntLocationRow + World.Rows - 1) % World.Rows; // NORTH
+          nextAntLocationColumn = currentAntLocationColumn;
+          break;
+        default:
+          throw new InvalidOperationException();
+      }
+    }
+
+
+    private SymbolicExpressionTreeNode FindMatchingFunction(string name) {
+      foreach (var defunBranch in Expression.Root.Subtrees.OfType<DefunTreeNode>()) {
+        if (defunBranch.FunctionName == name) return defunBranch;
+      }
+      throw new ArgumentException("Function definition for " + name + " not found.");
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Problem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Problem.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Problem.cs	(revision 12911)
@@ -0,0 +1,169 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Diagnostics.Contracts;
+using System.Drawing.Text;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+
+namespace HeuristicLab.Problems.GeneticProgramming.ArtificialAnt {
+  [Item("Artificial Ant Problem", "Represents the Artificial Ant problem.")]
+  [Creatable(CreatableAttribute.Categories.GeneticProgrammingProblems, Priority = 170)]
+  [StorableClass]
+  public sealed class Problem : SymbolicExpressionTreeProblem, IStorableContent {
+    public string Filename { get; set; }
+
+    #region constant for default world (Santa Fe)
+
+    private static readonly char[][] santaFeAntTrail = new[] {
+      " ###                            ".ToCharArray(),
+      "   #                            ".ToCharArray(),
+      "   #                    .###..  ".ToCharArray(),
+      "   #                    #    #  ".ToCharArray(),
+      "   #                    #    #  ".ToCharArray(),
+      "   ####.#####       .##..    .  ".ToCharArray(),
+      "            #       .        #  ".ToCharArray(),
+      "            #       #        .  ".ToCharArray(),
+      "            #       #        .  ".ToCharArray(),
+      "            #       #        #  ".ToCharArray(),
+      "            .       #        .  ".ToCharArray(),
+      "            #       .        .  ".ToCharArray(),
+      "            #       .        #  ".ToCharArray(),
+      "            #       #        .  ".ToCharArray(),
+      "            #       #  ...###.  ".ToCharArray(),
+      "            .   .#...  #        ".ToCharArray(),
+      "            .   .      .        ".ToCharArray(),
+      "            #   .      .        ".ToCharArray(),
+      "            #   #      .#...    ".ToCharArray(),
+      "            #   #          #    ".ToCharArray(),
+      "            #   #          .    ".ToCharArray(),
+      "            #   #          .    ".ToCharArray(),
+      "            #   .      ...#.    ".ToCharArray(),
+      "            #   .      #        ".ToCharArray(),
+      " ..##..#####.   #               ".ToCharArray(),
+      " #              #               ".ToCharArray(),
+      " #              #               ".ToCharArray(),
+      " #     .#######..               ".ToCharArray(),
+      " #     #                        ".ToCharArray(),
+      " .     #                        ".ToCharArray(),
+      " .####..                        ".ToCharArray(),
+      "                                ".ToCharArray()
+    };
+
+
+    #endregion
+
+    #region Parameter Properties
+    public IValueParameter<BoolMatrix> WorldParameter {
+      get { return (IValueParameter<BoolMatrix>)Parameters["World"]; }
+    }
+    public IValueParameter<IntValue> MaxTimeStepsParameter {
+      get { return (IValueParameter<IntValue>)Parameters["MaximumTimeSteps"]; }
+    }
+    #endregion
+
+    #region Properties
+    public BoolMatrix World {
+      get { return WorldParameter.Value; }
+      set { WorldParameter.Value = value; }
+    }
+    public IntValue MaxTimeSteps {
+      get { return MaxTimeStepsParameter.Value; }
+      set { MaxTimeStepsParameter.Value = value; }
+    }
+    #endregion
+
+    public override bool Maximization {
+      get { return true; }
+    }
+
+    public Problem()
+      : base() {
+      BoolMatrix world = new BoolMatrix(ToBoolMatrix(santaFeAntTrail));
+      Parameters.Add(new ValueParameter<BoolMatrix>("World", "The world for the artificial ant with scattered food items.", world));
+      Parameters.Add(new ValueParameter<IntValue>("MaximumTimeSteps", "The number of time steps the artificial ant has available to collect all food items.", new IntValue(600)));
+
+      base.BestKnownQuality = 89;
+      var g = new SimpleSymbolicExpressionGrammar();
+      g.AddSymbols(new string[] { "IfFoodAhead", "Prog2" }, 2, 2);
+      g.AddSymbols(new string[] { "Prog3" }, 3, 3);
+      g.AddTerminalSymbols(new string[] { "Left", "Right", "Move" });
+      base.Encoding = new SymbolicExpressionTreeEncoding(g, 20, 10);
+    }
+
+
+    public override double Evaluate(ISymbolicExpressionTree tree, IRandom random) {
+      var interpreter = new Interpreter(tree, World, MaxTimeSteps.Value);
+      interpreter.Run();
+      return interpreter.FoodEaten;
+    }
+
+    public override void Analyze(ISymbolicExpressionTree[] trees, double[] qualities, ResultCollection results, IRandom random) {
+      const string bestSolutionResultName = "Best Solution";
+      var bestQuality = Maximization ? qualities.Max() : qualities.Min();
+      var bestIdx = Array.IndexOf(qualities, bestQuality);
+
+      if (!results.ContainsKey(bestSolutionResultName)) {
+        results.Add(new Result(bestSolutionResultName, new Solution(World, trees[bestIdx], MaxTimeSteps.Value, qualities[bestIdx])));
+      } else if (((Solution)(results[bestSolutionResultName].Value)).Quality < qualities[bestIdx]) {
+        results[bestSolutionResultName].Value = new Solution(World, trees[bestIdx], MaxTimeSteps.Value, qualities[bestIdx]);
+      }
+    }
+
+    // persistence
+    [StorableConstructor]
+    private Problem(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+
+    // cloning 
+    private Problem(Problem original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Problem(this, cloner);
+    }
+
+    #region helpers
+    private bool[,] ToBoolMatrix(char[][] ch) {
+      var rows = ch.Length;
+      var cols = ch[0].Length;
+      var b = new bool[rows, cols];
+      for (int r = 0; r < rows; r++) {
+        Contract.Assert(ch[r].Length == cols); // all rows must have the same number of columns
+        for (int c = 0; c < cols; c++) {
+          b[r, c] = ch[r][c] == '#';
+        }
+      }
+      return b;
+    }
+    #endregion
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Trail.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Trail.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/ArtificialAnt/Trail.cs	(revision 12911)
@@ -0,0 +1,73 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Drawing;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GeneticProgramming.ArtificialAnt {
+  /// <summary>
+  /// Represents a trail of an artificial ant which can be visualized in the GUI.
+  /// </summary>
+  [Item("AntTrail", "Represents a trail of an artificial ant which can be visualized in the GUI.")]
+  [StorableClass]
+  public sealed class Solution : Item {
+    public static new Image StaticItemImage {
+      get { return HeuristicLab.Common.Resources.VSImageLibrary.Image; }
+    }
+    [Storable]
+    public ISymbolicExpressionTree SymbolicExpressionTree { get; private set; }
+    [Storable]
+    public BoolMatrix World { get; private set; }
+    [Storable]
+    public int MaxTimeSteps { get; private set; }
+    [Storable]
+    public double Quality { get; private set; }
+
+    public Solution(BoolMatrix world, ISymbolicExpressionTree expression, int maxTimeSteps, double quality) {
+      this.World = world;
+      this.SymbolicExpressionTree = expression;
+      this.MaxTimeSteps = maxTimeSteps;
+      this.Quality = quality;
+    }
+
+    [StorableConstructor]
+    private Solution(bool deserializing) : base(deserializing) { }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() { }
+
+    private Solution(Solution original, Cloner cloner)
+      : base(original, cloner) {
+      SymbolicExpressionTree = cloner.Clone(original.SymbolicExpressionTree);
+      World = cloner.Clone(original.World);
+      MaxTimeSteps = original.MaxTimeSteps;
+      Quality = original.Quality;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Solution(this, cloner);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/HeuristicLab.Problems.GeneticProgramming-3.3.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/HeuristicLab.Problems.GeneticProgramming-3.3.csproj	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/HeuristicLab.Problems.GeneticProgramming-3.3.csproj	(revision 12911)
@@ -0,0 +1,224 @@
+﻿<?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>{02CDDBF5-42A7-4C40-AE6C-E5D29AC9CCEC}</ProjectGuid>
+    <OutputType>Library</OutputType>
+    <AppDesignerFolder>Properties</AppDesignerFolder>
+    <RootNamespace>HeuristicLab.Problems.GeneticProgramming</RootNamespace>
+    <AssemblyName>HeuristicLab.Problems.GeneticProgramming-3.3</AssemblyName>
+    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
+    <TargetFrameworkProfile>
+    </TargetFrameworkProfile>
+    <FileAlignment>512</FileAlignment>
+    <SignAssembly>true</SignAssembly>
+    <AssemblyOriginatorKeyFile>HeuristicLab.snk</AssemblyOriginatorKeyFile>
+    <FileUpgradeFlags>
+    </FileUpgradeFlags>
+    <OldToolsVersion>3.5</OldToolsVersion>
+    <UpgradeBackupLocation />
+    <PublishUrl>publish\</PublishUrl>
+    <Install>true</Install>
+    <InstallFrom>Disk</InstallFrom>
+    <UpdateEnabled>false</UpdateEnabled>
+    <UpdateMode>Foreground</UpdateMode>
+    <UpdateInterval>7</UpdateInterval>
+    <UpdateIntervalUnits>Days</UpdateIntervalUnits>
+    <UpdatePeriodically>false</UpdatePeriodically>
+    <UpdateRequired>false</UpdateRequired>
+    <MapFileExtensions>true</MapFileExtensions>
+    <ApplicationRevision>0</ApplicationRevision>
+    <ApplicationVersion>1.0.0.%2a</ApplicationVersion>
+    <IsWebBootstrapper>false</IsWebBootstrapper>
+    <UseApplicationTrust>false</UseApplicationTrust>
+    <BootstrapperEnabled>true</BootstrapperEnabled>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>pdbonly</DebugType>
+    <Optimize>true</Optimize>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x64</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
+    <DebugSymbols>true</DebugSymbols>
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>DEBUG;TRACE</DefineConstants>
+    <DebugType>full</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
+    <OutputPath>$(SolutionDir)\bin\</OutputPath>
+    <DefineConstants>TRACE</DefineConstants>
+    <Optimize>true</Optimize>
+    <DebugType>pdbonly</DebugType>
+    <PlatformTarget>x86</PlatformTarget>
+    <ErrorReport>prompt</ErrorReport>
+    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
+    <Prefer32Bit>false</Prefer32Bit>
+  </PropertyGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="System.Core">
+      <RequiredTargetFramework>3.5</RequiredTargetFramework>
+    </Reference>
+    <Reference Include="System.Drawing" />
+  </ItemGroup>
+  <ItemGroup>
+    <Compile Include="ArtificialAnt\Interpreter.cs" />
+    <Compile Include="ArtificialAnt\Problem.cs" />
+    <Compile Include="ArtificialAnt\Trail.cs" />
+    <Compile Include="LawnMower\Interpreter.cs" />
+    <Compile Include="LawnMower\Problem.cs" />
+    <Compile Include="LawnMower\Solution.cs" />
+    <Compile Include="Plugin.cs" />
+    <Compile Include="Properties\AssemblyInfo.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="HeuristicLab.snk" />
+    <None Include="Plugin.cs.frame" />
+    <None Include="Properties\AssemblyInfo.cs.frame" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">
+      <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>
+      <Name>HeuristicLab.Collections-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">
+      <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>
+      <Name>HeuristicLab.Common.Resources-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">
+      <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>
+      <Name>HeuristicLab.Common-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">
+      <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>
+      <Name>HeuristicLab.Core-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">
+      <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>
+      <Name>HeuristicLab.Data-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj">
+      <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project>
+      <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">
+      <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>
+      <Name>HeuristicLab.Operators-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">
+      <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>
+      <Name>HeuristicLab.Optimization-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">
+      <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>
+      <Name>HeuristicLab.Parameters-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">
+      <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>
+      <Name>HeuristicLab.Persistence-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">
+      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
+      <Name>HeuristicLab.PluginInfrastructure-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
+      <Project>{f4539fb6-4708-40c9-be64-0a1390aea197}</Project>
+      <Name>HeuristicLab.Random-3.3</Name>
+      <Private>False</Private>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <BootstrapperPackage Include="Microsoft.Net.Client.3.5">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
+      <Install>false</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
+      <Visible>False</Visible>
+      <ProductName>.NET Framework 3.5 SP1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+    <BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
+      <Visible>False</Visible>
+      <ProductName>Windows Installer 3.1</ProductName>
+      <Install>true</Install>
+    </BootstrapperPackage>
+  </ItemGroup>
+  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
+       Other similar extension points exist, see Microsoft.Common.targets.
+  <Target Name="BeforeBuild">
+  </Target>
+  <Target Name="AfterBuild">
+  </Target>
+  -->
+  <PropertyGroup>
+    <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">set Path=%25Path%25;$(ProjectDir);$(SolutionDir)
+set ProjectDir=$(ProjectDir)
+set SolutionDir=$(SolutionDir)
+set Outdir=$(Outdir)
+
+call PreBuildEvent.cmd
+</PreBuildEvent>
+    <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+export ProjectDir=$(ProjectDir)
+export SolutionDir=$(SolutionDir)
+
+$SolutionDir/PreBuildEvent.sh
+</PreBuildEvent>
+  </PropertyGroup>
+</Project>
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Interpreter.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Interpreter.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Interpreter.cs	(revision 12911)
@@ -0,0 +1,158 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+
+namespace HeuristicLab.Problems.GeneticProgramming.LawnMower {
+  public class Interpreter {
+    private enum Heading {
+      South,
+      East,
+      North,
+      West
+    };
+
+    private class MowerState {
+      public Heading Heading { get; set; }
+      public Tuple<uint, uint> Position { get; set; }
+      public int Energy { get; set; }
+      public MowerState() {
+        Heading = Heading.South;
+        Position = new Tuple<uint, uint>(0, 0);
+        Energy = 0;
+      }
+    }
+
+
+    public static bool[,] EvaluateLawnMowerProgram(int length, int width, ISymbolicExpressionTree tree) {
+
+      bool[,] lawn = new bool[length, width];
+      var mowerState = new MowerState();
+      mowerState.Heading = Heading.South;
+      mowerState.Energy = length * width * 2;
+      lawn[mowerState.Position.Item1, mowerState.Position.Item2] = true;
+      EvaluateLawnMowerProgram(tree.Root, mowerState, lawn, tree.Root.Subtrees.Skip(1).ToArray());
+      return lawn;
+    }
+
+
+    private static Tuple<int, int> EvaluateLawnMowerProgram(ISymbolicExpressionTreeNode node, MowerState mowerState, bool[,] lawn, IEnumerable<ISymbolicExpressionTreeNode> adfs) {
+      if (mowerState.Energy <= 0) return Tuple.Create(0, 0);
+
+      if (node.Symbol is ProgramRootSymbol) {
+        return EvaluateLawnMowerProgram(node.GetSubtree(0), mowerState, lawn, adfs);
+      } else if (node.Symbol is StartSymbol) {
+        return EvaluateLawnMowerProgram(node.GetSubtree(0), mowerState, lawn, adfs);
+      } else if (node.Symbol.Name == "Left") {
+        switch (mowerState.Heading) {
+          case Heading.East: mowerState.Heading = Heading.North;
+            break;
+          case Heading.North: mowerState.Heading = Heading.West;
+            break;
+          case Heading.West: mowerState.Heading = Heading.South;
+            break;
+          case Heading.South:
+            mowerState.Heading = Heading.East;
+            break;
+        }
+        return new Tuple<int, int>(0, 0);
+      } else if (node.Symbol.Name == "Forward") {
+        int dRow = 0;
+        int dCol = 0;
+        switch (mowerState.Heading) {
+          case Heading.East:
+            dCol++;
+            break;
+          case Heading.North:
+            dRow--;
+            break;
+          case Heading.West:
+            dCol--;
+            break;
+          case Heading.South:
+            dRow++;
+            break;
+        }
+        uint newRow = (uint)((mowerState.Position.Item1 + lawn.GetLength(0) + dRow) % lawn.GetLength(0));
+        uint newColumn = (uint)((mowerState.Position.Item2 + lawn.GetLength(1) + dCol) % lawn.GetLength(1));
+        mowerState.Position = Tuple.Create(newRow, newColumn);
+        mowerState.Energy = mowerState.Energy - 1;
+        lawn[newRow, newColumn] = true;
+        return Tuple.Create(0, 0);
+      } else if (node.Symbol.Name == "Sum") {
+        var p = EvaluateLawnMowerProgram(node.GetSubtree(0), mowerState, lawn, adfs);
+        var q = EvaluateLawnMowerProgram(node.GetSubtree(1), mowerState, lawn, adfs);
+        return Tuple.Create(p.Item1 + q.Item1, p.Item2 + q.Item2);
+      } else if (node.Symbol.Name == "Prog") {
+        EvaluateLawnMowerProgram(node.GetSubtree(0), mowerState, lawn, adfs);
+        return EvaluateLawnMowerProgram(node.GetSubtree(1), mowerState, lawn, adfs);
+      } else if (node.Symbol.Name == "Frog") {
+        var p = EvaluateLawnMowerProgram(node.GetSubtree(0), mowerState, lawn, adfs);
+        int x = p.Item1;
+        int y = p.Item2;
+        while (x < 0) x += lawn.GetLength(0);
+        while (y < 0) y += lawn.GetLength(1);
+        var newRow = (uint)((mowerState.Position.Item1 + x) % lawn.GetLength(0));
+        var newCol = (uint)((mowerState.Position.Item2 + y) % lawn.GetLength(1));
+        mowerState.Position = Tuple.Create(newRow, newCol);
+        mowerState.Energy = mowerState.Energy - 1;
+        lawn[newRow, newCol] = true;
+        return Tuple.Create(0, 0);
+      } else if (node.Symbol is InvokeFunction) {
+        var invokeNode = node as InvokeFunctionTreeNode;
+
+        // find the function definition for the invoke call
+        var functionDefinition = (from adf in adfs.Cast<DefunTreeNode>()
+                                  where adf.FunctionName == invokeNode.Symbol.FunctionName
+                                  select adf).Single();
+        // clone the function definition because we are replacing the argument nodes
+        functionDefinition = (DefunTreeNode)functionDefinition.Clone();
+        // find the argument tree nodes and their parents in the original function definition
+        // toList is necessary to prevent that newly inserted branches are iterated
+        var argumentCutPoints = (from parent in functionDefinition.IterateNodesPrefix()
+                                 from subtree in parent.Subtrees
+                                 where subtree is ArgumentTreeNode
+                                 select new { Parent = parent, Argument = subtree.Symbol as Argument, ChildIndex = parent.IndexOfSubtree(subtree) })
+                                 .ToList();
+        // replace all argument tree ndoes with the matching argument of the invoke node
+        foreach (var cutPoint in argumentCutPoints) {
+          cutPoint.Parent.RemoveSubtree(cutPoint.ChildIndex);
+          cutPoint.Parent.InsertSubtree(cutPoint.ChildIndex, (SymbolicExpressionTreeNode)invokeNode.GetSubtree(cutPoint.Argument.ArgumentIndex).Clone());
+        }
+        return EvaluateLawnMowerProgram(functionDefinition.GetSubtree(0), mowerState, lawn, adfs);
+      } else {
+        // try to parse as ephemeral random const with format: "x,y" (x, y in [0..32[)
+        int x, y;
+        var tokens = node.Symbol.Name.Split(',');
+        if (tokens.Length == 2 &&
+            int.TryParse(tokens[0], out x) &&
+            int.TryParse(tokens[1], out y)) {
+          return Tuple.Create(x, y);
+        } else {
+          throw new ArgumentException("Invalid symbol in the lawn mower program.");
+        }
+      }
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Problem.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Problem.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Problem.cs	(revision 12911)
@@ -0,0 +1,112 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Optimization;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Random;
+
+namespace HeuristicLab.Problems.GeneticProgramming.LawnMower {
+  [StorableClass]
+  [Creatable(CreatableAttribute.Categories.GeneticProgrammingProblems, Priority = 160)]
+  [Item("Lawn Mower Problem", "The lawn mower demo problem for genetic programming.")]
+  public class Problem : SymbolicExpressionTreeProblem {
+    private const string LawnWidthParameterName = "LawnWidth";
+    private const string LawnLengthParameterName = "LawnLength";
+
+    public IFixedValueParameter<IntValue> LawnWidthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[LawnWidthParameterName]; }
+    }
+    public IFixedValueParameter<IntValue> LawnLengthParameter {
+      get { return (IFixedValueParameter<IntValue>)Parameters[LawnLengthParameterName]; }
+    }
+
+    public override bool Maximization {
+      get { return true; }
+    }
+
+    [StorableConstructor]
+    protected Problem(bool deserializing)
+      : base(deserializing) {
+    }
+    protected Problem(Problem original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public Problem()
+      : base() {
+      Parameters.Add(new FixedValueParameter<IntValue>(LawnWidthParameterName, "Width of the lawn.", new IntValue(8)));
+      Parameters.Add(new FixedValueParameter<IntValue>(LawnLengthParameterName, "Length of the lawn.", new IntValue(8)));
+
+      var g = new SimpleSymbolicExpressionGrammar();
+      g.AddSymbols(new string[] { "Sum", "Prog" }, 2, 2);
+      g.AddSymbols(new string[] { "Frog" }, 1, 1);
+      g.AddTerminalSymbols(new string[] { "Left", "Forward" });
+      // initialize 20 ephemeral random constants in [0..32[
+      var fastRand = new FastRandom(314159);
+      for (int i = 0; i < 20; i++) {
+        g.AddTerminalSymbol(string.Format("{0},{1}", fastRand.Next(0, 32), fastRand.Next(0, 32)));
+      }
+
+      Encoding = new SymbolicExpressionTreeEncoding(g, 1000, 17);
+    }
+
+    public override void Analyze(ISymbolicExpressionTree[] trees, double[] qualities, ResultCollection results, IRandom random) {
+      const string bestSolutionResultName = "Best Solution";
+      var bestQuality = Maximization ? qualities.Max() : qualities.Min();
+      var bestIdx = Array.IndexOf(qualities, bestQuality);
+
+      if (!results.ContainsKey(bestSolutionResultName)) {
+        results.Add(new Result(bestSolutionResultName, new Solution(trees[bestIdx], LawnLengthParameter.Value.Value, LawnWidthParameter.Value.Value, bestQuality)));
+      } else if (((Solution)(results[bestSolutionResultName].Value)).Quality < qualities[bestIdx]) {
+        results[bestSolutionResultName].Value = new Solution(trees[bestIdx], LawnLengthParameter.Value.Value, LawnWidthParameter.Value.Value, bestQuality);
+      }
+    }
+
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() { }
+
+    public override double Evaluate(ISymbolicExpressionTree tree, IRandom random) {
+      var length = LawnLengthParameter.Value.Value;
+      var width = LawnWidthParameter.Value.Value;
+
+      var lawn = Interpreter.EvaluateLawnMowerProgram(length, width, tree);
+      // count number of squares that have been mowed
+      int numberOfMowedCells = 0;
+      for (int i = 0; i < length; i++)
+        for (int j = 0; j < width; j++)
+          if (lawn[i, j]) {
+            numberOfMowedCells++;
+          }
+      return numberOfMowedCells;
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Problem(this, cloner);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Solution.cs
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Solution.cs	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/LawnMower/Solution.cs	(revision 12911)
@@ -0,0 +1,63 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Problems.GeneticProgramming.LawnMower {
+  [StorableClass]
+  public sealed class Solution : NamedItem {
+    [Storable]
+    public int Width { get; private set; }
+    [Storable]
+    public int Length { get; private set; }
+    [Storable]
+    public ISymbolicExpressionTree Tree { get; private set; }
+    [Storable]
+    public double Quality { get; private set; }
+
+    [StorableConstructor]
+    private Solution(bool deserializing) : base(deserializing) { }
+    private Solution(Solution original, Cloner cloner)
+      : base(original, cloner) {
+      this.Length = original.Length;
+      this.Width = original.Width;
+      this.Tree = cloner.Clone(original.Tree);
+      this.Quality = original.Quality;
+    }
+
+    public Solution(ISymbolicExpressionTree tree, int length, int width, double quality)
+      : base("Solution", "A lawn mower solution.") {
+      this.Tree = tree;
+      this.Length = length;
+      this.Width = width;
+      this.Quality = quality;
+    }
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new Solution(this, cloner);
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/Plugin.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/Plugin.cs.frame	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/Plugin.cs.frame	(revision 12911)
@@ -0,0 +1,41 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using System;
+using System.Collections.Generic;
+using System.Text;
+using HeuristicLab.PluginInfrastructure;
+
+namespace HeuristicLab.Problems.GeneticProgramming {
+  [Plugin("HeuristicLab.Problems.GeneticProgramming","Provides implementations for genetic programming problems such as the artificial ant problem.", "3.3.0.$WCREV$")]
+  [PluginFile("HeuristicLab.Problems.GeneticProgramming-3.3.dll", PluginFileType.Assembly)]
+  [PluginDependency("HeuristicLab.Collections", "3.3")]
+  [PluginDependency("HeuristicLab.Common", "3.3")]
+  [PluginDependency("HeuristicLab.Common.Resources", "3.3")]
+  [PluginDependency("HeuristicLab.Core", "3.3")]
+  [PluginDependency("HeuristicLab.Data", "3.3")]
+  [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding","3.4")]
+  [PluginDependency("HeuristicLab.Optimization", "3.3")]
+  [PluginDependency("HeuristicLab.Parameters", "3.3")]
+  [PluginDependency("HeuristicLab.Persistence", "3.3")]
+  public class HeuristicLabProblemsGeneticProgrammingPlugin : PluginBase {
+  }
+}
Index: /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/Properties/AssemblyInfo.cs.frame
===================================================================
--- /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/Properties/AssemblyInfo.cs.frame	(revision 12911)
+++ /trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/Properties/AssemblyInfo.cs.frame	(revision 12911)
@@ -0,0 +1,55 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
+ *
+ * This file is part of HeuristicLab.
+ *
+ * HeuristicLab is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * HeuristicLab is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
+ */
+#endregion
+
+using 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.GeneticProgramming")]
+[assembly: AssemblyDescription("Provides implementations of genetic programming problems such as the artificial ant problem.")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("HeuristicLab")]
+[assembly: AssemblyCopyright("(c) 2002-2015 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("1DEACE5B-8084-4141-B9C0-0739B118530E")]
+
+// 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$")]
