Index: stable/HeuristicLab.Problems.GeneticProgramming/3.3/robocode/Interpreter.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/robocode/Interpreter.cs	(revision 13210)
+++ stable/HeuristicLab.Problems.GeneticProgramming/3.3/robocode/Interpreter.cs	(revision 13312)
@@ -31,4 +31,9 @@
 namespace HeuristicLab.Problems.GeneticProgramming.Robocode {
   public static class Interpreter {
+
+    // necessary for synchronization to guarantee that only one robocode program is executed at the same time
+    // NOTE: this does not guarantee OS-wide mutual exclusion, but we ignore that for now
+    private static readonly object syncRoot = new object();
+
     // TODO performance: it would probably be useful to implement the BattleRunner in such a way that we don't have to restart the java process each time, e.g. using console IO to load & run robots 
     public static double EvaluateTankProgram(ISymbolicExpressionTree tree, string path, EnemyCollection enemies, string robotName = null, bool showUI = false, int nrOfRounds = 3) {
@@ -56,4 +61,5 @@
       javaCompileInfo.CreateNoWindow = true;
 
+      // it's ok to compile multiple robocode programs concurrently
       using (Process javaCompile = new Process()) {
         javaCompile.StartInfo = javaCompileInfo;
@@ -70,9 +76,4 @@
       }
 
-      //parallel execution of multiple robocode instances can sometimes lead to a damaged robot.database
-      var robotsDbFileName = Path.Combine(path, "robots", "robot.database");
-      if (File.Exists(robotsDbFileName))
-        File.Delete(robotsDbFileName);
-
       ProcessStartInfo evaluateCodeInfo = new ProcessStartInfo();
 
@@ -89,28 +90,32 @@
       evaluateCodeInfo.CreateNoWindow = true;
 
+      // the robocode framework writes state to a file therefore parallel evaluation of multiple robocode programs is not possible yet.
       double evaluation;
-      using (Process evaluateCode = new Process()) {
-        evaluateCode.StartInfo = evaluateCodeInfo;
-        evaluateCode.Start();
-        evaluateCode.WaitForExit();
-
-        if (evaluateCode.ExitCode != 0) {
-          DeleteRobotFiles(path, robotName);
-          throw new Exception("Error running Robocode: " + evaluateCode.StandardError.ReadToEnd() + Environment.NewLine +
-                              evaluateCode.StandardOutput.ReadToEnd());
-        }
-
-        try {
-          string scoreString =
-            evaluateCode.StandardOutput.ReadToEnd()
-              .Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)
-              .Last();
-          evaluation = Double.Parse(scoreString, CultureInfo.InvariantCulture);
-        }
-        catch (Exception ex) {
-          throw new Exception("Error parsing score string: " + ex);
-        }
-        finally {
-          DeleteRobotFiles(path, robotName);
+      lock (syncRoot) {
+        using (Process evaluateCode = new Process()) {
+          evaluateCode.StartInfo = evaluateCodeInfo;
+          evaluateCode.Start();
+          evaluateCode.WaitForExit();
+
+          if (evaluateCode.ExitCode != 0) {
+            DeleteRobotFiles(path, robotName);
+            throw new Exception("Error running Robocode: " + evaluateCode.StandardError.ReadToEnd() +
+                                Environment.NewLine +
+                                evaluateCode.StandardOutput.ReadToEnd());
+          }
+
+          try {
+            string scoreString =
+              evaluateCode.StandardOutput.ReadToEnd()
+                .Split(new string[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries)
+                .Last();
+            evaluation = Double.Parse(scoreString, CultureInfo.InvariantCulture);
+          }
+          catch (Exception ex) {
+            throw new Exception("Error parsing score string: " + ex);
+          }
+          finally {
+            DeleteRobotFiles(path, robotName);
+          }
         }
       }
@@ -222,24 +227,21 @@
 
     private static string InterpretCodeSymbol(ISymbolicExpressionTreeNode node) {
-      var sy = node.Symbol as CodeSymbol;
-      string code = string.Join(Environment.NewLine, node.Subtrees.Select(Interpret));
-      return string.Format(
-@"{0}
-{1}
-{2}", sy.Prefix, code, sy.Suffix);
+      var sy = (CodeSymbol)node.Symbol;
+      string code = string.Join(Environment.NewLine, node.Subtrees.Select(Interpret));
+      return sy.Prefix + Environment.NewLine + code + Environment.NewLine + sy.Suffix;
     }
 
     private static string InterpretBoolValue(ISymbolicExpressionTreeNode node) {
-      var boolNode = node as BooleanTreeNode;
+      var boolNode = (BooleanTreeNode)node;
       return string.Format(NumberFormatInfo.InvariantInfo, "{0}", boolNode.Value).ToLower();
     }
 
     private static string InterpretNumber(ISymbolicExpressionTreeNode node) {
-      var numberNode = node as NumberTreeNode;
+      var numberNode = (NumberTreeNode)node;
       return string.Format(NumberFormatInfo.InvariantInfo, "{0}", numberNode.Value);
     }
 
     private static string InterpetShotPower(ISymbolicExpressionTreeNode node) {
-      var shotPowerNode = node as ShotPowerTreeNode;
+      var shotPowerNode = (ShotPowerTreeNode)node;
       return string.Format(NumberFormatInfo.InvariantInfo, "{0:E}", shotPowerNode.Value);
     }
@@ -306,5 +308,5 @@
       rhs = node.GetSubtree(1);
 
-      return Interpret(lhs) + " == " + Interpret(rhs);
+      return Interpret(lhs) + compSy + Interpret(rhs);
     }
 
Index: stable/HeuristicLab.Problems.GeneticProgramming/3.3/robocode/Symbols/ShotPowerTreeNode.cs
===================================================================
--- trunk/sources/HeuristicLab.Problems.GeneticProgramming/3.3/robocode/Symbols/ShotPowerTreeNode.cs	(revision 13210)
+++ stable/HeuristicLab.Problems.GeneticProgramming/3.3/robocode/Symbols/ShotPowerTreeNode.cs	(revision 13312)
@@ -61,5 +61,7 @@
       // mutation
       var d = random.NextDouble() * 2.0 - 1.0;
-      value = Math.Max(0.1, value + shakingFactor * d);
+      value += shakingFactor * d;
+      if (value < 0.1) value = 0.1;
+      if (value > 3) value = 3;
     }
   }
