Index: branches/3026_IntegrationIntoSymSpace/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs
===================================================================
--- branches/3026_IntegrationIntoSymSpace/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs	(revision 17228)
+++ branches/3026_IntegrationIntoSymSpace/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/SubtreeCrossover.cs	(revision 17928)
@@ -43,4 +43,5 @@
     private const string MaximumSymbolicExpressionTreeLengthParameterName = "MaximumSymbolicExpressionTreeLength";
     private const string MaximumSymbolicExpressionTreeDepthParameterName = "MaximumSymbolicExpressionTreeDepth";
+    private const string CrossoverProbabilityParameterName = "CrossoverProbability";
 
     #region Parameter Properties
@@ -53,4 +54,7 @@
     public IValueLookupParameter<IntValue> MaximumSymbolicExpressionTreeDepthParameter {
       get { return (IValueLookupParameter<IntValue>)Parameters[MaximumSymbolicExpressionTreeDepthParameterName]; }
+    }
+    public IFixedValueParameter<PercentValue> CrossoverProbabilityParameter {
+      get { return (IFixedValueParameter<PercentValue>)Parameters[CrossoverProbabilityParameterName]; }
     }
     #endregion
@@ -64,4 +68,8 @@
     public IntValue MaximumSymbolicExpressionTreeDepth {
       get { return MaximumSymbolicExpressionTreeDepthParameter.ActualValue; }
+    }
+    public double CrossoverProbability {
+      get { return CrossoverProbabilityParameter.Value.Value; }
+      set { CrossoverProbabilityParameter.Value.Value = value; }
     }
     #endregion
@@ -73,5 +81,19 @@
       Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeLengthParameterName, "The maximal length (number of nodes) of the symbolic expression tree."));
       Parameters.Add(new ValueLookupParameter<IntValue>(MaximumSymbolicExpressionTreeDepthParameterName, "The maximal depth of the symbolic expression tree (a tree with one node has depth = 0)."));
-      Parameters.Add(new ValueLookupParameter<PercentValue>(InternalCrossoverPointProbabilityParameterName, "The probability to select an internal crossover point (instead of a leaf node).", new PercentValue(0.9)));
+      Parameters.Add(new ValueLookupParameter<PercentValue>(InternalCrossoverPointProbabilityParameterName, "The probability to select an internal crossover point (instead of a leaf node).", new PercentValue(0.9, true)));
+      Parameters.Add(new FixedValueParameter<PercentValue>(CrossoverProbabilityParameterName, "The probability that a crossover is performed. Otherwise a copy of the first parent is returned.", new PercentValue(1, true)));
+    }
+
+    [StorableHook(HookType.AfterDeserialization)]
+    private void AfterDeserialization() {
+      // replace with PercentValue for files which had CrossoverProbability as DoubleValue
+      if (Parameters.ContainsKey(CrossoverProbabilityParameterName) && (Parameters[CrossoverProbabilityParameterName] is IFixedValueParameter<DoubleValue> oldParam)) {
+        var oldValue = oldParam.Value.Value;
+        Parameters.Remove(oldParam);
+        Parameters.Add(new FixedValueParameter<PercentValue>(CrossoverProbabilityParameterName, "The probability that a crossover is performed. Otherwise a copy of the first parent is returned.", new PercentValue(oldValue)));
+      }
+      if (!Parameters.ContainsKey(CrossoverProbabilityParameterName)) {
+        Parameters.Add(new FixedValueParameter<PercentValue>(CrossoverProbabilityParameterName, "The probability that a crossover is performed. Otherwise a copy of the first parent is returned.", new PercentValue(1, true)));
+      }
     }
 
@@ -82,5 +104,5 @@
     public override ISymbolicExpressionTree Crossover(IRandom random,
       ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1) {
-      return Cross(random, parent0, parent1, InternalCrossoverPointProbability.Value,
+      return Cross(random, parent0, parent1, CrossoverProbability, InternalCrossoverPointProbability.Value,
         MaximumSymbolicExpressionTreeLength.Value, MaximumSymbolicExpressionTreeDepth.Value);
     }
@@ -88,5 +110,7 @@
     public static ISymbolicExpressionTree Cross(IRandom random,
       ISymbolicExpressionTree parent0, ISymbolicExpressionTree parent1,
+      double probability,
       double internalCrossoverPointProbability, int maxTreeLength, int maxTreeDepth) {
+      if ((probability < 1) && (random.NextDouble() >= probability)) return parent0;
       // select a random crossover point in the first parent 
       CutPoint crossoverPoint0;
