Index: /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithm.cs
===================================================================
--- /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithm.cs	(revision 12034)
+++ /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithm.cs	(revision 12035)
@@ -69,6 +69,6 @@
       get { return (IValueParameter<IntValue>)Parameters["NumberOfLayers"]; }
     }
-    private IValueParameter<IntValue> PopulationSizeParameter {
-      get { return (IValueParameter<IntValue>)Parameters["PopulationSize"]; }
+    private IValueParameter<IntArray> PopulationSizeParameter {
+      get { return (IValueParameter<IntArray>)Parameters["PopulationSize"]; }
     }
     private IValueParameter<IntValue> MaximumGenerationsParameter {
@@ -129,5 +129,5 @@
     }
 
-    public IntValue PopulationSize {
+    public IntArray PopulationSize {
       get { return PopulationSizeParameter.Value; }
       set { PopulationSizeParameter.Value = value; }
@@ -216,5 +216,5 @@
       Parameters.Add(new ValueParameter<MultiAnalyzer>("LayerAnalyzer", "The operator used to analyze each layer.", new MultiAnalyzer()));
       Parameters.Add(new ValueParameter<IntValue>("NumberOfLayers", "The number of layers.", new IntValue(5)));
-      Parameters.Add(new ValueParameter<IntValue>("PopulationSize", "The size of the population of solutions each layer.", new IntValue(20)));
+      Parameters.Add(new ValueParameter<IntArray>("PopulationSize", "The size of the population of solutions each layer.", new IntArray(new[] { 5, 10, 20, 50, 100 })));
       Parameters.Add(new ValueParameter<IntValue>("MaximumGenerations", "The maximum number of generations that should be processed.", new IntValue(1000)));
       Parameters.Add(new ValueParameter<AgingScheme>("AgingScheme", "The aging scheme for setting the age-limits for the layers.", new AgingScheme(AgingSchemes.Polynomial)));
@@ -231,5 +231,5 @@
       var globalRandomCreator = new RandomCreator();
       var layer0Creator = new SubScopesCreator() { Name = "Create Layer Zero" };
-      var layer0Processor = new SubScopesProcessor();
+      var layer0Processor = new LayerUniformSubScopesProcessor();
       var localRandomCreator = new LocalRandomCreator();
       var layerVariableCreator = new VariableCreator();
@@ -253,5 +253,5 @@
       layer0Creator.Successor = layer0Processor;
 
-      layer0Processor.Operators.Add(localRandomCreator);
+      layer0Processor.Operator = localRandomCreator;
       layer0Processor.Successor = initializeGlobalEvaluatedSolutions;
 
@@ -394,5 +394,5 @@
     private void Initialize() {
       PopulationSizeParameter.ValueChanged += PopulationSizeParameter_ValueChanged;
-      PopulationSize.ValueChanged += PopulationSize_ValueChanged;
+      //PopulationSize.ValueChanged += PopulationSize_ValueChanged; TODO
       ElitesParameter.ValueChanged += ElitesParameter_ValueChanged;
       Elites.ValueChanged += Elites_ValueChanged;
@@ -421,7 +421,9 @@
     }
     private void ParameterizeSelectors() {
+
       foreach (var selector in SelectorParameter.ValidValues) {
         selector.CopySelected = new BoolValue(true);
-        selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(2 * (PopulationSize.Value - Elites.Value));
+        // Explicit setting of NumberOfSelectedSubScopesParameter is not required anymore because the NumberOfSelectedSubScopesCalculator calculates it itself
+        //selector.NumberOfSelectedSubScopesParameter.Value = new IntValue(2 * (PopulationSize - Elites.Value)); 
         selector.NumberOfSelectedSubScopesParameter.Hidden = true;
         ParameterizeStochasticOperatorForLayer(selector);
Index: /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithmMainLoop.cs
===================================================================
--- /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithmMainLoop.cs	(revision 12034)
+++ /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/AlpsGeneticAlgorithmMainLoop.cs	(revision 12035)
@@ -80,5 +80,5 @@
       var resultsCollector = new ResultsCollector();
       var matingPoolCreator = new MatingPoolCreator() { Name = "Create Mating Pools" };
-      var matingPoolProcessor = new UniformSubScopesProcessor();
+      var matingPoolProcessor = new LayerUniformSubScopesProcessor();
       var initializeLayer = new Assigner() { Name = "Reset LayerEvaluatedSolutions" };
       var mainOperator = CreatePreparedGeneticAlgorithmMainLoop();
@@ -162,4 +162,5 @@
     private GeneticAlgorithmMainLoop CreatePreparedGeneticAlgorithmMainLoop() {
       var mainLoop = new GeneticAlgorithmMainLoop();
+      var numberOfSelectedSubScopesCalculator = new NumberOfSelectedSubScopesCalculator();
       var selector = mainLoop.OperatorGraph.Iterate().OfType<Placeholder>().First(o => o.OperatorParameter.ActualName == "Selector");
       var crossover = mainLoop.OperatorGraph.Iterate().OfType<Placeholder>().First(o => o.OperatorParameter.ActualName == "Crossover");
@@ -167,6 +168,7 @@
       var elitesMerger = mainLoop.OperatorGraph.Iterate().OfType<MergingReducer>().First();
 
-      // Operator starts with selector
-      mainLoop.OperatorGraph.InitialOperator = selector;
+      // Operator starts with numberOfSelectedSubScopesCalculator
+      mainLoop.OperatorGraph.InitialOperator = numberOfSelectedSubScopesCalculator;
+      numberOfSelectedSubScopesCalculator.Successor = selector;
 
       // Insert AgeCalculator between crossover and its successor
Index: /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/EldersEmigrator.cs
===================================================================
--- /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/EldersEmigrator.cs	(revision 12034)
+++ /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/EldersEmigrator.cs	(revision 12035)
@@ -56,5 +56,5 @@
       var eldersSelector = new EldersSelector();
       var shiftToRightMigrator = new ShiftToRightMigrator();
-      var mergingProsessor = new UniformSubScopesProcessor();
+      var mergingProsessor = new LayerUniformSubScopesProcessor();
       var mergingReducer = new MergingReducer();
       var subScopesCounter = new SubScopesCounter();
Index: /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/HeuristicLab.Algorithms.ALPS-3.3.csproj
===================================================================
--- /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/HeuristicLab.Algorithms.ALPS-3.3.csproj	(revision 12034)
+++ /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/HeuristicLab.Algorithms.ALPS-3.3.csproj	(revision 12035)
@@ -93,6 +93,8 @@
     <Compile Include="LastSubScopeCloner.cs" />
     <Compile Include="LayerCreator.cs" />
+    <Compile Include="LayerUniformSubScopesProcessor.cs" />
     <Compile Include="LayerUpdator.cs" />
     <Compile Include="MatingPoolCreator.cs" />
+    <Compile Include="NumberOfSelectedSubScopesCalculator.cs" />
     <Compile Include="OpenNewLayerCalculator.cs" />
     <Compile Include="MergingReducerCalculator.cs" />
Index: /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/LayerUniformSubScopesProcessor.cs
===================================================================
--- /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/LayerUniformSubScopesProcessor.cs	(revision 12035)
+++ /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/LayerUniformSubScopesProcessor.cs	(revision 12035)
@@ -0,0 +1,100 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ALPS {
+  [Item("LayerUniformSubScopesProcessor", "")]
+  [StorableClass]
+  public class LayerUniformSubScopesProcessor : UniformSubScopesProcessor {
+
+    private ILookupParameter<IntArray> PopulationSizeParameter {
+      get { return (ILookupParameter<IntArray>)Parameters["PopulationSize"]; }
+    }
+
+    [StorableConstructor]
+    private LayerUniformSubScopesProcessor(bool deserializing) : base(deserializing) { }
+    private LayerUniformSubScopesProcessor(LayerUniformSubScopesProcessor original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public LayerUniformSubScopesProcessor()
+      : base() {
+      Parameters.Add(new LookupParameter<IntArray>("PopulationSize"));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LayerUniformSubScopesProcessor(this, cloner);
+    }
+
+    public override IOperation Apply() {
+      OperationCollection next = new OperationCollection(Successor != null ? ExecutionContext.CreateOperation(Successor) : null); // base.base.Apply not possible
+      if (Operator != null) {
+        List<IScope> scopes = GetScopesOnLevel(ExecutionContext.Scope, Depth.Value).ToList();
+        OperationCollection inner = new OperationCollection();
+        inner.Parallel = Parallel == null ? false : Parallel.Value;
+        for (int i = 0; i < scopes.Count; i++) {
+          var layerParameters = new LayerIntermediateParameter {
+            new ValueParameter<IntValue>(PopulationSizeParameter.ActualName, new IntValue(PopulationSizeParameter.ActualValue[i]))
+          };
+          var immediateContext = new ExecutionContext(ExecutionContext.Parent, layerParameters, scopes[i]);
+          inner.Add(immediateContext.CreateChildOperation(Operator, scopes[i]));
+        }
+        next.Insert(0, inner);
+      }
+      return next;
+    }
+  }
+
+  [Item("LayerIntermediateParameter", "")]
+  [StorableClass]
+  public class LayerIntermediateParameter : ParameterizedNamedItem, IEnumerable<IParameter> {
+    [StorableConstructor]
+    private LayerIntermediateParameter(bool deserializing) : base(deserializing) { }
+    private LayerIntermediateParameter(LayerIntermediateParameter original, Cloner cloner)
+      : base(original, cloner) {
+    }
+    public LayerIntermediateParameter()
+      : base("LayerIntermediateParameter") {
+    }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new LayerIntermediateParameter(this, cloner);
+    }
+
+    public void Add(IParameter parameter) {
+      Parameters.Add(parameter);
+    }
+
+    public IEnumerator<IParameter> GetEnumerator() {
+      return Parameters.GetEnumerator();
+    }
+    IEnumerator IEnumerable.GetEnumerator() {
+      return GetEnumerator();
+    }
+  }
+}
Index: /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/NumberOfSelectedSubScopesCalculator.cs
===================================================================
--- /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/NumberOfSelectedSubScopesCalculator.cs	(revision 12035)
+++ /branches/ALPS/HeuristicLab.Algorithms.ALPS/3.3/NumberOfSelectedSubScopesCalculator.cs	(revision 12035)
@@ -0,0 +1,69 @@
+﻿#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2015 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 HeuristicLab.Common;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+
+namespace HeuristicLab.Algorithms.ALPS {
+  [Item("NumberOfSelectedSubScopesCalculator", "")]
+  [StorableClass]
+  public class NumberOfSelectedSubScopesCalculator : SingleSuccessorOperator {
+    private ILookupParameter<IntValue> PopulationSizeParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["PopulationSize"]; }
+    }
+    private ILookupParameter<IntValue> ElitesParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["Elites"]; }
+    }
+    private ILookupParameter<IntValue> NumberOfSelectedSubScopesParameter {
+      get { return (ILookupParameter<IntValue>)Parameters["NumberOfSelectedSubScopes"]; }
+    }
+
+    [StorableConstructor]
+    private NumberOfSelectedSubScopesCalculator(bool deserializing)
+      : base(deserializing) { }
+    private NumberOfSelectedSubScopesCalculator(NumberOfSelectedSubScopesCalculator original, Cloner cloner)
+      : base(original, cloner) { }
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new NumberOfSelectedSubScopesCalculator(this, cloner);
+    }
+    public NumberOfSelectedSubScopesCalculator()
+      : base() {
+      Parameters.Add(new LookupParameter<IntValue>("PopulationSize"));
+      Parameters.Add(new LookupParameter<IntValue>("Elites"));
+      Parameters.Add(new LookupParameter<IntValue>("NumberOfSelectedSubScopes"));
+    }
+
+    public override IOperation Apply() {
+      var populationSize = PopulationSizeParameter.ActualValue;
+      var elites = ElitesParameter.ActualValue;
+
+      int selectedSubScopes = 2 * (populationSize.Value - elites.Value);
+
+      NumberOfSelectedSubScopesParameter.ActualValue = new IntValue(selectedSubScopes);
+
+      return base.Apply();
+    }
+  }
+}
Index: /branches/ALPS/HeuristicLab.Operators/3.3/UniformSubScopesProcessor.cs
===================================================================
--- /branches/ALPS/HeuristicLab.Operators/3.3/UniformSubScopesProcessor.cs	(revision 12034)
+++ /branches/ALPS/HeuristicLab.Operators/3.3/UniformSubScopesProcessor.cs	(revision 12035)
@@ -34,5 +34,5 @@
   [Item("UniformSubScopesProcessor", "An operator which applies a specified operator on all sub-scopes at the given depth of the current scope.")]
   [StorableClass]
-  public sealed class UniformSubScopesProcessor : SingleSuccessorOperator {
+  public class UniformSubScopesProcessor : SingleSuccessorOperator {
     private OperatorParameter OperatorParameter {
       get { return (OperatorParameter)Parameters["Operator"]; }
@@ -59,6 +59,6 @@
 
     [StorableConstructor]
-    private UniformSubScopesProcessor(bool deserializing) : base(deserializing) { }
-    private UniformSubScopesProcessor(UniformSubScopesProcessor original, Cloner cloner)
+    protected UniformSubScopesProcessor(bool deserializing) : base(deserializing) { }
+    protected UniformSubScopesProcessor(UniformSubScopesProcessor original, Cloner cloner)
       : base(original, cloner) {
     }
@@ -88,5 +88,5 @@
     }
 
-    private IEnumerable<IScope> GetScopesOnLevel(IScope scope, int d) {
+    protected IEnumerable<IScope> GetScopesOnLevel(IScope scope, int d) {
       if (d == 0) yield return scope;
       else {
