Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GAQAPScriptTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GAQAPScriptTest.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GAQAPScriptTest.cs	(revision 11789)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.IO;
+using System.Linq;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.Instances.QAPLIB;
+using HeuristicLab.Problems.QuadraticAssignment;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GAQAPScriptTest {
+    private const string ScriptFileName = "GA_QAP_Script";
+    private const string ScriptItemName = "Genetic Algorithm Script - QAP";
+    private const string ScriptItemDescription = "A scripted genetic algorithm which solves the \"" + ProblemInstanceName + "\" quadratic assignment problem (imported from Drezner)";
+    private const string ProblemInstanceName = "dre56";
+    private const string BestQualityVariableName = "bestQuality";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateGAQAPScriptScriptTest() {
+      var script = CreateGAQAPScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Scripts.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGAQAPScriptTest() {
+      var script = CreateGAQAPScript();
+
+      script.Compile();
+      ScriptingUtils.RunScript(script);
+
+      var bestQuality = ScriptingUtils.GetVariable<double>(script, BestQualityVariableName);
+      Assert.AreEqual(2410.0, bestQuality, 1E-8);
+    }
+
+    private CSharpScript CreateGAQAPScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Variables
+      var provider = new DreznerQAPInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name == ProblemInstanceName);
+      var data = provider.LoadData(instance);
+      var problem = new QuadraticAssignmentProblem();
+      problem.Load(data);
+      script.VariableStore.Add(ProblemInstanceName, problem);
+      #endregion
+      #region Code
+      script.Code = ScriptSources.GAQAPScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GUIAutomationScriptTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GUIAutomationScriptTest.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GUIAutomationScriptTest.cs	(revision 11789)
@@ -0,0 +1,54 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.IO;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GUIAutomationScriptTest {
+    private const string ScriptFileName = "GUI_Automation_Script";
+    private const string ScriptItemName = "GUI Automation Script";
+    private const string ScriptItemDescription = "A script that runs a genetic algorithm on a traveling salesman problem with 5 different settings for population sizes and with 10 repetitions, then opens a bubble chart of the results and chooses the appropriate values for x and y axis automatically";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateGUIAutomationScriptTest() {
+      var script = CreateGUIAutomationScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    private CSharpScript CreateGUIAutomationScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Code
+      script.Code = ScriptSources.GUIAutomationScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFClassificationScriptTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFClassificationScriptTest.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFClassificationScriptTest.cs	(revision 11789)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.IO;
+using System.Linq;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GridSearchRFClassificationScriptTest {
+    private const string ScriptFileName = "GridSearch_RF_Classification_Script";
+    private const string ScriptItemName = "Grid Search Random Forest Script - Classification";
+    private const string ScriptItemDescription = "A script that runs a grid search for random forest parameters for solving symbolic classification problems";
+    private const string ProblemInstanceName = "Mammography, M. Elter, 2007";
+    private const string ProblemInstanceDataVaribleName = "problem";
+    private const string BestSolutionVariableName = "bestSolution";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateGridSearchRFClassificationScriptTest() {
+      var script = CreateGridSearchRFClassificationScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Scripts.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGridSearchRFClassificationScriptTest() {
+      var script = CreateGridSearchRFClassificationScript();
+
+      script.Compile();
+      ScriptingUtils.RunScript(script);
+
+      var bestSolution = ScriptingUtils.GetVariable<IClassificationSolution>(script, BestSolutionVariableName);
+      Assert.AreEqual(0.946957878315133, bestSolution.TrainingAccuracy, 1E-8);
+      Assert.AreEqual(0.734375, bestSolution.TestAccuracy, 1E-8);
+    }
+
+    private CSharpScript CreateGridSearchRFClassificationScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Variables
+      var provider = new UCIInstanceProvider();
+      var instance = (UCIDataDescriptor)provider.GetDataDescriptors().Single(x => x.Name == ProblemInstanceName);
+      var data = provider.LoadData(instance);
+      script.VariableStore.Add(ProblemInstanceDataVaribleName, data);
+      #endregion
+      #region Code
+      script.Code = ScriptSources.GridSearchRFClassificationScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFRegressionScriptTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFRegressionScriptTest.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchRFRegressionScriptTest.cs	(revision 11789)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.IO;
+using System.Linq;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GridSearchRFRegressionScriptTest {
+    private const string ScriptFileName = "GridSearch_RF_Regression_Script";
+    private const string ScriptItemName = "Grid Search Random Forest Script - Regression";
+    private const string ScriptItemDescription = "A script that runs a grid search for random forest parameters for solving symbolic regression problems";
+    private const string ProblemInstanceName = "Keijzer 3 f(x) = 0.3 * x *sin(2 * PI * x); Interval [-3, 3]";
+    private const string ProblemInstanceDataVaribleName = "problem";
+    private const string BestSolutionVariableName = "bestSolution";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateGridSearchRFRegressionScriptTest() {
+      var script = CreateGridSearchRFRegressionScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Scripts.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunGridSearchRFRegressionScriptTest() {
+      var script = CreateGridSearchRFRegressionScript();
+
+      script.Compile();
+      ScriptingUtils.RunScript(script);
+
+      var bestSolution = ScriptingUtils.GetVariable<IRegressionSolution>(script, BestSolutionVariableName);
+      Assert.AreEqual(1.0, bestSolution.TrainingRSquared, 1E-8);
+      Assert.AreEqual(0.966618401251492, bestSolution.TestRSquared, 1E-8);
+    }
+
+    private CSharpScript CreateGridSearchRFRegressionScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Variables
+      var provider = new KeijzerInstanceProvider();
+      var instance = (ArtificialRegressionDataDescriptor)provider.GetDataDescriptors().Single(x => x.Name == ProblemInstanceName);
+      var data = instance.GenerateRegressionData();
+      script.VariableStore.Add(ProblemInstanceDataVaribleName, data);
+      #endregion
+      #region Code
+      script.Code = ScriptSources.GridSearchRFRegressionScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchSVMClassificationScriptTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchSVMClassificationScriptTest.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchSVMClassificationScriptTest.cs	(revision 11789)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.IO;
+using System.Linq;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GridSearchSVMClassificationScriptTest {
+    private const string ScriptFileName = "GridSearch_SVM_Classification_Script";
+    private const string ScriptItemName = "Grid Search SVM Script - Classification";
+    private const string ScriptItemDescription = "A script that runs a grid search for SVM parameters for solving symbolic classification problems";
+    private const string ProblemInstanceName = "Mammography, M. Elter, 2007";
+    private const string ProblemInstanceDataVaribleName = "problem";
+    private const string BestSolutionVariableName = "bestSolution";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateGridSearchSVMClassificationScriptTest() {
+      var script = CreateGridSearchSVMClassificationScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Scripts.Execute")]
+    [TestProperty("Time", "medium")]
+    public void RunGridSearchSVMClassificationScriptTest() {
+      var script = CreateGridSearchSVMClassificationScript();
+
+      script.Compile();
+      ScriptingUtils.RunScript(script);
+
+      var bestSolution = ScriptingUtils.GetVariable<IClassificationSolution>(script, BestSolutionVariableName);
+      Assert.AreEqual(0.819032761310452, bestSolution.TrainingAccuracy, 1E-8);
+      Assert.AreEqual(0.721875, bestSolution.TestAccuracy, 1E-8);
+    }
+
+    private CSharpScript CreateGridSearchSVMClassificationScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Variables
+      var provider = new UCIInstanceProvider();
+      var instance = (UCIDataDescriptor)provider.GetDataDescriptors().Single(x => x.Name == ProblemInstanceName);
+      var data = provider.LoadData(instance);
+      script.VariableStore.Add(ProblemInstanceDataVaribleName, data);
+      #endregion
+      #region Code
+      script.Code = ScriptSources.GridSearchSVMClassificationScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchSVMRegressionScriptTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchSVMRegressionScriptTest.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/GridSearchSVMRegressionScriptTest.cs	(revision 11789)
@@ -0,0 +1,80 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.IO;
+using System.Linq;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class GridSearchSVMRegressionScriptTest {
+    private const string ScriptFileName = "GridSearch_SVM_Regression_Script";
+    private const string ScriptItemName = "Grid Search SVM Script - Regression";
+    private const string ScriptItemDescription = "A script that runs a grid search for SVM parameters for solving symbolic regression problems";
+    private const string ProblemInstanceName = "Keijzer 9 f(x) = arcsinh(x)  i.e. ln(x + sqrt(x² + 1))";
+    private const string ProblemInstanceDataVaribleName = "problem";
+    private const string BestSolutionVariableName = "bestSolution";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateGridSearchSVMRegressionScriptTest() {
+      var script = CreateGridSearchSVMRegressionScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Scripts.Execute")]
+    [TestProperty("Time", "medium")]
+    public void RunGridSearchSVMRegressionScriptTest() {
+      var script = CreateGridSearchSVMRegressionScript();
+
+      script.Compile();
+      ScriptingUtils.RunScript(script);
+
+      var bestSolution = ScriptingUtils.GetVariable<IRegressionSolution>(script, BestSolutionVariableName);
+      Assert.AreEqual(0.982485852864274, bestSolution.TrainingRSquared, 1E-8);
+      Assert.AreEqual(0.98817480950295, bestSolution.TestRSquared, 1E-8);
+    }
+
+    private CSharpScript CreateGridSearchSVMRegressionScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Variables
+      var provider = new KeijzerInstanceProvider();
+      var instance = (ArtificialRegressionDataDescriptor)provider.GetDataDescriptors().Single(x => x.Name == ProblemInstanceName);
+      var data = instance.GenerateRegressionData();
+      script.VariableStore.Add(ProblemInstanceDataVaribleName, data);
+      #endregion
+      #region Code
+      script.Code = ScriptSources.GridSearchSVMRegressionScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/OSGARastriginScriptTest.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/OSGARastriginScriptTest.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/OSGARastriginScriptTest.cs	(revision 11789)
@@ -0,0 +1,79 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2014 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.IO;
+using HeuristicLab.Data;
+using HeuristicLab.Persistence.Default.Xml;
+using HeuristicLab.Scripting;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+
+namespace HeuristicLab.Tests {
+  [TestClass]
+  public class OSGARastriginScriptTest {
+    private const string ScriptFileName = "OSGA_Rastrigin_Script";
+    private const string ScriptItemName = "Offspring Selection Genetic Algorithm Script - Rastrigin";
+    private const string ScriptItemDescription = "A scripted offspring selection genetic algorithm that solves the 100-dimensional Rastrigin test function";
+    private const string LowerBoundVariableName = "minX";
+    private const string UpperBoundVariableName = "maxX";
+    private const string DimensionsVariableName = "N";
+    private const string SeedVariableName = "seed";
+    private const string BestQualityVariableName = "bestFitness";
+
+    [TestMethod]
+    [TestCategory("Scripts.Create")]
+    [TestProperty("Time", "short")]
+    public void CreateOSGARastriginScriptTest() {
+      var script = CreateOSGARastriginScript();
+      string path = Path.Combine(ScriptingUtils.ScriptsDirectory, ScriptFileName + ScriptingUtils.ScriptFileExtension);
+      XmlGenerator.Serialize(script, path);
+    }
+
+    [TestMethod]
+    [TestCategory("Scripts.Execute")]
+    [TestProperty("Time", "long")]
+    public void RunOSGARastriginScriptTest() {
+      var script = CreateOSGARastriginScript();
+
+      script.Compile();
+      ScriptingUtils.RunScript(script);
+
+      var bestQuality = ScriptingUtils.GetVariable<double>(script, BestQualityVariableName);
+      Assert.AreEqual(0.176350329149955, bestQuality, 1E-8);
+    }
+
+    private CSharpScript CreateOSGARastriginScript() {
+      var script = new CSharpScript {
+        Name = ScriptItemName,
+        Description = ScriptItemDescription
+      };
+      #region Variables
+      script.VariableStore.Add(LowerBoundVariableName, new DoubleValue(-5.12));
+      script.VariableStore.Add(UpperBoundVariableName, new DoubleValue(5.12));
+      script.VariableStore.Add(DimensionsVariableName, new IntValue(100));
+      script.VariableStore.Add(SeedVariableName, new IntValue(0));
+      #endregion
+      #region Code
+      script.Code = ScriptSources.OSGARastriginScriptSource;
+      #endregion
+      return script;
+    }
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GAQAPScriptSource.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GAQAPScriptSource.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GAQAPScriptSource.cs	(revision 11789)
@@ -0,0 +1,69 @@
+﻿using System;
+using System.Linq;
+
+using HeuristicLab.Analysis;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.PermutationEncoding;
+using HeuristicLab.Problems.Instances.QAPLIB;
+using HeuristicLab.Problems.QuadraticAssignment;
+using HeuristicLab.Random;
+
+public class GAQAPScript : HeuristicLab.Scripting.CSharpScriptBase {
+  public override void Main() {
+    DateTime start = DateTime.UtcNow;
+
+    QuadraticAssignmentProblem qap;
+    if (vars.Contains("qap")) qap = vars.qap;
+    else {
+      var provider = new DreznerQAPInstanceProvider();
+      var instance = provider.GetDataDescriptors().Single(x => x.Name == "dre56");
+      var data = provider.LoadData(instance);
+      qap = new QuadraticAssignmentProblem();
+      qap.Load(data);
+      vars.qap = qap;
+    }
+
+    const uint seed = 0;
+    const int popSize = 100;
+    const int generations = 1000;
+    const double mutationRate = 0.05;
+
+    var random = new MersenneTwister(seed);
+    var population = new Permutation[popSize];
+    var qualities = new double[popSize];
+    var nextGen = new Permutation[popSize];
+    var nextQual = new double[popSize];
+
+    var qualityChart = new DataTable("Quality Chart");
+    var qualityRow = new DataRow("Best Quality");
+    qualityChart.Rows.Add(qualityRow);
+    vars.qualityChart = qualityChart;
+
+    for (int i = 0; i < popSize; i++) {
+      population[i] = new Permutation(PermutationTypes.Absolute, qap.Weights.Rows, random);
+      qualities[i] = QAPEvaluator.Apply(population[i], qap.Weights, qap.Distances);
+    }
+    var bestQuality = qualities.Min();
+    var bestQualityGeneration = 0;
+
+    for (int g = 0; g < generations; g++) {
+      var parents = population.SampleProportional(random, 2 * popSize, qualities, windowing: true, inverseProportional: true).ToArray();
+      for (int i = 0; i < popSize; i++) {
+        nextGen[i] = PartiallyMatchedCrossover.Apply(random, parents[i * 2], parents[i * 2 + 1]);
+        if (random.NextDouble() < mutationRate) Swap2Manipulator.Apply(random, nextGen[i]);
+        nextQual[i] = QAPEvaluator.Apply(nextGen[i], qap.Weights, qap.Distances);
+        if (nextQual[i] < bestQuality) {
+          bestQuality = nextQual[i];
+          bestQualityGeneration = g;
+        }
+      }
+      qualityRow.Values.Add(bestQuality);
+      Array.Copy(nextGen, population, popSize);
+      Array.Copy(nextQual, qualities, popSize);
+    }
+
+    vars.elapsed = new TimeSpanValue(DateTime.UtcNow - start);
+    vars.bestQuality = bestQuality;
+    vars.bestQualityFoundAt = bestQualityGeneration;
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GUIAutomationScriptSource.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GUIAutomationScriptSource.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GUIAutomationScriptSource.cs	(revision 11789)
@@ -0,0 +1,46 @@
+﻿using System;
+using System.Linq;
+using System.Threading;
+using System.Windows.Forms;
+
+using HeuristicLab.Algorithms.GeneticAlgorithm;
+using HeuristicLab.Core;
+using HeuristicLab.MainForm;
+using HeuristicLab.MainForm.WindowsForms;
+using HeuristicLab.Optimization;
+using HeuristicLab.Optimization.Views;
+using HeuristicLab.Problems.TravelingSalesman;
+
+public class GUIAutomationScript : HeuristicLab.Scripting.CSharpScriptBase {
+  readonly ManualResetEvent mutex = new ManualResetEvent(false);
+
+  public override void Main() {
+    var ga = new GeneticAlgorithm {
+      MaximumGenerations = { Value = 50 },
+      PopulationSize = { Value = 10 },
+      Problem = new TravelingSalesmanProblem()
+    };
+
+    var experiment = new Experiment();
+    for (int i = 0; i < 5; i++) {
+      experiment.Optimizers.Add(new BatchRun() { Optimizer = (IOptimizer)ga.Clone(), Repetitions = 10 });
+      ga.PopulationSize.Value *= 2;
+    }
+
+    experiment.ExecutionStateChanged += OnExecutionStateChanged;
+    experiment.Start();
+    mutex.WaitOne();
+
+    vars.experiment = experiment;
+    MainFormManager.MainForm.ShowContent(experiment);
+    var viewHost = (ViewHost)MainFormManager.MainForm.ShowContent(experiment.Runs, typeof(RunCollectionBubbleChartView));
+    var bubbleChart = (UserControl)(viewHost.ActiveView);
+    bubbleChart.Controls.OfType<ComboBox>().Single(x => x.Name == "yAxisComboBox").SelectedItem = "BestQuality";
+    bubbleChart.Controls.OfType<ComboBox>().Single(x => x.Name == "xAxisComboBox").SelectedItem = "PopulationSize";
+  }
+
+  private void OnExecutionStateChanged(object sender, EventArgs e) {
+    if (((IExecutable)sender).ExecutionState == ExecutionState.Stopped)
+      mutex.Set();
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFClassificationScriptSource.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFClassificationScriptSource.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFClassificationScriptSource.cs	(revision 11789)
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Scripting;
+
+public class RFClassificationCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+  /* Maximum degree of parallelism (specifies whether or not the grid search should be parallelized) */
+  const int maximumDegreeOfParallelism = 4;
+  /* Number of crossvalidation folds: */
+  const int numberOfFolds = 3;
+  /* Specify whether the folds should be shuffled before doing crossvalidation */
+  const bool shuffleFolds = true;
+
+  /* The tunable Random Forest parameters:
+     - "N" (number of trees). In the random forests literature, this is referred to as the ntree parameter.
+       Larger number of trees produce more stable models and covariate importance estimates, but require more memory and a longer run time.
+       For small datasets, 50 trees may be sufficient. For larger datasets, 500 or more may be required. Please consult the random forests
+       literature for extensive discussion of this parameter (e.g. Cutler et al., 2007; Strobl et al., 2007; Strobl et al., 2008).
+
+     - "R" The ratio of the training set that will be used in the construction of individual trees (0<r<=1). Should be adjusted depending on
+       the noise level in the dataset in the range from 0.66 (low noise) to 0.05 (high noise). This parameter should be adjusted to achieve
+       good generalization error.
+
+     - "M" The ratio of features that will be used in the construction of individual trees (0<m<=1)
+  */
+  static Dictionary<string, IEnumerable<double>> randomForestParameterRanges = new Dictionary<string, IEnumerable<double>> {
+    { "N", ValueGenerator.GenerateSteps(5m, 10, 1).Select(x => Math.Pow(2,(double)x)) },
+    { "R", ValueGenerator.GenerateSteps(0.05m, 1, 0.05m).Select(x => (double)x) },
+    { "M", ValueGenerator.GenerateSteps(0.1m, 1, 0.1m).Select(x => (double)x) }
+  };
+
+  private static RandomForestClassificationSolution GridSearchWithCrossvalidation(IClassificationProblemData problemData, int numberOfCrossvalidationFolds, out RFParameter bestParameters,
+  int seed = 3141519) {
+    double rmsError, outOfBagRmsError, relClassificationError, outOfBagRelClassificationError;
+    bestParameters = RandomForestUtil.GridSearch(problemData, numberOfFolds, shuffleFolds, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
+    var model = RandomForestModel.CreateClassificationModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
+                                                            out rmsError, out outOfBagRmsError, out relClassificationError, out outOfBagRelClassificationError);
+    return (RandomForestClassificationSolution)model.CreateClassificationSolution(problemData);
+  }
+
+  private static RandomForestClassificationSolution GridSearch(IClassificationProblemData problemData, out RFParameter bestParameters, int seed = 3141519) {
+    double rmsError, outOfBagRmsError, relClassificationError, outOfBagRelClassificationError;
+    bestParameters = RandomForestUtil.GridSearch(problemData, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
+    var model = RandomForestModel.CreateClassificationModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
+                                                            out rmsError, out outOfBagRmsError, out relClassificationError, out outOfBagRelClassificationError);
+    return (RandomForestClassificationSolution)model.CreateClassificationSolution(problemData);
+  }
+
+  public override void Main() {
+    var variables = (Variables)vars;
+    var item = variables.SingleOrDefault(x => x.Value is IClassificationProblem || x.Value is IClassificationProblemData);
+    if (item.Equals(default(KeyValuePair<string, object>)))
+      throw new ArgumentException("Could not find a suitable problem or problem data.");
+
+    string name = item.Key;
+    IClassificationProblemData problemData;
+    if (item.Value is IClassificationProblem)
+      problemData = ((IClassificationProblem)item.Value).ProblemData;
+    else
+      problemData = (IClassificationProblemData)item.Value;
+
+    var bestParameters = new RFParameter();
+    var bestSolution = GridSearch(problemData, out bestParameters);
+    vars["bestSolution"] = bestSolution;
+    vars["bestParameters"] = bestParameters;
+
+    Console.WriteLine("Accuracy (training): " + bestSolution.TrainingAccuracy + ", Accuracy (test): " + bestSolution.TestAccuracy);
+    Console.WriteLine("Model parameters: n = {0}, r = {1}, m = {2}", bestParameters.N, bestParameters.R, bestParameters.M);
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFRegressionScriptSource.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFRegressionScriptSource.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchRFRegressionScriptSource.cs	(revision 11789)
@@ -0,0 +1,74 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Random;
+using HeuristicLab.Scripting;
+
+public class RFRegressionCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+  /* Maximum degree of parallelism (specifies whether or not the grid search should be parallelized) */
+  const int maximumDegreeOfParallelism = 4;
+  /* Number of crossvalidation folds: */
+  const int numberOfFolds = 3;
+  /* Specify whether the crossvalidation folds should be shuffled */
+  const bool shuffleFolds = true;
+
+  /* The tunable Random Forest parameters:
+     - "n" (number of trees). In the random forests literature, this is referred to as the ntree parameter.
+       Larger number of trees produce more stable models and covariate importance estimates, but require more memory and a longer run time.
+       For small datasets, 50 trees may be sufficient. For larger datasets, 500 or more may be required. Please consult the random forests
+       literature for extensive discussion of this parameter (e.g. Cutler et al., 2007; Strobl et al., 2007; Strobl et al., 2008).
+
+     - "r" The ratio of the training set that will be used in the construction of individual trees (0<r<=1). Should be adjusted depending on
+       the noise level in the dataset in the range from 0.66 (low noise) to 0.05 (high noise). This parameter should be adjusted to achieve
+       good generalization error.
+
+     - "m" The ratio of features that will be used in the construction of individual trees (0<m<=1)
+  */
+  static Dictionary<string, IEnumerable<double>> randomForestParameterRanges = new Dictionary<string, IEnumerable<double>> {
+    { "N", ValueGenerator.GenerateSteps(5m, 10, 1).Select(x => Math.Pow(2,(double)x)) },
+    { "R", ValueGenerator.GenerateSteps(0.05m, 1, 0.05m).Select(x => (double)x) },
+    { "M", ValueGenerator.GenerateSteps(0.1m, 1, 0.1m).Select(x => (double)x) }
+  };
+
+  private static RandomForestRegressionSolution GridSearchWithCrossvalidation(IRegressionProblemData problemData, out RFParameter bestParameters, int seed = 3141519) {
+    double rmsError, outOfBagRmsError, avgRelError, outOfBagAvgRelError;
+    bestParameters = RandomForestUtil.GridSearch(problemData, numberOfFolds, shuffleFolds, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
+    var model = RandomForestModel.CreateRegressionModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed, out rmsError, out outOfBagRmsError, out avgRelError, out outOfBagAvgRelError);
+    return (RandomForestRegressionSolution)model.CreateRegressionSolution(problemData);
+  }
+
+  private static RandomForestRegressionSolution GridSearch(IRegressionProblemData problemData, out RFParameter bestParameters, int seed = 3141519) {
+    double rmsError, outOfBagRmsError, avgRelError, outOfBagAvgRelError;
+    var random = new MersenneTwister();
+    bestParameters = RandomForestUtil.GridSearch(problemData, randomForestParameterRanges, seed, maximumDegreeOfParallelism);
+    var model = RandomForestModel.CreateRegressionModel(problemData, problemData.TrainingIndices, bestParameters.N, bestParameters.R, bestParameters.M, seed,
+                                                        out rmsError, out outOfBagRmsError, out avgRelError, out outOfBagAvgRelError);
+    return (RandomForestRegressionSolution)model.CreateRegressionSolution(problemData);
+  }
+
+  public override void Main() {
+    var variables = (Variables)vars;
+    var item = variables.SingleOrDefault(x => x.Value is IRegressionProblem || x.Value is IRegressionProblemData);
+    if (item.Equals(default(KeyValuePair<string, object>)))
+      throw new ArgumentException("Could not find a suitable problem or problem data.");
+
+    string name = item.Key;
+    IRegressionProblemData problemData;
+    if (item.Value is IRegressionProblem)
+      problemData = ((IRegressionProblem)item.Value).ProblemData;
+    else
+      problemData = (IRegressionProblemData)item.Value;
+
+    var bestParameters = new RFParameter();
+    var bestSolution = GridSearch(problemData, out bestParameters);
+    vars["bestSolution"] = bestSolution;
+    vars["bestParameters"] = bestParameters;
+
+    Console.WriteLine("R2 (training): " + bestSolution.TrainingRSquared + ", R2 (test): " + bestSolution.TestRSquared);
+    Console.WriteLine("Model parameters: n = {0}, r = {1}, m = {2}", bestParameters.N, bestParameters.R, bestParameters.M);
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchSVMClassificationScriptSource.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchSVMClassificationScriptSource.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchSVMClassificationScriptSource.cs	(revision 11789)
@@ -0,0 +1,106 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Scripting;
+
+using LibSVM;
+
+public class SVMClassificationCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+  /* Maximum degree of parallelism (specifies whether or not the grid search should be parallelized) */
+  const int maximumDegreeOfParallelism = 4;
+
+  /* Number of crossvalidation folds: */
+  const int numberOfFolds = 5;
+
+  /* Specify whether the folds should be shuffled */
+  const bool shuffleFolds = false;
+
+  /* The tunable SVM parameters:
+     - "C" (penalty factor) effects the trade-off between complexity and proportion of nonseparable samples and must be selected by the user. Can have any positive value.
+     - "nu" is an upper bound on the fraction of margin errors and a lower bound of the fraction of support vectors relative to the total number of training examples.
+     - "degree" represents the polynomial kernel degree
+     - "eps" (epsilon) determines the level of accuracy of the approximated function. It controls the width of the epsilon-insensitive zone used to fit the training data.
+       With optimal values of epsilon, the parameter C has negligible effect.
+     - "degree" represents the degree of the polynomial kernel
+     - "kernel_type" specifies the kernel to be used: linear, polynomial, radial basis or sigmoidal.
+       Valid values: svm_parameter.LINEAR, svm_parameter.POLY, svm_parameter.RBF, svm_parameter.SIGMOID
+     Comment or uncomment the parameter ranges below as needed.  */
+
+  static Dictionary<string, IEnumerable<double>> svmParameterRanges = new Dictionary<string, IEnumerable<double>> {
+        { "svm_type", new List<double> {svm_parameter.NU_SVC } },
+        { "kernel_type", new List<double> { svm_parameter.RBF }},
+        { "C", ValueGenerator.GenerateSteps(-1m, 10, 1).Select(x => Math.Pow(2,(double)x)) },
+        { "gamma", ValueGenerator.GenerateSteps(-4m, -1, 1).Select(x => Math.Pow(2,(double)x)) },
+//        { "eps", ValueGenerator.GenerateSteps(-8m, -1, 1).Select(x => Math.Pow(2, (double)x)) },
+        { "nu" , ValueGenerator.GenerateSteps(-10m, 0, 1m).Select(x => Math.Pow(2, (double)x)) },
+//        { "degree", ValueGenerator.GenerateSteps(1m, 4, 1).Select(x => (double)x) }
+  };
+
+  static Dictionary<int, string> svmTypes = new Dictionary<int, string> {
+    { svm_parameter.NU_SVC, "NU_SVC" },
+    { svm_parameter.C_SVC, "C_SVC" }
+  };
+
+  static Dictionary<int, string> kernelTypes = new Dictionary<int, string> {
+    { svm_parameter.LINEAR, "LINEAR" },
+    { svm_parameter.POLY, "POLY" },
+    { svm_parameter.RBF, "RBF" },
+    { svm_parameter.SIGMOID, "SIGMOID" }
+  };
+
+  private static SupportVectorClassificationSolution SvmGridSearch(IClassificationProblemData problemData, out svm_parameter bestParameters, out int nSv, out double cvMse) {
+    bestParameters = SupportVectorMachineUtil.GridSearch(out cvMse, problemData, svmParameterRanges, numberOfFolds, shuffleFolds, maximumDegreeOfParallelism);
+    double trainingError, testError;
+    string svmType = svmTypes[bestParameters.svm_type];
+    string kernelType = kernelTypes[bestParameters.kernel_type];
+    var svm_solution = SupportVectorClassification.CreateSupportVectorClassificationSolution(problemData, problemData.AllowedInputVariables, svmType, kernelType,
+                       bestParameters.C, bestParameters.nu, bestParameters.gamma, bestParameters.degree, out trainingError, out testError, out nSv);
+    return svm_solution;
+  }
+
+  public override void Main() {
+    var variables = (Variables)vars;
+    var item = variables.SingleOrDefault(x => x.Value is IClassificationProblem || x.Value is IClassificationProblemData);
+    if (item.Equals(default(KeyValuePair<string, object>)))
+      throw new ArgumentException("Could not find a suitable problem or problem data.");
+
+    string name = item.Key;
+    IClassificationProblemData problemData;
+    if (item.Value is IClassificationProblem)
+      problemData = ((IClassificationProblem)item.Value).ProblemData;
+    else
+      problemData = (IClassificationProblemData)item.Value;
+
+    int nSv; // number of support vectors
+    double cvMse;
+    svm_parameter bestParameters;
+    var bestSolution = SvmGridSearch(problemData, out bestParameters, out nSv, out cvMse);
+
+    vars["bestSolution"] = bestSolution;
+    Console.WriteLine(name + " parameters: C = {0}, g = {1:0.000}, eps = {2:0.000}, nu = {3:0.000}, degree = {4}", bestParameters.C, bestParameters.gamma, bestParameters.eps, bestParameters.nu, bestParameters.degree);
+    Console.WriteLine(name + " best solution accuracy (training): " + bestSolution.TrainingAccuracy + ", accuracy (test): " + bestSolution.TestAccuracy);
+
+    var bestParametersCollection = new ParameterCollection();
+    foreach (var p in svmParameterRanges.Keys) {
+      var getter = GenerateGetter(p);
+      bestParametersCollection.Add(new FixedValueParameter<DoubleValue>(p, new DoubleValue(getter(bestParameters))));
+    }
+    vars["bestParameters"] = bestParametersCollection;
+  }
+
+  private static Func<svm_parameter, double> GenerateGetter(string field) {
+    var paramExpr = Expression.Parameter(typeof(svm_parameter));
+    var getterExpr = Expression.Convert(Expression.Field(paramExpr, field), typeof(double)); // cast to double
+    Func<svm_parameter, double> f = Expression.Lambda<Func<svm_parameter, double>>(getterExpr, paramExpr).Compile();
+    return f;
+  }
+}
+
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchSVMRegressionScriptSource.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchSVMRegressionScriptSource.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/GridSearchSVMRegressionScriptSource.cs	(revision 11789)
@@ -0,0 +1,107 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Linq.Expressions;
+
+using HeuristicLab.Algorithms.DataAnalysis;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Parameters;
+using HeuristicLab.Problems.DataAnalysis;
+using HeuristicLab.Problems.Instances.DataAnalysis;
+using HeuristicLab.Scripting;
+
+using LibSVM;
+
+public class SVMRegressionCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+  /* Maximum degree of parallelism (specifies whether or not the grid search should be parallelized) */
+  const int maximumDegreeOfParallelism = 4;
+
+  /* Number of crossvalidation folds: */
+  const int numberOfFolds = 5;
+
+  /* Specify whether the folds should be shuffled */
+  const bool shuffleFolds = false;
+
+  /* The tunable SVM parameters:
+     - "C" (penalty factor) effects the trade-off between complexity and proportion of nonseparable samples and must be selected by the user. Can have any positive value.
+     - "nu" is an upper bound on the fraction of margin errors and a lower bound of the fraction of support vectors relative to the total number of training examples.
+     - "degree" represents the polynomial kernel degree
+     - "eps" (epsilon) determines the level of accuracy of the approximated function. It controls the width of the epsilon-insensitive zone used to fit the training data.
+       With optimal values of epsilon, the parameter C has negligible effect.
+     - "degree" represents the degree of the polynomial kernel
+     - "kernel_type" specifies the kernel to be used: linear, polynomial, radial basis or sigmoidal.
+       Valid values: svm_parameter.LINEAR, svm_parameter.POLY, svm_parameter.RBF, svm_parameter.SIGMOID
+     Comment or uncomment the parameter ranges below as needed.  */
+
+  static Dictionary<string, IEnumerable<double>> svmParameterRanges = new Dictionary<string, IEnumerable<double>> {
+        { "svm_type", new List<double> {svm_parameter.NU_SVR } },
+        { "kernel_type", new List<double> { svm_parameter.RBF }},
+        { "C", ValueGenerator.GenerateSteps(-1m, 12, 1).Select(x => Math.Pow(2, (double)x)) },
+        { "gamma", ValueGenerator.GenerateSteps(-4m, -1, 1).Select(x => Math.Pow(2, (double)x)) },
+//        { "eps", ValueGenerator.GenerateSteps(-8m, -1, 1).Select(x => Math.Pow(2, (double)x)) },
+        { "nu" , ValueGenerator.GenerateSteps(-10m, 0, 1m).Select(x => Math.Pow(2, (double)x)) },
+//        { "degree", ValueGenerator.GenerateSteps(1m, 4, 1).Select(x => (double)x) }
+  };
+
+  static Dictionary<int, string> svmTypes = new Dictionary<int, string> {
+    { svm_parameter.NU_SVR, "NU_SVR" },
+    { svm_parameter.EPSILON_SVR, "EPSILON_SVR" }
+  };
+
+  static Dictionary<int, string> kernelTypes = new Dictionary<int, string> {
+    { svm_parameter.LINEAR, "LINEAR" },
+    { svm_parameter.POLY, "POLY" },
+    { svm_parameter.RBF, "RBF" },
+    { svm_parameter.SIGMOID, "SIGMOID" }
+  };
+
+  private static SupportVectorRegressionSolution SvmGridSearch(IRegressionProblemData problemData, out svm_parameter bestParameters, out int nSv, out double cvMse) {
+    bestParameters = SupportVectorMachineUtil.GridSearch(out cvMse, problemData, svmParameterRanges, numberOfFolds, shuffleFolds, maximumDegreeOfParallelism);
+    double trainingError, testError;
+    string svmType = svmTypes[bestParameters.svm_type];
+    string kernelType = kernelTypes[bestParameters.kernel_type];
+    var svm_solution = SupportVectorRegression.CreateSupportVectorRegressionSolution(problemData, problemData.AllowedInputVariables, svmType, kernelType,
+                       bestParameters.C, bestParameters.nu, bestParameters.gamma, bestParameters.eps, bestParameters.degree, out trainingError, out testError, out nSv);
+    return svm_solution;
+  }
+
+  public override void Main() {
+    var variables = (Variables)vars;
+    var item = variables.SingleOrDefault(x => x.Value is IRegressionProblem || x.Value is IRegressionProblemData);
+    if (item.Equals(default(KeyValuePair<string, object>)))
+      throw new ArgumentException("Could not find a suitable problem or problem data.");
+
+    string name = item.Key;
+    IRegressionProblemData problemData;
+    if (item.Value is IRegressionProblem)
+      problemData = ((IRegressionProblem)item.Value).ProblemData;
+    else
+      problemData = (IRegressionProblemData)item.Value;
+
+    int nSv; // number of support vectors
+    double cvMse;
+    svm_parameter bestParameters;
+    var bestSolution = SvmGridSearch(problemData, out bestParameters, out nSv, out cvMse);
+
+    vars["bestSolution"] = bestSolution;
+    Console.WriteLine(name + " parameters: C = {0}, g = {1:0.000}, eps = {2:0.000}, nu = {3:0.000}, degree = {4}", bestParameters.C, bestParameters.gamma, bestParameters.eps, bestParameters.nu, bestParameters.degree);
+    Console.WriteLine(name + " best solution mse (training): " + bestSolution.TrainingMeanSquaredError + ", mse (test): " + bestSolution.TestMeanSquaredError);
+    Console.WriteLine(name + " best solution R2 (training): " + bestSolution.TrainingRSquared + ", R2 (test): " + bestSolution.TestRSquared);
+
+    var bestParametersCollection = new ParameterCollection();
+    foreach (var p in svmParameterRanges.Keys) {
+      var getter = GenerateGetter(p);
+      bestParametersCollection.Add(new FixedValueParameter<DoubleValue>(p, new DoubleValue(getter(bestParameters))));
+    }
+    vars["bestParameters"] = bestParametersCollection;
+  }
+
+  private static Func<svm_parameter, double> GenerateGetter(string field) {
+    var paramExpr = Expression.Parameter(typeof(svm_parameter));
+    var getterExpr = Expression.Convert(Expression.Field(paramExpr, field), typeof(double)); // cast to double
+    Func<svm_parameter, double> f = Expression.Lambda<Func<svm_parameter, double>>(getterExpr, paramExpr).Compile();
+    return f;
+  }
+}
+
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/OSGARastriginScriptSource.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/OSGARastriginScriptSource.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/OSGARastriginScriptSource.cs	(revision 11789)
@@ -0,0 +1,111 @@
+﻿using System;
+using System.Linq;
+
+public class OSGARastriginScript : HeuristicLab.Scripting.CSharpScriptBase {
+  public override void Main() {
+    int N = vars.N.Value;
+    double minX = vars.minX.Value;
+    double maxX = vars.maxX.Value;
+    int seed = vars.seed.Value;
+    var rand = new Random(seed);
+
+    var result = OSGA(rand, popSize: 1000, iterations: 5000, maxSelPres: 1000, mutationRate: 0.1,
+         obj: Rastrigin,
+      // x ~(i.i.d) U(0,1) * 10.24 - 5.12
+         creator: () => Enumerable.Range(1, N).Select(_ => rand.NextDouble() * (maxX - minX) + minX).ToArray(),
+      // random parent selection
+         selector: (f) => rand.Next(f.Length),
+      // single point crossover
+         crossover: (p0, p1, cand) => {
+           int cut = rand.Next(cand.Length);
+           Array.Copy(p0, cand, cut);
+           Array.Copy(p1, cut, cand, cut, cand.Length - cut);
+         },
+      // single point manipulation
+         manipulator: (p) => p[rand.Next(N)] = rand.NextDouble() * (maxX - minX) + minX,
+         output: true
+      );
+
+    double bestFit = result.Item2;
+    vars.bestFitness = bestFit;
+    Console.WriteLine("best fitness: {0}", bestFit);
+  }
+
+  private double Rastrigin(double[] x) {
+    return 10.0 * x.Length + x.Sum(xi => xi * xi - 10.0 * Math.Cos(2.0 * Math.PI * xi));
+  }
+
+  private Tuple<T, double> OSGA<T>(Random rand, int popSize, int iterations, double maxSelPres, double mutationRate, Func<T, double> obj,
+      Func<T> creator, Func<double[], int> selector, Action<T, T, T> crossover, Action<T> manipulator,
+      bool output = false)
+      where T : ICloneable {
+    // generate random pop
+    T[] pop = Enumerable.Range(0, popSize).Select(_ => creator()).ToArray();
+    // evaluate initial pop
+    double[] fit = pop.Select(p => obj(p)).ToArray();
+
+    // arrays for next pop (clone current pop because solutions are reused)
+    T[] popNew = pop.Select(pi => (T)pi.Clone()).ToArray();
+    double[] fitNew = new double[popSize];
+
+    var bestSolution = (T)pop.First().Clone(); // take a random solution (don't care)
+    double bestFit = fit.First();
+
+    // run generations
+    double curSelPres = 0;
+    for (int g = 0; g < iterations && curSelPres < maxSelPres; g++) {
+      // keep the first element as elite
+      int i = 1;
+      int genEvals = 0;
+      do {
+        var p1Idx = selector(fit);
+        var p2Idx = selector(fit);
+
+        var p1 = pop[p1Idx];
+        var p2 = pop[p2Idx];
+        var f1 = fit[p1Idx];
+        var f2 = fit[p2Idx];
+
+        // generate candidate solution (reuse old solutions)
+        crossover(p1, p2, popNew[i]);
+        // optional mutation
+        if (rand.NextDouble() < mutationRate) {
+          manipulator(popNew[i]);
+        }
+
+        double f = obj(popNew[i]);
+        genEvals++;
+        // if child is better than best (strict offspring selection)
+        if (f < Math.Min(f1, f2)) {
+          // update best fitness
+          if (f < bestFit) {
+            bestFit = f;
+            bestSolution = (T)popNew[i].Clone(); // overall best
+          }
+
+          // keep
+          fitNew[i] = f;
+          i++;
+        }
+
+        curSelPres = genEvals / (double)popSize;
+      } while (i < popNew.Length && curSelPres < maxSelPres);
+
+      Console.WriteLine("generation {0} obj {1:0.000} sel. pres. {2:###.0}", g, bestFit, curSelPres);
+
+      // swap 
+      var tmpPop = pop;
+      var tmpFit = fit;
+      pop = popNew;
+      fit = fitNew;
+      popNew = tmpPop;
+      fitNew = tmpFit;
+
+      // keep elite
+      popNew[0] = (T)bestSolution.Clone();
+      fitNew[0] = bestFit;
+    }
+
+    return Tuple.Create(bestSolution, bestFit);
+  }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/ScriptSources.Designer.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/ScriptSources.Designer.cs	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/ScriptSources.Designer.cs	(revision 11789)
@@ -0,0 +1,229 @@
+﻿//------------------------------------------------------------------------------
+// <auto-generated>
+//     This code was generated by a tool.
+//     Runtime Version:4.0.30319.34014
+//
+//     Changes to this file may cause incorrect behavior and will be lost if
+//     the code is regenerated.
+// </auto-generated>
+//------------------------------------------------------------------------------
+
+namespace HeuristicLab.Tests {
+    using System;
+    
+    
+    /// <summary>
+    ///   A strongly-typed resource class, for looking up localized strings, etc.
+    /// </summary>
+    // This class was auto-generated by the StronglyTypedResourceBuilder
+    // class via a tool like ResGen or Visual Studio.
+    // To add or remove a member, edit your .ResX file then rerun ResGen
+    // with the /str option, or rebuild your VS project.
+    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
+    [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
+    internal class ScriptSources {
+        
+        private static global::System.Resources.ResourceManager resourceMan;
+        
+        private static global::System.Globalization.CultureInfo resourceCulture;
+        
+        [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
+        internal ScriptSources() {
+        }
+        
+        /// <summary>
+        ///   Returns the cached ResourceManager instance used by this class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Resources.ResourceManager ResourceManager {
+            get {
+                if (object.ReferenceEquals(resourceMan, null)) {
+                    global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("HeuristicLab.Tests.HeuristicLab.Scripting_3._3.Script_Sources.ScriptSources", typeof(ScriptSources).Assembly);
+                    resourceMan = temp;
+                }
+                return resourceMan;
+            }
+        }
+        
+        /// <summary>
+        ///   Overrides the current thread's CurrentUICulture property for all
+        ///   resource lookups using this strongly typed resource class.
+        /// </summary>
+        [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
+        internal static global::System.Globalization.CultureInfo Culture {
+            get {
+                return resourceCulture;
+            }
+            set {
+                resourceCulture = value;
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Linq;
+        ///
+        ///using HeuristicLab.Analysis;
+        ///using HeuristicLab.Data;
+        ///using HeuristicLab.Encodings.PermutationEncoding;
+        ///using HeuristicLab.Problems.Instances.QAPLIB;
+        ///using HeuristicLab.Problems.QuadraticAssignment;
+        ///using HeuristicLab.Random;
+        ///
+        ///public class GAQAPScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  public override void Main() {
+        ///    DateTime start = DateTime.UtcNow;
+        ///
+        ///    QuadraticAssignmentProblem qap;
+        ///    if (vars.Contains(&quot;qap&quot;)) qap = vars.qap;
+        ///    else {
+        ///  [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string GAQAPScriptSource {
+            get {
+                return ResourceManager.GetString("GAQAPScriptSource", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Collections.Generic;
+        ///using System.Linq;
+        ///
+        ///using HeuristicLab.Algorithms.DataAnalysis;
+        ///using HeuristicLab.Problems.DataAnalysis;
+        ///using HeuristicLab.Problems.Instances.DataAnalysis;
+        ///using HeuristicLab.Scripting;
+        ///
+        ///public class RFClassificationCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  /* Maximum degree of parallelism (specifies whether or not the grid search should be parallelized) */
+        ///  const int maximumDegreeOfParallelism = 4;
+        ///  /* Number of cross [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string GridSearchRFClassificationScriptSource {
+            get {
+                return ResourceManager.GetString("GridSearchRFClassificationScriptSource", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Collections.Generic;
+        ///using System.Linq;
+        ///
+        ///using HeuristicLab.Algorithms.DataAnalysis;
+        ///using HeuristicLab.Problems.DataAnalysis;
+        ///using HeuristicLab.Problems.Instances.DataAnalysis;
+        ///using HeuristicLab.Random;
+        ///using HeuristicLab.Scripting;
+        ///
+        ///public class RFRegressionCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  /* Maximum degree of parallelism (specifies whether or not the grid search should be parallelized) */
+        ///  const int maximumDegreeOfParallelism =  [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string GridSearchRFRegressionScriptSource {
+            get {
+                return ResourceManager.GetString("GridSearchRFRegressionScriptSource", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Collections.Generic;
+        ///using System.Linq;
+        ///using System.Linq.Expressions;
+        ///
+        ///using HeuristicLab.Algorithms.DataAnalysis;
+        ///using HeuristicLab.Core;
+        ///using HeuristicLab.Data;
+        ///using HeuristicLab.Parameters;
+        ///using HeuristicLab.Problems.DataAnalysis;
+        ///using HeuristicLab.Problems.Instances.DataAnalysis;
+        ///using HeuristicLab.Scripting;
+        ///
+        ///using LibSVM;
+        ///
+        ///public class SVMClassificationCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  /* Maximum degree of parallelism ( [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string GridSearchSVMClassificationScriptSource {
+            get {
+                return ResourceManager.GetString("GridSearchSVMClassificationScriptSource", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Collections.Generic;
+        ///using System.Linq;
+        ///using System.Linq.Expressions;
+        ///
+        ///using HeuristicLab.Algorithms.DataAnalysis;
+        ///using HeuristicLab.Core;
+        ///using HeuristicLab.Data;
+        ///using HeuristicLab.Parameters;
+        ///using HeuristicLab.Problems.DataAnalysis;
+        ///using HeuristicLab.Problems.Instances.DataAnalysis;
+        ///using HeuristicLab.Scripting;
+        ///
+        ///using LibSVM;
+        ///
+        ///public class SVMRegressionCrossValidationScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  /* Maximum degree of parallelism (spec [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string GridSearchSVMRegressionScriptSource {
+            get {
+                return ResourceManager.GetString("GridSearchSVMRegressionScriptSource", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Linq;
+        ///using System.Threading;
+        ///using System.Windows.Forms;
+        ///
+        ///using HeuristicLab.Algorithms.GeneticAlgorithm;
+        ///using HeuristicLab.Core;
+        ///using HeuristicLab.MainForm;
+        ///using HeuristicLab.MainForm.WindowsForms;
+        ///using HeuristicLab.Optimization;
+        ///using HeuristicLab.Optimization.Views;
+        ///using HeuristicLab.Problems.TravelingSalesman;
+        ///
+        ///public class GUIAutomationScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  readonly ManualResetEvent mutex = new ManualResetEvent(false);
+        ///
+        ///  p [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string GUIAutomationScriptSource {
+            get {
+                return ResourceManager.GetString("GUIAutomationScriptSource", resourceCulture);
+            }
+        }
+        
+        /// <summary>
+        ///   Looks up a localized string similar to using System;
+        ///using System.Linq;
+        ///
+        ///public class OSGARastriginScript : HeuristicLab.Scripting.CSharpScriptBase {
+        ///  public override void Main() {
+        ///    int N = vars.N.Value;
+        ///    double minX = vars.minX.Value;
+        ///    double maxX = vars.maxX.Value;
+        ///    int seed = vars.seed.Value;
+        ///    var rand = new Random(seed);
+        ///
+        ///    var result = OSGA(rand, popSize: 1000, iterations: 5000, maxSelPres: 1000, mutationRate: 0.1,
+        ///         obj: Rastrigin,
+        ///      // x ~(i.i.d) U(0,1) * 10.24 - 5.12
+        ///         creator: () =&gt; Enum [rest of string was truncated]&quot;;.
+        /// </summary>
+        internal static string OSGARastriginScriptSource {
+            get {
+                return ResourceManager.GetString("OSGARastriginScriptSource", resourceCulture);
+            }
+        }
+    }
+}
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/ScriptSources.resx
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/ScriptSources.resx	(revision 11789)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/Script Sources/ScriptSources.resx	(revision 11789)
@@ -0,0 +1,142 @@
+﻿<?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>
+  <assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
+  <data name="GAQAPScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>gaqapscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
+  </data>
+  <data name="GridSearchRFClassificationScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>gridsearchrfclassificationscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+  <data name="GridSearchRFRegressionScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>gridsearchrfregressionscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+  <data name="GridSearchSVMClassificationScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>gridsearchsvmclassificationscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+  <data name="GridSearchSVMRegressionScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>gridsearchsvmregressionscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252</value>
+  </data>
+  <data name="GUIAutomationScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>guiautomationscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
+  </data>
+  <data name="OSGARastriginScriptSource" type="System.Resources.ResXFileRef, System.Windows.Forms">
+    <value>osgarastriginscriptsource.cs;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;utf-8</value>
+  </data>
+</root>
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/ScriptingUtils.cs
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/ScriptingUtils.cs	(revision 11788)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Scripting-3.3/ScriptingUtils.cs	(revision 11789)
@@ -21,5 +21,4 @@
 
 using System;
-using System.IO;
 using System.Threading;
 using HeuristicLab.Scripting;
@@ -47,9 +46,4 @@
       return (T)a.VariableStore[resultName];
     }
-
-    public static string LoadScriptCodeFromFile(string scriptName) {
-      string path = Path.Combine(ScriptSourcesDirectory, scriptName + ScriptSourceFileExtension);
-      return File.ReadAllText(path);
-    }
   }
 }
Index: /trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj
===================================================================
--- /trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 11788)
+++ /trunk/sources/HeuristicLab.Tests/HeuristicLab.Tests.csproj	(revision 11789)
@@ -522,32 +522,37 @@
     <Compile Include="HeuristicLab.Problems.VehicleRouting-3.4\VRPInstancesTest.cs" />
     <Compile Include="HeuristicLab.Random-3.3\RandomEnumerableSampleTest.cs" />
-    <Compile Include="HeuristicLab.Scripting-3.3\Scripts\GAQAPScriptTest.cs" />
-    <Compile Include="HeuristicLab.Scripting-3.3\Scripts\GridSearchRFClassificationScriptTest.cs" />
-    <Compile Include="HeuristicLab.Scripting-3.3\Scripts\GridSearchRFRegressionScriptTest.cs" />
-    <Compile Include="HeuristicLab.Scripting-3.3\Scripts\GridSearchSVMClassificationScriptTest.cs" />
-    <Compile Include="HeuristicLab.Scripting-3.3\Scripts\GridSearchSVMRegressionScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\GAQAPScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\GridSearchRFClassificationScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\GridSearchRFRegressionScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\GridSearchSVMClassificationScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\GridSearchSVMRegressionScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\ScriptSources.Designer.cs">
+      <AutoGen>True</AutoGen>
+      <DesignTime>True</DesignTime>
+      <DependentUpon>ScriptSources.resx</DependentUpon>
+    </Compile>
     <Compile Include="HeuristicLab.Scripting-3.3\ScriptingUtils.cs" />
-    <Compile Include="HeuristicLab.Scripting-3.3\Scripts\GUIAutomationScriptTest.cs" />
-    <Compile Include="HeuristicLab.Scripting-3.3\Scripts\OSGARastriginScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\GUIAutomationScriptTest.cs" />
+    <Compile Include="HeuristicLab.Scripting-3.3\OSGARastriginScriptTest.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
-    <Compile Include="Test Resources\Script Sources\GridSearch_RF_Classification_Script.cs">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Compile>
-    <Compile Include="Test Resources\Script Sources\GridSearch_RF_Regression_Script.cs">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Compile>
-    <Compile Include="Test Resources\Script Sources\GridSearch_SVM_Classification_Script.cs">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Compile>
-    <Compile Include="Test Resources\Script Sources\GridSearch_SVM_Regression_Script.cs">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Compile>
-    <Compile Include="Test Resources\Script Sources\GA_QAP_Script.cs">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Compile>
-    <Compile Include="Test Resources\Script Sources\OSGA_Rastrigin_Script.cs">
-      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
-    </Compile>
-    <Compile Include="Test Resources\Script Sources\GUI_Automation_Script.cs">
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\GridSearchRFClassificationScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\GridSearchRFRegressionScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\GridSearchSVMClassificationScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\GridSearchSVMRegressionScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\GAQAPScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\OSGARastriginScriptSource.cs">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Compile>
+    <Compile Include="HeuristicLab.Scripting-3.3\Script Sources\GUIAutomationScriptSource.cs">
       <CopyToOutputDirectory>Always</CopyToOutputDirectory>
     </Compile>
@@ -592,5 +597,11 @@
     </Content>
   </ItemGroup>
-  <ItemGroup />
+  <ItemGroup>
+    <EmbeddedResource Include="HeuristicLab.Scripting-3.3\Script Sources\ScriptSources.resx">
+      <Generator>ResXFileCodeGenerator</Generator>
+      <LastGenOutput>ScriptSources.Designer.cs</LastGenOutput>
+      <CustomToolNamespace>HeuristicLab.Tests</CustomToolNamespace>
+    </EmbeddedResource>
+  </ItemGroup>
   <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
