Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariableTreeNode.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariableTreeNode.cs	(revision 14751)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariableTreeNode.cs	(revision 14758)
@@ -56,6 +56,6 @@
 
     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
-      // 50% additive & 50% multiplicative
-      if (random.NextDouble() < 0.5) {
+      // 50% additive & 50% multiplicative (override of functionality of base class because of a BUG)
+      if(random.NextDouble() < 0.5) {
         double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu, Symbol.WeightManipulatorSigma);
         Weight = Weight + x * shakingFactor;
@@ -64,6 +64,10 @@
         Weight = Weight * x;
       }
-      if (random.NextDouble() < 0.2) {
+      if(random.NextDouble() < Symbol.VariableChangeProbability) {
+        var oldName = VariableName;
         VariableName = Symbol.VariableNames.SampleRandom(random);
+        // reinitialize weights if variable has changed (similar to FactorVariableTreeNode)
+        if(oldName != VariableName)
+          Weight = NormalDistributedRandom.NextDouble(random, Symbol.WeightMu, Symbol.WeightSigma);
       }
       variableValue = Symbol.GetVariableValues(VariableName).SampleRandom(random);
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FactorVariableTreeNode.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FactorVariableTreeNode.cs	(revision 14751)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/FactorVariableTreeNode.cs	(revision 14758)
@@ -75,5 +75,16 @@
 
     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
-      if(random.NextDouble() < 0.2) {
+      // mutate only one randomly selected weight
+      var idx = random.Next(weights.Length);
+      // 50% additive & 50% multiplicative
+      if(random.NextDouble() < 0.5) {
+        double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu,
+          Symbol.WeightManipulatorSigma);
+        weights[idx] = weights[idx] + x * shakingFactor;
+      } else {
+        double x = NormalDistributedRandom.NextDouble(random, 1.0, Symbol.MultiplicativeWeightManipulatorSigma);
+        weights[idx] = weights[idx] * x;
+      }
+      if(random.NextDouble() < Symbol.VariableChangeProbability) {
         VariableName = Symbol.VariableNames.SampleRandom(random);
         if(weights.Length != Symbol.GetVariableValues(VariableName).Count()) {
@@ -83,16 +94,4 @@
               .Select(_ => NormalDistributedRandom.NextDouble(random, 0, 1))
               .ToArray();
-        }
-      } else {
-        // mutate only one randomly selected weight
-        var idx = random.Next(weights.Length);
-        // 50% additive & 50% multiplicative
-        if(random.NextDouble() < 0.5) {
-          double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu,
-            Symbol.WeightManipulatorSigma);
-          weights[idx] = weights[idx] + x * shakingFactor;
-        } else {
-          double x = NormalDistributedRandom.NextDouble(random, 1.0, Symbol.MultiplicativeWeightManipulatorSigma);
-          weights[idx] = weights[idx] * x;
         }
       }
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableBase.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableBase.cs	(revision 14751)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableBase.cs	(revision 14758)
@@ -34,5 +34,5 @@
       get { return weightMu; }
       set {
-        if (value != weightMu) {
+        if(value != weightMu) {
           weightMu = value;
           OnChanged(EventArgs.Empty);
@@ -45,6 +45,6 @@
       get { return weightSigma; }
       set {
-        if (weightSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
-        if (value != weightSigma) {
+        if(weightSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
+        if(value != weightSigma) {
           weightSigma = value;
           OnChanged(EventArgs.Empty);
@@ -57,5 +57,5 @@
       get { return weightManipulatorMu; }
       set {
-        if (value != weightManipulatorMu) {
+        if(value != weightManipulatorMu) {
           weightManipulatorMu = value;
           OnChanged(EventArgs.Empty);
@@ -68,6 +68,6 @@
       get { return weightManipulatorSigma; }
       set {
-        if (weightManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
-        if (value != weightManipulatorSigma) {
+        if(weightManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
+        if(value != weightManipulatorSigma) {
           weightManipulatorSigma = value;
           OnChanged(EventArgs.Empty);
@@ -80,6 +80,6 @@
       get { return multiplicativeWeightManipulatorSigma; }
       set {
-        if (multiplicativeWeightManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
-        if (value != multiplicativeWeightManipulatorSigma) {
+        if(multiplicativeWeightManipulatorSigma < 0.0) throw new ArgumentException("Negative sigma is not allowed.");
+        if(value != multiplicativeWeightManipulatorSigma) {
           multiplicativeWeightManipulatorSigma = value;
           OnChanged(EventArgs.Empty);
@@ -87,4 +87,16 @@
       }
     }
+
+    [Storable(DefaultValue = 1.0)]
+    private double variableChangeProbability;
+
+    public double VariableChangeProbability {
+      get { return VariableChangeProbability; }
+      set {
+        if(value < 0 || value > 1.0) throw new ArgumentException("Variable change probability must lie in the interval [0..1]");
+        variableChangeProbability = value;
+      }
+    }
+
     private List<string> variableNames;
     [Storable]
@@ -92,5 +104,5 @@
       get { return variableNames; }
       set {
-        if (value == null) throw new ArgumentNullException();
+        if(value == null) throw new ArgumentNullException();
         variableNames.Clear();
         variableNames.AddRange(value);
@@ -104,5 +116,5 @@
       get { return allVariableNames; }
       set {
-        if (value == null) throw new ArgumentNullException();
+        if(value == null) throw new ArgumentNullException();
         allVariableNames.Clear();
         allVariableNames.AddRange(value);
@@ -112,9 +124,9 @@
     public override bool Enabled {
       get {
-        if (variableNames.Count == 0) return false;
+        if(variableNames.Count == 0) return false;
         return base.Enabled;
       }
       set {
-        if (variableNames.Count == 0) base.Enabled = false;
+        if(variableNames.Count == 0) base.Enabled = false;
         else base.Enabled = value;
       }
@@ -134,5 +146,5 @@
     [StorableHook(HookType.AfterDeserialization)]
     private void AfterDeserialization() {
-      if (allVariableNames == null || (allVariableNames.Count == 0 && variableNames.Count > 0)) {
+      if(allVariableNames == null || (allVariableNames.Count == 0 && variableNames.Count > 0)) {
         allVariableNames = variableNames;
       }
@@ -154,5 +166,6 @@
       weightManipulatorSigma = original.weightManipulatorSigma;
       multiplicativeWeightManipulatorSigma = original.multiplicativeWeightManipulatorSigma;
-    }
+      variableChangeProbability = original.variableChangeProbability;
+      }
     protected VariableBase(string name, string description)
       : base(name, description) {
@@ -162,4 +175,5 @@
       weightManipulatorSigma = 0.05;
       multiplicativeWeightManipulatorSigma = 0.03;
+      variableChangeProbability = 0.2;
       variableNames = new List<string>();
       allVariableNames = new List<string>();
Index: branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableTreeNodeBase.cs
===================================================================
--- branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableTreeNodeBase.cs	(revision 14751)
+++ branches/symbreg-factors-2650/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/VariableTreeNodeBase.cs	(revision 14758)
@@ -69,6 +69,5 @@
     public override void ShakeLocalParameters(IRandom random, double shakingFactor) {
       base.ShakeLocalParameters(random, shakingFactor);
-      // 50% additive & 50% multiplicative
-      if (random.NextDouble() < 0) {
+      if(random.NextDouble() < 0) {
         double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu, Symbol.WeightManipulatorSigma);
         weight = weight + x * shakingFactor;
@@ -77,11 +76,17 @@
         weight = weight * x;
       }
+      if(Symbol.VariableChangeProbability >= 1.0 || random.NextDouble() < Symbol.VariableChangeProbability) {
+        var oldName = variableName;
 #pragma warning disable 612, 618
-      variableName = Symbol.VariableNames.SelectRandom(random);
+        variableName = Symbol.VariableNames.SelectRandom(random);
 #pragma warning restore 612, 618
+        if(oldName != variableName) {
+          weight = NormalDistributedRandom.NextDouble(random, Symbol.WeightMu, Symbol.WeightSigma);
+        }
+      }      // 50% additive & 50% multiplicative (BUG in if statement below!)
     }
 
     public override string ToString() {
-      if (weight.IsAlmost(1.0)) return variableName;
+      if(weight.IsAlmost(1.0)) return variableName;
       else return weight.ToString("E4") + " " + variableName;
     }
