Index: /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/CodeNodeView.Designer.cs
===================================================================
--- /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/CodeNodeView.Designer.cs	(revision 9888)
+++ /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/CodeNodeView.Designer.cs	(revision 9889)
@@ -29,87 +29,118 @@
         private void InitializeComponent()
         {
-          this.prefixCode = new System.Windows.Forms.TextBox();
-          this.prefixLabel = new System.Windows.Forms.Label();
-          this.suffixLabel = new System.Windows.Forms.Label();
-          this.suffixCode = new System.Windows.Forms.TextBox();
-          ((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);
-          this.nameTextBox.Visible = false;
-          // 
-          // nameLabel
-          // 
-          this.nameLabel.Visible = false;
-          // 
-          // infoLabel
-          // 
-          this.infoLabel.Visible = false;
-          // 
-          // prefixCode
-          // 
-          this.prefixCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                      | System.Windows.Forms.AnchorStyles.Right)));
-          this.prefixCode.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
-          this.prefixCode.Location = new System.Drawing.Point(6, 19);
-          this.prefixCode.Multiline = true;
-          this.prefixCode.Name = "prefixCode";
-          this.prefixCode.ScrollBars = System.Windows.Forms.ScrollBars.Vertical;
-          this.prefixCode.Size = new System.Drawing.Size(333, 93);
-          this.prefixCode.TabIndex = 3;
-          this.prefixCode.Validated += new System.EventHandler(this.prefixCode_Validated);
-          // 
-          // prefixLabel
-          // 
-          this.prefixLabel.AutoSize = true;
-          this.prefixLabel.Location = new System.Drawing.Point(3, 3);
-          this.prefixLabel.Name = "prefixLabel";
-          this.prefixLabel.Size = new System.Drawing.Size(33, 13);
-          this.prefixLabel.TabIndex = 4;
-          this.prefixLabel.Text = "Prefix";
-          // 
-          // suffixLabel
-          // 
-          this.suffixLabel.AutoSize = true;
-          this.suffixLabel.Location = new System.Drawing.Point(6, 115);
-          this.suffixLabel.Name = "suffixLabel";
-          this.suffixLabel.Size = new System.Drawing.Size(33, 13);
-          this.suffixLabel.TabIndex = 5;
-          this.suffixLabel.Text = "Suffix";
-          // 
-          // suffixCode
-          // 
-          this.suffixCode.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
-                      | System.Windows.Forms.AnchorStyles.Right)));
-          this.suffixCode.Location = new System.Drawing.Point(6, 131);
-          this.suffixCode.Multiline = true;
-          this.suffixCode.Name = "suffixCode";
-          this.suffixCode.ScrollBars = System.Windows.Forms.ScrollBars.Horizontal;
-          this.suffixCode.Size = new System.Drawing.Size(333, 87);
-          this.suffixCode.TabIndex = 6;
-          this.suffixCode.Validated += new System.EventHandler(this.suffixCode_Validated);
-          // 
-          // CodeNodeView
-          // 
-          this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
-          this.Controls.Add(this.suffixCode);
-          this.Controls.Add(this.suffixLabel);
-          this.Controls.Add(this.prefixLabel);
-          this.Controls.Add(this.prefixCode);
-          this.Name = "CodeNodeView";
-          this.Size = new System.Drawing.Size(351, 238);
-          this.Controls.SetChildIndex(this.nameLabel, 0);
-          this.Controls.SetChildIndex(this.nameTextBox, 0);
-          this.Controls.SetChildIndex(this.infoLabel, 0);
-          this.Controls.SetChildIndex(this.prefixCode, 0);
-          this.Controls.SetChildIndex(this.prefixLabel, 0);
-          this.Controls.SetChildIndex(this.suffixLabel, 0);
-          this.Controls.SetChildIndex(this.suffixCode, 0);
-          ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
-          this.ResumeLayout(false);
-          this.PerformLayout();
+      this.prefixCode = new System.Windows.Forms.TextBox();
+      this.prefixLabel = new System.Windows.Forms.Label();
+      this.suffixLabel = new System.Windows.Forms.Label();
+      this.suffixCode = new System.Windows.Forms.TextBox();
+      this.splitContainer = new System.Windows.Forms.SplitContainer();
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit();
+      this.splitContainer.Panel1.SuspendLayout();
+      this.splitContainer.Panel2.SuspendLayout();
+      this.splitContainer.SuspendLayout();
+      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(508, 20);
+      this.nameTextBox.Visible = false;
+      // 
+      // nameLabel
+      // 
+      this.nameLabel.Visible = false;
+      // 
+      // infoLabel
+      // 
+      this.infoLabel.Location = new System.Drawing.Point(572, 3);
+      this.infoLabel.Visible = false;
+      // 
+      // prefixCode
+      // 
+      this.prefixCode.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.prefixCode.Font = new System.Drawing.Font("Consolas", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+      this.prefixCode.Location = new System.Drawing.Point(6, 16);
+      this.prefixCode.Multiline = true;
+      this.prefixCode.Name = "prefixCode";
+      this.prefixCode.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+      this.prefixCode.Size = new System.Drawing.Size(573, 100);
+      this.prefixCode.TabIndex = 3;
+      this.prefixCode.Validated += new System.EventHandler(this.prefixCode_Validated);
+      // 
+      // prefixLabel
+      // 
+      this.prefixLabel.AutoSize = true;
+      this.prefixLabel.Location = new System.Drawing.Point(3, 0);
+      this.prefixLabel.Name = "prefixLabel";
+      this.prefixLabel.Size = new System.Drawing.Size(33, 13);
+      this.prefixLabel.TabIndex = 4;
+      this.prefixLabel.Text = "Prefix";
+      // 
+      // suffixLabel
+      // 
+      this.suffixLabel.AutoSize = true;
+      this.suffixLabel.Location = new System.Drawing.Point(3, 0);
+      this.suffixLabel.Name = "suffixLabel";
+      this.suffixLabel.Size = new System.Drawing.Size(33, 13);
+      this.suffixLabel.TabIndex = 5;
+      this.suffixLabel.Text = "Suffix";
+      // 
+      // suffixCode
+      // 
+      this.suffixCode.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.suffixCode.Location = new System.Drawing.Point(6, 16);
+      this.suffixCode.Multiline = true;
+      this.suffixCode.Name = "suffixCode";
+      this.suffixCode.ScrollBars = System.Windows.Forms.ScrollBars.Both;
+      this.suffixCode.Size = new System.Drawing.Size(573, 96);
+      this.suffixCode.TabIndex = 6;
+      this.suffixCode.Validated += new System.EventHandler(this.suffixCode_Validated);
+      // 
+      // splitContainer
+      // 
+      this.splitContainer.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.splitContainer.Location = new System.Drawing.Point(6, 26);
+      this.splitContainer.Name = "splitContainer";
+      this.splitContainer.Orientation = System.Windows.Forms.Orientation.Horizontal;
+      // 
+      // splitContainer.Panel1
+      // 
+      this.splitContainer.Panel1.Controls.Add(this.prefixLabel);
+      this.splitContainer.Panel1.Controls.Add(this.prefixCode);
+      // 
+      // splitContainer.Panel2
+      // 
+      this.splitContainer.Panel2.Controls.Add(this.suffixLabel);
+      this.splitContainer.Panel2.Controls.Add(this.suffixCode);
+      this.splitContainer.Size = new System.Drawing.Size(582, 238);
+      this.splitContainer.SplitterDistance = 119;
+      this.splitContainer.TabIndex = 7;
+      // 
+      // CodeNodeView
+      // 
+      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
+      this.Controls.Add(this.splitContainer);
+      this.Name = "CodeNodeView";
+      this.Size = new System.Drawing.Size(591, 267);
+      this.Controls.SetChildIndex(this.nameLabel, 0);
+      this.Controls.SetChildIndex(this.nameTextBox, 0);
+      this.Controls.SetChildIndex(this.infoLabel, 0);
+      this.Controls.SetChildIndex(this.splitContainer, 0);
+      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
+      this.splitContainer.Panel1.ResumeLayout(false);
+      this.splitContainer.Panel1.PerformLayout();
+      this.splitContainer.Panel2.ResumeLayout(false);
+      this.splitContainer.Panel2.PerformLayout();
+      ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit();
+      this.splitContainer.ResumeLayout(false);
+      this.ResumeLayout(false);
+      this.PerformLayout();
 
         }
@@ -121,4 +152,5 @@
         private System.Windows.Forms.Label suffixLabel;
         private System.Windows.Forms.TextBox suffixCode;
+        private System.Windows.Forms.SplitContainer splitContainer;
     }
 }
Index: /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/CodeNodeView.cs
===================================================================
--- /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/CodeNodeView.cs	(revision 9888)
+++ /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/CodeNodeView.cs	(revision 9889)
@@ -21,8 +21,6 @@
 
 using System;
-using System.Windows.Forms;
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-
 
 namespace HeuristicLab.Problems.Robocode {
@@ -43,6 +41,6 @@
       base.OnContentChanged();
       if (Content == null) {
-        this.prefixCode.Text = "";
-        this.suffixCode.Text = "";
+        this.prefixCode.Text = string.Empty;
+        this.suffixCode.Text = string.Empty;
       } else {
         this.prefixCode.Text = Content.Prefix;
Index: /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/CodeNodeView.resx
===================================================================
--- /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/CodeNodeView.resx	(revision 9888)
+++ /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/CodeNodeView.resx	(revision 9889)
@@ -119,11 +119,8 @@
   </resheader>
   <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>107, 17</value>
-  </metadata>
-  <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>107, 17</value>
+    <value>17, 17</value>
   </metadata>
   <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
-    <value>17, 17</value>
+    <value>140, 17</value>
   </metadata>
 </root>
Index: /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/HeuristicLab.Problems.Robocode.Views-3.3.csproj
===================================================================
--- /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/HeuristicLab.Problems.Robocode.Views-3.3.csproj	(revision 9888)
+++ /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/HeuristicLab.Problems.Robocode.Views-3.3.csproj	(revision 9889)
@@ -131,4 +131,7 @@
       <DependentUpon>SolutionCodeView.cs</DependentUpon>
     </EmbeddedResource>
+    <EmbeddedResource Include="SolutionProgramView.resx">
+      <DependentUpon>SolutionProgramView.cs</DependentUpon>
+    </EmbeddedResource>
   </ItemGroup>
   <ItemGroup>
Index: /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionCodeView.cs
===================================================================
--- /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionCodeView.cs	(revision 9888)
+++ /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionCodeView.cs	(revision 9889)
@@ -21,10 +21,6 @@
 
 using System;
-using System.Diagnostics;
-using System.IO;
-using System.Windows.Forms;
 using HeuristicLab.Core.Views;
 using HeuristicLab.MainForm;
-
 
 namespace HeuristicLab.Problems.Robocode {
@@ -32,6 +28,4 @@
   [Content(typeof(Solution), IsDefaultView = true)]
   public partial class SolutionCodeView : NamedItemView {
-    private string Path { get; set; }
-
     public new Solution Content {
       get { return (Solution)base.Content; }
@@ -42,6 +36,4 @@
       : base() {
       InitializeComponent();
-      this.Path = "c:/robocode/";
-      this.programCode.Text = "";
     }
 
@@ -49,43 +41,12 @@
       base.OnContentChanged();
       if (Content == null) {
-        this.programCode.Text = "";
+        this.programCode.Text = string.Empty;
       } else {
-        this.Path = Content.Path;
-        string code = Interpreter.InterpretProgramTree(Content.Tree.Root);
-        code = code.Replace("class output extends", "class BestSolution extends");
-        this.programCode.Text = code;
-        File.AppendAllText(Path + "/robots/Evaluation/PreviousBestSolution.java", "\r\n/**********************************************/\r\n" + code);
-        File.WriteAllText(Path + "/robots/Evaluation/BestSolution.java", code, System.Text.Encoding.Default);
+        this.programCode.Text = Interpreter.InterpretProgramTree(Content.Tree.Root, "BestSolution");
       }
     }
 
     private void btnRunInRobocode_Click(object sender, EventArgs e) {
-      string formattedPath = Path.Replace("/", "\\");
-      ProcessStartInfo javaCompileInfo = new ProcessStartInfo();
-      javaCompileInfo.FileName = "cmd.exe";
-      javaCompileInfo.Arguments = "/C javac -cp " + formattedPath + "\\libs\\robocode.jar " + formattedPath + "\\robots\\Evaluation\\BestSolution.java";
-      javaCompileInfo.RedirectStandardOutput = true;
-      javaCompileInfo.RedirectStandardError = true;
-      javaCompileInfo.UseShellExecute = false;
-      javaCompileInfo.CreateNoWindow = true;
-
-      Process javaCompile = new Process();
-      javaCompile.StartInfo = javaCompileInfo;
-      javaCompile.Start();
-      javaCompile.WaitForExit();
-
-      ProcessStartInfo evaluateCodeInfo = new ProcessStartInfo();
-      evaluateCodeInfo.FileName = "cmd.exe";
-      //javaCompileInfo.Arguments = "/C javac -cp C:\\robocode\\libs\\robocode.jar \"" + path + "\\Spaced Up\\output.java\"";
-      evaluateCodeInfo.Arguments = "/C java -classpath " + formattedPath + "\\libs;" + formattedPath + "\\libs\\robocode.core-1.8.1.0.jar;" + formattedPath + "\\libs\\robocode.jar;" + formattedPath + "\\libs\\picocontainer-2.14.2.jar BattleRunner Evaluation.BestSolution*";
-      //Console.WriteLine(javaCompileInfo.Arguments);
-      evaluateCodeInfo.RedirectStandardOutput = true;
-      evaluateCodeInfo.RedirectStandardError = true;
-      evaluateCodeInfo.UseShellExecute = false;
-
-      Process evaluateCode = new Process();
-      evaluateCode.StartInfo = evaluateCodeInfo;
-      evaluateCode.Start();
-      evaluateCode.WaitForExit();
+      Interpreter.EvaluateTankProgram(Content.Tree, Content.Path, "BestSolution", true);
     }
   }
Index: /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionProgramView.Designer.cs
===================================================================
--- /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionProgramView.Designer.cs	(revision 9888)
+++ /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionProgramView.Designer.cs	(revision 9889)
@@ -20,14 +20,10 @@
 #endregion
 
-using System.Windows.Forms;
 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
 
 namespace HeuristicLab.Problems.Robocode {
   partial class SolutionProgramView {
-    private Panel panel;
-    private GraphicalSymbolicExpressionTreeView graphTreeView;
-
     private void InitializeComponent() {
-      this.panel = new System.Windows.Forms.Panel();
+      this.graphTreeView = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.GraphicalSymbolicExpressionTreeView();
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
       this.SuspendLayout();
@@ -38,24 +34,27 @@
       this.errorProvider.SetIconPadding(this.nameTextBox, 2);
       // 
-      // panel
+      // graphTreeView
       // 
-      this.panel.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
+      this.graphTreeView.AllowDrop = true;
+      this.graphTreeView.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;
+      this.graphTreeView.Caption = "Graphical SymbolicExpressionTree View";
+      this.graphTreeView.Content = null;
+      this.graphTreeView.Location = new System.Drawing.Point(6, 26);
+      this.graphTreeView.Name = "graphTreeView";
+      this.graphTreeView.ReadOnly = false;
+      this.graphTreeView.Size = new System.Drawing.Size(342, 190);
+      this.graphTreeView.TabIndex = 0;
       // 
       // SolutionProgramView
       // 
-      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
-      this.Controls.Add(this.panel);
+      this.Controls.Add(this.graphTreeView);
       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);
+      this.Controls.SetChildIndex(this.graphTreeView, 0);
       ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
       this.ResumeLayout(false);
@@ -63,4 +62,6 @@
 
     }
+
+    private GraphicalSymbolicExpressionTreeView graphTreeView;
   }
 }
Index: /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionProgramView.cs
===================================================================
--- /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionProgramView.cs	(revision 9888)
+++ /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionProgramView.cs	(revision 9889)
@@ -22,5 +22,4 @@
 using System.Windows.Forms;
 using HeuristicLab.Core.Views;
-using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views;
 using HeuristicLab.MainForm;
 
@@ -36,7 +35,4 @@
     public SolutionProgramView() {
       InitializeComponent();
-      this.graphTreeView = new GraphicalSymbolicExpressionTreeView();
-      graphTreeView.Dock = DockStyle.Fill;
-      panel.Controls.Add(graphTreeView);
     }
 
@@ -49,5 +45,4 @@
       }
     }
-
   }
 }
Index: /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionProgramView.resx
===================================================================
--- /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionProgramView.resx	(revision 9889)
+++ /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode.Views/3.3/SolutionProgramView.resx	(revision 9889)
@@ -0,0 +1,129 @@
+﻿<?xml version="1.0" encoding="utf-8"?>
+<root>
+  <!-- 
+    Microsoft ResX Schema 
+    
+    Version 2.0
+    
+    The primary goals of this format is to allow a simple XML format 
+    that is mostly human readable. The generation and parsing of the 
+    various data types are done through the TypeConverter classes 
+    associated with the data types.
+    
+    Example:
+    
+    ... ado.net/XML headers & schema ...
+    <resheader name="resmimetype">text/microsoft-resx</resheader>
+    <resheader name="version">2.0</resheader>
+    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+        <value>[base64 mime encoded serialized .NET Framework object]</value>
+    </data>
+    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+        <comment>This is a comment</comment>
+    </data>
+                
+    There are any number of "resheader" rows that contain simple 
+    name/value pairs.
+    
+    Each data row contains a name, and value. The row also contains a 
+    type or mimetype. Type corresponds to a .NET class that support 
+    text/value conversion through the TypeConverter architecture. 
+    Classes that don't support this are serialized and stored with the 
+    mimetype set.
+    
+    The mimetype is used for serialized objects, and tells the 
+    ResXResourceReader how to depersist the object. This is currently not 
+    extensible. For a given mimetype the value must be set accordingly:
+    
+    Note - application/x-microsoft.net.object.binary.base64 is the format 
+    that the ResXResourceWriter will generate, however the reader can 
+    read any of the formats listed below.
+    
+    mimetype: application/x-microsoft.net.object.binary.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+            : and then encoded with base64 encoding.
+    
+    mimetype: application/x-microsoft.net.object.soap.base64
+    value   : The object must be serialized with 
+            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+            : and then encoded with base64 encoding.
+
+    mimetype: application/x-microsoft.net.object.bytearray.base64
+    value   : The object must be serialized into a byte array 
+            : using a System.ComponentModel.TypeConverter
+            : and then encoded with base64 encoding.
+    -->
+  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+    <xsd:element name="root" msdata:IsDataSet="true">
+      <xsd:complexType>
+        <xsd:choice maxOccurs="unbounded">
+          <xsd:element name="metadata">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" />
+              </xsd:sequence>
+              <xsd:attribute name="name" use="required" type="xsd:string" />
+              <xsd:attribute name="type" type="xsd:string" />
+              <xsd:attribute name="mimetype" type="xsd:string" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="assembly">
+            <xsd:complexType>
+              <xsd:attribute name="alias" type="xsd:string" />
+              <xsd:attribute name="name" type="xsd:string" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="data">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+              <xsd:attribute ref="xml:space" />
+            </xsd:complexType>
+          </xsd:element>
+          <xsd:element name="resheader">
+            <xsd:complexType>
+              <xsd:sequence>
+                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+              </xsd:sequence>
+              <xsd:attribute name="name" type="xsd:string" use="required" />
+            </xsd:complexType>
+          </xsd:element>
+        </xsd:choice>
+      </xsd:complexType>
+    </xsd:element>
+  </xsd:schema>
+  <resheader name="resmimetype">
+    <value>text/microsoft-resx</value>
+  </resheader>
+  <resheader name="version">
+    <value>2.0</value>
+  </resheader>
+  <resheader name="reader">
+    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <resheader name="writer">
+    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </resheader>
+  <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 17</value>
+  </metadata>
+  <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>140, 17</value>
+  </metadata>
+</root>
Index: /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Interpreter.cs
===================================================================
--- /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Interpreter.cs	(revision 9888)
+++ /branches/Robocode.TrunkInt/HeuristicLab.Problems.Robocode/3.3/Interpreter.cs	(revision 9889)
@@ -29,20 +29,13 @@
 namespace HeuristicLab.Problems.Robocode {
   public class Interpreter {
-    public static double EvaluateTankProgram(ISymbolicExpressionTree tree, string path) {
-      string interpretedProgram = InterpretProgramTree(tree.Root);
+    public static double EvaluateTankProgram(ISymbolicExpressionTree tree, string path, string robotName = null, bool showUI = false) {
+      if (robotName == null)
+        robotName = GenerateRobotName();
+
+      string interpretedProgram = InterpretProgramTree(tree.Root, robotName);
       string formattedPath = path.Replace("/", "\\");
-      string outputname = "";
 
       try {
-        outputname = Guid.NewGuid().ToString();
-        outputname = outputname.Remove(8, 1);
-        outputname = outputname.Remove(12, 1);
-        outputname = outputname.Remove(16, 1);
-        outputname = outputname.Remove(20, 1);
-        outputname = outputname.Remove(0, 1);
-        outputname = outputname.Insert(0, "R");
-
-        string output = interpretedProgram.Replace("class output", "class " + outputname);
-        File.WriteAllText(path + "/robots/Evaluation/" + outputname + ".java", output, System.Text.Encoding.Default);
+        File.WriteAllText(path + "/robots/Evaluation/" + robotName + ".java", interpretedProgram, System.Text.Encoding.Default);
       }
       catch (Exception ex) {
@@ -52,5 +45,6 @@
       ProcessStartInfo javaCompileInfo = new ProcessStartInfo();
       javaCompileInfo.FileName = "cmd.exe";
-      javaCompileInfo.Arguments = "/C javac -cp " + formattedPath + "\\libs\\robocode.jar " + formattedPath + "\\robots\\Evaluation\\" + outputname + ".java";
+      javaCompileInfo.Arguments = "/C javac -cp " + formattedPath + "\\libs\\robocode.jar " +
+                                  formattedPath + "\\robots\\Evaluation\\" + robotName + ".java";
       javaCompileInfo.RedirectStandardOutput = true;
       javaCompileInfo.RedirectStandardError = true;
@@ -67,5 +61,5 @@
       javaCompile.WaitForExit();
       if (javaCompile.ExitCode != 0) {
-        DeleteRobotFiles(path, outputname);
+        DeleteRobotFiles(path, robotName);
         throw new Exception("Compile Error: " + cmdOutput);
       }
@@ -77,5 +71,11 @@
       ProcessStartInfo evaluateCodeInfo = new ProcessStartInfo();
       evaluateCodeInfo.FileName = "cmd.exe";
-      evaluateCodeInfo.Arguments = "/C java -classpath " + formattedPath + "\\libs;" + formattedPath + "\\libs\\robocode.core-1.8.1.0.jar;" + formattedPath + "\\libs\\robocode.jar;" + formattedPath + "\\libs\\picocontainer-2.14.2.jar BattleRunner Evaluation." + outputname + "* " + formattedPath + " false";
+      evaluateCodeInfo.Arguments = "/C java -classpath " + formattedPath + "\\libs;" + formattedPath +
+                                   "\\libs\\robocode.core-1.8.1.0.jar;" + formattedPath + "\\libs\\robocode.jar;" +
+                                   formattedPath + "\\libs\\picocontainer-2.14.2.jar BattleRunner Evaluation." +
+                                   robotName + "* " + formattedPath;
+      if (showUI)
+        evaluateCodeInfo.Arguments += " true";
+
       evaluateCodeInfo.RedirectStandardOutput = true;
       evaluateCodeInfo.RedirectStandardError = true;
@@ -87,6 +87,7 @@
       evaluateCode.Start();
       evaluateCode.WaitForExit();
+
       if (evaluateCode.ExitCode != 0) {
-        DeleteRobotFiles(path, outputname);
+        DeleteRobotFiles(path, robotName);
         throw new Exception("Error running Robocode: " + evaluateCode.StandardError.ReadToEnd());
       }
@@ -102,5 +103,5 @@
       }
       finally {
-        DeleteRobotFiles(path, outputname);
+        DeleteRobotFiles(path, robotName);
       }
 
@@ -116,9 +117,25 @@
     }
 
-    public static string InterpretProgramTree(ISymbolicExpressionTreeNode node) {
+    private static string GenerateRobotName() {
+      // Robocode class names are 32 char max and 
+      // Java class names have to start with a letter
+      string outputname = Guid.NewGuid().ToString();
+      outputname = outputname.Remove(8, 1);
+      outputname = outputname.Remove(12, 1);
+      outputname = outputname.Remove(16, 1);
+      outputname = outputname.Remove(20, 1);
+      outputname = outputname.Remove(0, 1);
+      outputname = outputname.Insert(0, "R");
+      return outputname;
+    }
+
+    public static string InterpretProgramTree(ISymbolicExpressionTreeNode node, string robotName) {
       var tankNode = node;
       while (!(tankNode.Symbol is Tank))
         tankNode = tankNode.GetSubtree(0);
-      return ((CodeNode)tankNode.Symbol).Interpret(tankNode, tankNode.Subtrees);
+
+      string result = ((CodeNode)tankNode.Symbol).Interpret(tankNode, tankNode.Subtrees);
+      result = result.Replace("class output", "class " + robotName);
+      return result;
     }
   }
