Index: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/BestPointInitializer.cs
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/BestPointInitializer.cs	(revision 5033)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/BestPointInitializer.cs	(revision 5033)
@@ -0,0 +1,106 @@
+#region License Information
+/* HeuristicLab
+ * Copyright (C) 2002-2010 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.Linq;
+using HeuristicLab.Core;
+using HeuristicLab.Data;
+using HeuristicLab.Encodings.RealVectorEncoding;
+using HeuristicLab.Operators;
+using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
+
+namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+  public class BestPointInitializer : SingleSuccessorOperator {
+
+    #region Parameter properties
+    public ScopeTreeLookupParameter<DoubleValue> QualityParameter {
+      get { return (ScopeTreeLookupParameter<DoubleValue>)Parameters["Quality"]; }
+    }
+    public LookupParameter<DoubleValue> BestQualityParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["BestQuality"]; }
+    }
+    public ScopeTreeLookupParameter<RealVector> PointParameter {
+      get { return (ScopeTreeLookupParameter<RealVector>)Parameters["Point"]; }
+    }
+    public LookupParameter<RealVector> BestPointParameter {
+      get { return (LookupParameter<RealVector>)Parameters["BestPoint"]; }
+    }
+    public ValueLookupParameter<BoolValue> MaximizationParameter {
+      get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
+    }
+    #endregion
+
+    #region Parameter values
+    public ItemArray<DoubleValue> Quality {
+      get { return QualityParameter.ActualValue; }
+    }
+    public double BestQuality {
+      get { return BestQualityParameter.ActualValue.Value; }
+      set { BestQualityParameter.ActualValue = new DoubleValue(value); }
+    }
+    public ItemArray<RealVector> Point {
+      get { return PointParameter.ActualValue; }
+    }
+    public RealVector BestPoint {
+      get { return BestPointParameter.ActualValue; }
+      set { BestPointParameter.ActualValue = value; }
+    }
+    public bool Maximization {
+      get { return MaximizationParameter.ActualValue.Value; }
+    }
+    #endregion
+
+    #region Construction & Cloning
+
+    [StorableConstructor]
+    protected BestPointInitializer(bool deserializing) : base(deserializing) { }
+    protected BestPointInitializer(BestPointInitializer original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
+    public BestPointInitializer()
+      : base() {
+      Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>("Quality", "Particle's quality"));
+      Parameters.Add(new LookupParameter<DoubleValue>("BestQuality", "Global best particle quality"));
+      Parameters.Add(new ScopeTreeLookupParameter<RealVector>("Point", "Particle's position"));
+      Parameters.Add(new LookupParameter<RealVector>("BestPoint", "Globa best particle position"));
+      Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
+    }
+
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new BestPointInitializer(this, cloner);
+    }
+
+    #endregion
+
+    public override IOperation Apply() {
+      BestQuality = Maximization ? Quality.Max(v => v.Value) : Quality.Min(v => v.Value);
+      int bestIndex = Quality.FindIndex(v => v.Value == BestQuality);
+      BestPoint = (RealVector)Point[bestIndex].Clone();
+      return base.Apply();
+    }
+
+    public override bool CanChangeName {
+      get { return false; }
+    }
+  }
+}
Index: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj	(revision 4539)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj	(revision 5033)
@@ -105,8 +105,7 @@
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="BestPointInitializer.cs" />
     <Compile Include="HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs" />
     <Compile Include="ParticleSwarmOptimization.cs" />
-    <Compile Include="ParticleSwarmOptimizationMainLoop.cs" />
-    <Compile Include="PermutationToRealVectorEncoder.cs" />
     <Compile Include="Properties\AssemblyInfo.cs" />
     <Compile Include="ParticleUpdater.cs" />
@@ -138,8 +137,4 @@
       <SpecificVersion>False</SpecificVersion>
       <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Data-3.3.dll</HintPath>
-    </Reference>
-    <Reference Include="HeuristicLab.Encodings.PermutationEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
-      <SpecificVersion>False</SpecificVersion>
-      <HintPath>C:\Program Files\HeuristicLab 3.3\HeuristicLab.Encodings.PermutationEncoding-3.3.dll</HintPath>
     </Reference>
     <Reference Include="HeuristicLab.Encodings.RealVectorEncoding-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86">
@@ -208,5 +203,9 @@
 
 call PreBuildEvent.cmd
-SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs"</PreBuildEvent>
+SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame" "%25ProjectDir%25\HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs"
+SubWCRev "%25ProjectDir%25\" "%25ProjectDir%25\Properties\AssemblyInfo.frame" "%25ProjectDir%25\Properties\AssemblyInfo.cs"</PreBuildEvent>
+  </PropertyGroup>
+  <PropertyGroup>
+    <PostBuildEvent>copy $(TargetFileName) "C:\Program Files\HeuristicLab 3.3"</PostBuildEvent>
   </PropertyGroup>
 </Project>
Index: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.sln
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.sln	(revision 5033)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.sln	(revision 5033)
@@ -0,0 +1,32 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3", "HeuristicLab.Algorithms.ParticleSwarmOptimization-3.3.csproj", "{2C429157-9C34-4DD3-9D5F-B444B751E39A}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Debug|x64 = Debug|x64
+		Debug|x86 = Debug|x86
+		Release|Any CPU = Release|Any CPU
+		Release|x64 = Release|x64
+		Release|x86 = Release|x86
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|x64.ActiveCfg = Debug|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|x64.Build.0 = Debug|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|x86.ActiveCfg = Debug|x86
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Debug|x86.Build.0 = Debug|x86
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|Any CPU.Build.0 = Release|Any CPU
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x64.ActiveCfg = Release|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x64.Build.0 = Release|x64
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x86.ActiveCfg = Release|x86
+		{2C429157-9C34-4DD3-9D5F-B444B751E39A}.Release|x86.Build.0 = Release|x86
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame	(revision 4539)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin.cs.frame	(revision 5033)
@@ -40,5 +40,4 @@
   [PluginDependency("HeuristicLab.Persistence", "3.3")]
   [PluginDependency("HeuristicLab.Random", "3.3")]
-  [PluginDependency("HeuristicLab.Selection", "3.3")]
   public class HeuristicLabAlgorithmsParticleSwarmOptimizationPlugin : PluginBase {
   }
Index: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 4539)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleSwarmOptimization.cs	(revision 5033)
@@ -21,5 +21,4 @@
 
 using System;
-using System.Collections.Generic;
 using System.Linq;
 using HeuristicLab.Analysis;
@@ -36,8 +35,10 @@
 
 namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
+
   [Item("Particle Swarm Optimization", "A particle swarm optimization algorithm.")]
   [Creatable("Algorithms")]
   [StorableClass]
-  public sealed class ParticleSwarmOptimization : EngineAlgorithm {
+  public class ParticleSwarmOptimization : EngineAlgorithm {
+
     #region Problem Properties
     public override Type ProblemType {
@@ -48,8 +49,4 @@
       set { base.Problem = value; }
     }
-    public IRealVectorEncoder Encoder {
-      get { return EncoderParameter.Value; }
-      set { EncoderParameter.Value = value; }
-    }
     public MultiAnalyzer Analyzer {
       get { return AnalyzerParameter.Value; }
@@ -59,21 +56,30 @@
 
     #region Parameter Properties
-    private ValueParameter<IntValue> SeedParameter {
+    public ValueParameter<IntValue> SeedParameter {
       get { return (ValueParameter<IntValue>)Parameters["Seed"]; }
     }
-    private ValueParameter<BoolValue> SetSeedRandomlyParameter {
+    public ValueParameter<BoolValue> SetSeedRandomlyParameter {
       get { return (ValueParameter<BoolValue>)Parameters["SetSeedRandomly"]; }
     }
-    private ValueParameter<IntValue> SwarmSizeParameter {
+    public ValueParameter<IntValue> SwarmSizeParameter {
       get { return (ValueParameter<IntValue>)Parameters["SwarmSize"]; }
     }
-    private ValueParameter<IntValue> MaxIterationsParameter {
+    public ValueParameter<IntValue> MaxIterationsParameter {
       get { return (ValueParameter<IntValue>)Parameters["MaxIterations"]; }
     }
-    private OptionalConstrainedValueParameter<IRealVectorEncoder> EncoderParameter {
-      get { return (OptionalConstrainedValueParameter<IRealVectorEncoder>)Parameters["Encoder"]; }
-    }
-    private ValueParameter<MultiAnalyzer> AnalyzerParameter {
+    public ValueParameter<DoubleValue> OmegaParameter {
+      get { return (ValueParameter<DoubleValue>)Parameters["Omega"]; }
+    }
+    public ValueParameter<DoubleValue> Phi_PParameter {
+      get { return (ValueParameter<DoubleValue>)Parameters["Phi_P"]; }
+    }
+    public ValueParameter<DoubleValue> Phi_GParameter {
+      get { return (ValueParameter<DoubleValue>)Parameters["Phi_G"]; }
+    }
+    public ValueParameter<MultiAnalyzer> AnalyzerParameter {
       get { return (ValueParameter<MultiAnalyzer>)Parameters["Analyzer"]; }
+    }
+    public ValueLookupParameter<DoubleMatrix> VelocityBoundsParameter {
+      get { return (ValueLookupParameter<DoubleMatrix>)Parameters["VelocityBounds"]; }
     }
     #endregion
@@ -81,16 +87,13 @@
     #region Properties
     [Storable]
-    private ParticleSwarmOptimizationMainLoop mainLoop; // Check this !
-    private ParticleSwarmOptimizationMainLoop MainLoop {
-      get { return mainLoop; }
-    }
-    [Storable]
-    private Assigner bestLocalQualityInitalizer; // Check this !
-    private Assigner BestLocalQualityInitalizer {
-      get { return bestLocalQualityInitalizer; }
-    }
-    [Storable]
     private BestAverageWorstQualityAnalyzer qualityAnalyzer;
     #endregion
+
+    [StorableConstructor]
+    protected ParticleSwarmOptimization(bool deserializing) : base(deserializing) { }
+    protected ParticleSwarmOptimization(ParticleSwarmOptimization original, Cloner cloner)
+      : base(original, cloner) {
+      qualityAnalyzer = cloner.Clone(original.qualityAnalyzer);
+    }
 
     public ParticleSwarmOptimization()
@@ -100,103 +103,110 @@
       Parameters.Add(new ValueParameter<IntValue>("SwarmSize", "Size of the particle swarm.", new IntValue(10)));
       Parameters.Add(new ValueParameter<IntValue>("MaxIterations", "Maximal number of iterations.", new IntValue(1000)));
-      Parameters.Add(new ConstrainedValueParameter<IRealVectorEncoder>("Encoder", "The operator used to encode solutions as position vector."));
       Parameters.Add(new ValueParameter<MultiAnalyzer>("Analyzer", "The operator used to analyze each generation.", new MultiAnalyzer()));
+      Parameters.Add(new ValueParameter<DoubleValue>("Omega", "Weight for particle's velocity vector.", new DoubleValue(-0.2)));
+      Parameters.Add(new ValueParameter<DoubleValue>("Phi_P", "Weight for particle's personal best position.", new DoubleValue(-0.01)));
+      Parameters.Add(new ValueParameter<DoubleValue>("Phi_G", "Weight for global best position.", new DoubleValue(3.7)));
+      Parameters.Add(new ValueLookupParameter<DoubleMatrix>("VelocityBounds", "Maximum Velocity in every dimension", new DoubleMatrix(new double[,] { { -1, 1 } })));
+
       RandomCreator randomCreator = new RandomCreator();
+      VariableCreator variableCreator = new VariableCreator();
       SolutionsCreator solutionsCreator = new SolutionsCreator();
-      UniformSubScopesProcessor uniformSubScopesProcessor = new UniformSubScopesProcessor();
-      UniformSubScopesProcessor uniformSubScopesProcessor2 = new UniformSubScopesProcessor();
-      VariableCreator variableCreator = new VariableCreator();
-      VariableCreator localVariableCreator = new VariableCreator();
-      Placeholder encoder = new Placeholder();
-      UniformRandomRealVectorCreator velocityVectorCreator = new UniformRandomRealVectorCreator();
-      bestLocalQualityInitalizer = new Assigner();
-      Assigner bestLocalPositionInitalizer = new Assigner();
-      Assigner bestGlobalPositionInitalizer = new Assigner();
-      mainLoop = new ParticleSwarmOptimizationMainLoop();
-      BestAverageWorstQualityCalculator bawCalculator = new BestAverageWorstQualityCalculator();
-      Comparator comparator = new Comparator();
-      ConditionalBranch branch = new ConditionalBranch();
-
-      variableCreator.CollectedValues.Add(new ValueParameter<RealVector>("CurrentBestPosition", new RealVector()));
-      variableCreator.CollectedValues.Add(new ValueParameter<DoubleMatrix>("ZeroBounds", new DoubleMatrix(new double[,] { { 0, 0 } })));
-      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("Length", new IntValue(2)));
-
-      localVariableCreator.CollectedValues.Add(new ValueParameter<DoubleValue>("BestQuality", new DoubleValue(0)));
-      localVariableCreator.CollectedValues.Add(new ValueParameter<RealVector>("BestPosition", new RealVector()));
-
-      randomCreator.RandomParameter.ActualName = "Random";
-      randomCreator.SeedParameter.ActualName = SeedParameter.Name;
+      CombinedOperator particleCreator = new CombinedOperator();
+      Placeholder evaluatorPlaceholder = new Placeholder();
+      Assigner bestPersonalQualityAssigner = new Assigner();
+      BestPointInitializer bestPositionInitializer = new BestPointInitializer();
+      Placeholder analyzerPlaceholder = new Placeholder();
+      UniformSubScopesProcessor uniformSubScopeProcessor = new UniformSubScopesProcessor();
+      ParticleUpdater particleUpdater = new ParticleUpdater();
+      Placeholder evaluatorPlaceholder2 = new Placeholder();
+      SwarmUpdater swarmUpdater = new SwarmUpdater();
+      Placeholder analyzerPlaceholder2 = new Placeholder();
+      IntCounter currentIterationCounter = new IntCounter();
+      Comparator currentIterationComparator = new Comparator();
+      ConditionalBranch conditionalBranch = new ConditionalBranch();
+
+      OperatorGraph.InitialOperator = randomCreator;
+
+      randomCreator.SetSeedRandomlyParameter.Value = null;
       randomCreator.SeedParameter.Value = null;
-      randomCreator.SetSeedRandomlyParameter.ActualName = SetSeedRandomlyParameter.Name;
-      randomCreator.SetSeedRandomlyParameter.Value = null;
-
-      solutionsCreator.NumberOfSolutionsParameter.ActualName = SwarmSizeParameter.Name;
-
-      encoder.OperatorParameter.ActualName = "Encoder";
-
-      velocityVectorCreator.BoundsParameter.ActualName = "ZeroBounds";
-      velocityVectorCreator.RealVectorParameter.ActualName = "Velocity";
-
-      bestLocalQualityInitalizer.LeftSideParameter.ActualName = "BestQuality"; // cloned value
-      bestLocalQualityInitalizer.RightSideParameter.ActualName = "Quality"; // FIXME!!! Should be mapped
-
-      bestLocalPositionInitalizer.LeftSideParameter.ActualName = "BestPosition";
-      bestLocalPositionInitalizer.RightSideParameter.ActualName = "Position"; // FixMe
-
-      bestGlobalPositionInitalizer.LeftSideParameter.ActualName = "CurrentBestPosition";
-      bestGlobalPositionInitalizer.RightSideParameter.ActualName = "BestPosition";
-
-      bawCalculator.AverageQualityParameter.ActualName = "CurrentAverageBestQuality";
-      bawCalculator.BestQualityParameter.ActualName = "CurrentBestBestQuality";
-      bawCalculator.MaximizationParameter.ActualName = "Maximization"; // FIXME
-      bawCalculator.QualityParameter.ActualName = "Quality";
-      bawCalculator.WorstQualityParameter.ActualName = "CurrentWorstBestQuality";
-
-      comparator.Comparison = new Comparison(ComparisonType.Equal);
-      comparator.LeftSideParameter.ActualName = "Quality";
-      comparator.ResultParameter.ActualName = "NewGlobalBest";
-      comparator.RightSideParameter.ActualName = "CurrentBestBestQuality";
-
-      branch.ConditionParameter.ActualName = "NewGlobalBest";
-      branch.TrueBranch = bestGlobalPositionInitalizer; // copy position vector
-
-      mainLoop.MaximumGenerationsParameter.ActualName = MaxIterationsParameter.Name;
-      mainLoop.ResultsParameter.ActualName = "Results";
-      mainLoop.AnalyzerParameter.ActualName = AnalyzerParameter.Name;
-
-      OperatorGraph.InitialOperator = randomCreator;
-      randomCreator.Successor = solutionsCreator;
-      solutionsCreator.Successor = variableCreator;
-      variableCreator.Successor = uniformSubScopesProcessor;
-      uniformSubScopesProcessor.Operator = encoder;
-      encoder.Successor = velocityVectorCreator;
-      velocityVectorCreator.Successor = localVariableCreator;
-      localVariableCreator.Successor = bestLocalQualityInitalizer;
-      bestLocalQualityInitalizer.Successor = bestLocalPositionInitalizer;
-      uniformSubScopesProcessor.Successor = bawCalculator; // mainLoop;
-      bawCalculator.Successor = uniformSubScopesProcessor2;
-      uniformSubScopesProcessor2.Operator = comparator;
-      comparator.Successor = branch;
-      uniformSubScopesProcessor2.Successor = mainLoop;
+      randomCreator.Successor = variableCreator;
+
+      variableCreator.CollectedValues.Add(new ValueParameter<IntValue>("CurrentIteration", new IntValue(0)));
+      variableCreator.Successor = solutionsCreator;
+
+      solutionsCreator.NumberOfSolutionsParameter.ActualName = "SwarmSize";
+      solutionsCreator.EvaluatorParameter.Value = evaluatorPlaceholder;
+      solutionsCreator.SolutionCreatorParameter.Value = particleCreator;
+      solutionsCreator.Successor = bestPositionInitializer;
+
+      InitializeParticleCreator(particleCreator);
+
+      evaluatorPlaceholder.Name = "(Evaluator)";
+      evaluatorPlaceholder.OperatorParameter.ActualName = "Evaluator";
+      evaluatorPlaceholder.Successor = bestPersonalQualityAssigner;
+
+      bestPersonalQualityAssigner.LeftSideParameter.ActualName = "PersonalBestQuality";
+      bestPersonalQualityAssigner.RightSideParameter.ActualName = "Quality";
+
+      bestPositionInitializer.Successor = analyzerPlaceholder;
+
+      analyzerPlaceholder.Name = "(Analyzer)";
+      analyzerPlaceholder.OperatorParameter.ActualName = "Analyzer";
+      analyzerPlaceholder.Successor = uniformSubScopeProcessor;
+
+      uniformSubScopeProcessor.Operator = particleUpdater;
+      uniformSubScopeProcessor.Successor = analyzerPlaceholder2;
+
+      particleUpdater.Successor = evaluatorPlaceholder2;
+
+      evaluatorPlaceholder2.Name = "(Evaluator)";
+      evaluatorPlaceholder2.OperatorParameter.ActualName = "Evaluator";
+      evaluatorPlaceholder2.Successor = swarmUpdater;
+
+      analyzerPlaceholder2.Name = "(Analyzer)";
+      analyzerPlaceholder2.OperatorParameter.ActualName = "Analyzer";
+      analyzerPlaceholder2.Successor = currentIterationCounter;
+
+      currentIterationCounter.Name = "CurrentIteration++";
+      currentIterationCounter.ValueParameter.ActualName = "CurrentIteration";
+      currentIterationCounter.Successor = currentIterationComparator;
+
+      currentIterationComparator.LeftSideParameter.ActualName = "CurrentIteration";
+      currentIterationComparator.Comparison = new Comparison(ComparisonType.Less);
+      currentIterationComparator.RightSideParameter.ActualName = "MaxIterations";
+      currentIterationComparator.ResultParameter.ActualName = "ContinueIteration";
+      currentIterationComparator.Successor = conditionalBranch;
+
+      conditionalBranch.Name = "ContinueIteration?";
+      conditionalBranch.ConditionParameter.ActualName = "ContinueIteration";
+      conditionalBranch.TrueBranch = uniformSubScopeProcessor;
+
       InitializeAnalyzers();
       UpdateAnalyzers();
-      Initialize();
-    }
-
-    [StorableHook(HookType.AfterDeserialization)]
-    private void Initialize() {
-      EncoderParameter.ValueChanged += new EventHandler(EncoderParameter_ValueChanged);
-      if (Problem != null) {
-        bestLocalQualityInitalizer.RightSideParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
-      }
-    }
-
-    [StorableConstructor]
-    private ParticleSwarmOptimization(bool deserializing) : base(deserializing) { }
+    }
+
+    private static void InitializeParticleCreator(CombinedOperator particleCreator) {
+      Placeholder positionCreator = new Placeholder();
+      Assigner personalBestPositionAssigner = new Assigner();
+      UniformRandomRealVectorCreator velocityCreator = new UniformRandomRealVectorCreator();
+
+      particleCreator.Name = "Particle Creator";
+      particleCreator.OperatorGraph.InitialOperator = positionCreator;
+
+      positionCreator.Name = "(SolutionCreator)";
+      positionCreator.OperatorParameter.ActualName = "SolutionCreator";
+      positionCreator.Successor = personalBestPositionAssigner;
+
+      personalBestPositionAssigner.LeftSideParameter.ActualName = "PersonalBestPoint";
+      personalBestPositionAssigner.RightSideParameter.ActualName = "Point";
+      personalBestPositionAssigner.Successor = velocityCreator;
+
+      velocityCreator.LengthParameter.ActualName = "ProblemSize";
+      velocityCreator.BoundsParameter.ActualName = "VelocityBounds";
+      velocityCreator.RealVectorParameter.ActualName = "Velocity";
+    }
 
     public override IDeepCloneable Clone(Cloner cloner) {
-      ParticleSwarmOptimization clone = (ParticleSwarmOptimization)base.Clone(cloner);
-      clone.Initialize();
-      return clone;
+      return new ParticleSwarmOptimization(this, cloner);
     }
 
@@ -207,40 +217,14 @@
     #region Events
     protected override void OnProblemChanged() {
-      UpdateEncoders();
       UpdateAnalyzers();
       ParameterizeAnalyzers();
-      bestLocalQualityInitalizer.RightSideParameter.ActualName = Problem.Evaluator.QualityParameter.ActualName;
       Problem.Evaluator.QualityParameter.ActualNameChanged += new EventHandler(Evaluator_QualityParameter_ActualNameChanged);
-      MainLoop.EvaluatorParameter.ActualName = Problem.EvaluatorParameter.Name;
       base.OnProblemChanged();
     }
 
-    private void EncoderParameter_ValueChanged(object sender, EventArgs e) {
-      //MainLoop.EncoderParameter.ActualValue = (IRealVectorEncoder) EncoderParameter.ActualValue;
-      //((UniformSubScopesProcessor)((VariableCreator)((SolutionsCreator)((RandomCreator)OperatorGraph.InitialOperator).Successor).Successor).Successor).Operator = EncoderParameter.Value;
-      //((SingleSuccessorOperator)EncoderParameter.Value).Successor = ((SingleSuccessorOperator)old).Successor;
-    }
     #endregion
 
     #region Helpers
     private void Evaluator_QualityParameter_ActualNameChanged(object sender, EventArgs e) {
-      // 
-      //
-    }
-
-    private void UpdateEncoders() {
-      IRealVectorEncoder oldEncoder = EncoderParameter.Value;
-      EncoderParameter.ValidValues.Clear();
-      List<IRealVectorEncoder> encoders = Problem.Operators.OfType<IRealVectorEncoder>().OrderBy(x => x.Name).ToList<IRealVectorEncoder>();
-      if (encoders.Count > 0) {  // ToDo: Add wiring; else: use Position Vector directly --> name matching
-        foreach (IRealVectorEncoder encoder in Problem.Operators.OfType<IRealVectorEncoder>().OrderBy(x => x.Name)) {
-          EncoderParameter.ValidValues.Add(encoder);
-          ((ILookupParameter)encoder.RealVectorParameter).ActualName = "Position";
-        }
-        if (oldEncoder != null) {
-          IRealVectorEncoder encoder = EncoderParameter.ValidValues.FirstOrDefault(x => x.GetType() == oldEncoder.GetType());
-          if (encoder != null) EncoderParameter.Value = encoder;
-        }
-      }
     }
 
@@ -251,5 +235,4 @@
 
     private void ParameterizeAnalyzers() {
-      qualityAnalyzer.ResultsParameter.ActualName = "Results";
       if (Problem != null) {
         qualityAnalyzer.MaximizationParameter.ActualName = Problem.MaximizationParameter.Name;
Index: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs	(revision 4539)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/ParticleUpdater.cs	(revision 5033)
@@ -25,60 +25,125 @@
 using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
 
 namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
-  public class ParticleUpdater : SingleSuccessorOperator { // ParticleUpdater
+  public class ParticleUpdater : SingleSuccessorOperator {
+
     #region Parameter properties
-
-    public ILookupParameter<RealVector> VelocityParameter {
-      get { return (ILookupParameter<RealVector>)Parameters["Velocity"]; }
+    public LookupParameter<IRandom> RandomParameter {
+      get { return (LookupParameter<IRandom>)Parameters["Random"]; }
     }
-
-    public IParameter RandomParameter {
-      get { return (IParameter)Parameters["Random"]; }
+    public LookupParameter<RealVector> PointParameter {
+      get { return (LookupParameter<RealVector>)Parameters["Point"]; }
     }
-
-    public ILookupParameter<RealVector> CurrentPositionParameter {
-      get { return (ILookupParameter<RealVector>)Parameters["CurrentPosition"]; }
+    public LookupParameter<RealVector> VelocityParameter {
+      get { return (LookupParameter<RealVector>)Parameters["Velocity"]; }
     }
-
-    public ILookupParameter<RealVector> BestLocalParameter {
-      get { return (ILookupParameter<RealVector>)Parameters["BestLocal"]; }
+    public LookupParameter<RealVector> PersonalBestPointParameter {
+      get { return (LookupParameter<RealVector>)Parameters["PersonalBestPoint"]; }
     }
-
-    public ILookupParameter<RealVector> BestGlobalParameter {
-      get { return (ILookupParameter<RealVector>)Parameters["BestGlobal"]; }
+    public LookupParameter<RealVector> BestPointParameter {
+      get { return (LookupParameter<RealVector>)Parameters["BestPoint"]; }
     }
-
-    public ILookupParameter<DoubleMatrix> BoundsParameter {
-      get { return (ILookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
+    public LookupParameter<DoubleMatrix> BoundsParameter {
+      get { return (LookupParameter<DoubleMatrix>)Parameters["Bounds"]; }
+    }
+    public LookupParameter<DoubleMatrix> VelocityBoundsParameter {
+      get { return (LookupParameter<DoubleMatrix>)Parameters["VelocityBounds"]; }
+    }
+    public LookupParameter<DoubleValue> OmegaParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["Omega"]; }
+    }
+    public LookupParameter<DoubleValue> Phi_PParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["Phi_P"]; }
+    }
+    public LookupParameter<DoubleValue> Phi_GParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["Phi_G"]; }
     }
     #endregion
 
+    #region Parameter Values
+    public IRandom Random {
+      get { return RandomParameter.ActualValue; }
+    }
+    public RealVector Point {
+      get { return PointParameter.ActualValue;  }
+      set { PointParameter.ActualValue = value;  }
+    }
+    public RealVector Velocity {
+      get { return VelocityParameter.ActualValue; }
+      set { VelocityParameter.ActualValue = value; }
+    }
+    public RealVector PersonalBestPoint {
+      get { return PersonalBestPointParameter.ActualValue; }
+    }
+    public RealVector BestPoint {
+      get { return BestPointParameter.ActualValue; }
+    }
+    public DoubleMatrix Bounds {
+      get { return BoundsParameter.ActualValue;  }
+    }
+    public DoubleMatrix VelocityBounds {
+      get { return VelocityBoundsParameter.ActualValue; }
+    }
+    public double Omega {
+      get { return OmegaParameter.ActualValue.Value; }
+    }
+    public double Phi_P {
+      get { return Phi_PParameter.ActualValue.Value;  }
+    }
+    public double Phi_G {
+      get { return Phi_GParameter.ActualValue.Value; }
+    }
+    #endregion
+
+    #region Construction & Cloning
+
+    [StorableConstructor]
+    protected ParticleUpdater(bool deserializing) : base(deserializing) { }
+    protected ParticleUpdater(ParticleUpdater original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
     public ParticleUpdater()
       : base() {
-      Parameters.Add(new LookupParameter<IRandom>("Random", "Random number generator (to generate alpha an beta)."));
-      Parameters.Add(new LookupParameter<RealVector>("Velocity", "The velocity vector to update."));
-      Parameters.Add(new LookupParameter<RealVector>("CurrentPosition", "Current position"));
-      Parameters.Add(new LookupParameter<RealVector>("BestLocal", "Best local position"));
-      Parameters.Add(new LookupParameter<RealVector>("BestGlobal", "Best global position"));
-      Parameters.Add(new LookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds for each dimension of the position vector."));
+      Parameters.Add(new LookupParameter<IRandom>("Random", "Random number generator."));
+      Parameters.Add(new LookupParameter<RealVector>("Point", "Particle's current position"));
+      Parameters.Add(new LookupParameter<RealVector>("Velocity", "Particle's current velocity."));
+      Parameters.Add(new LookupParameter<RealVector>("PersonalBestPoint", "Particle's personal best position"));
+      Parameters.Add(new LookupParameter<RealVector>("BestPoint", "Global best position"));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("Bounds", "The lower and upper bounds for each dimension of the position vector for the current problem."));
+      Parameters.Add(new LookupParameter<DoubleMatrix>("VelocityBounds", "Upper and lower bounds for the particle's velocity vector."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Omega", "The weight for the particle's velocity vector."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Phi_P", "The weight for the particle's personal best position."));
+      Parameters.Add(new LookupParameter<DoubleValue>("Phi_G", "The weight for the global best position."));
     }
 
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new ParticleUpdater(this, cloner);
+    }
+
+    #endregion
+
     public override IOperation Apply() {
-      double alpha = ((IRandom)RandomParameter.ActualValue).NextDouble();
-      double beta = ((IRandom)RandomParameter.ActualValue).NextDouble();
-      RealVector velocity = (RealVector)VelocityParameter.ActualValue;
+      RealVector velocity = new RealVector(Velocity.Length);
+      RealVector position = new RealVector(Point.Length);
+      double r_p = Random.NextDouble();
+      double r_g = Random.NextDouble();
       for (int i = 0; i < velocity.Length; i++) {
-        velocity[i] = velocity[i] + alpha * (BestLocalParameter.ActualValue[i] - CurrentPositionParameter.ActualValue[i]) + beta * (BestGlobalParameter.ActualValue[i] - CurrentPositionParameter.ActualValue[i]);
+        velocity[i] =
+          Velocity[i] * Omega +
+          (PersonalBestPoint[i] - Point[i]) * Phi_P * r_p +
+          (BestPoint[i] - Point[i]) * Phi_G * r_g;
       }
-      VelocityParameter.ActualValue = velocity;
-      for (int i = 0; i < CurrentPositionParameter.ActualValue.Length; i++) {
-        CurrentPositionParameter.ActualValue[i] = CurrentPositionParameter.ActualValue[i] + VelocityParameter.ActualValue[i];
-        if (CurrentPositionParameter.ActualValue[i] < BoundsParameter.ActualValue[0, 0]) {
-          CurrentPositionParameter.ActualValue[i] = BoundsParameter.ActualValue[0, 0];
-        } else if (CurrentPositionParameter.ActualValue[i] > BoundsParameter.ActualValue[0, 1]) {
-          CurrentPositionParameter.ActualValue[i] = BoundsParameter.ActualValue[0, 1];
-        }
+      BoundsChecker.Apply(velocity, VelocityBounds);
+      for (int i = 0; i < velocity.Length; i++) {
+        position[i] = Point[i] + velocity[i];
       }
+      BoundsChecker.Apply(position, Bounds);
+      Point = position;
+      Velocity = velocity;
+
       return base.Apply();
     }
Index: branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs
===================================================================
--- branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs	(revision 4539)
+++ branches/PSO/HeuristicLab.Algorithms.ParticleSwarmOptimization/3.3/SwarmUpdater.cs	(revision 5033)
@@ -25,33 +25,29 @@
 using HeuristicLab.Operators;
 using HeuristicLab.Parameters;
+using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
+using HeuristicLab.Common;
 
 namespace HeuristicLab.Algorithms.ParticleSwarmOptimization {
   public class SwarmUpdater : SingleSuccessorOperator {
+
     #region Parameter properties
-
-    public ILookupParameter<DoubleValue> CurrentQualityParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters["CurrentQuality"]; }
+    public LookupParameter<DoubleValue> QualityParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["Quality"]; }
     }
-
-    public ILookupParameter<DoubleValue> LocalBestQualityParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters["LocalBestQuality"]; }
+    public LookupParameter<DoubleValue> PersonalBestQualityParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["PersonalBestQuality"]; }
     }
-
-    public ILookupParameter<DoubleValue> GlobalBestQualityParameter {
-      get { return (ILookupParameter<DoubleValue>)Parameters["GlobalBestQuality"]; }
+    public LookupParameter<DoubleValue> BestQualityParameter {
+      get { return (LookupParameter<DoubleValue>)Parameters["BestQuality"]; }
     }
-
-    public ILookupParameter<RealVector> CurrentPositionParameter {
-      get { return (ILookupParameter<RealVector>)Parameters["CurrentPosition"]; }
+    public LookupParameter<RealVector> PointParameter {
+      get { return (LookupParameter<RealVector>)Parameters["Point"]; }
     }
-
-    public ILookupParameter<RealVector> BestLocalParameter {
-      get { return (ILookupParameter<RealVector>)Parameters["BestLocal"]; }
+    public LookupParameter<RealVector> PersonalBestPointParameter {
+      get { return (LookupParameter<RealVector>)Parameters["PersonalBestPoint"]; }
     }
-
-    public ILookupParameter<RealVector> BestGlobalParameter {
-      get { return (ILookupParameter<RealVector>)Parameters["BestGlobal"]; }
+    public LookupParameter<RealVector> BestPointParameter {
+      get { return (LookupParameter<RealVector>)Parameters["BestPoint"]; }
     }
-
     public ValueLookupParameter<BoolValue> MaximizationParameter {
       get { return (ValueLookupParameter<BoolValue>)Parameters["Maximization"]; }
@@ -59,33 +55,67 @@
     #endregion
 
+    #region Parameter values
+    public double Quality {
+      get { return QualityParameter.ActualValue.Value; }
+    }
+    public double PersonalBestQuality {
+      get { return PersonalBestQualityParameter.ActualValue.Value;  }
+      set { PersonalBestQualityParameter.ActualValue = new DoubleValue(value);  }
+    }
+    public double BestQuality {
+      get { return BestQualityParameter.ActualValue.Value; }
+      set { BestQualityParameter.ActualValue = new DoubleValue(value); }
+    }
+    public RealVector Point {
+      get { return PointParameter.ActualValue; }
+    }
+    public RealVector PersonalBestPoint {
+      get { return PersonalBestPointParameter.ActualValue; }
+      set { PersonalBestPointParameter.ActualValue = value; }
+    }
+    public RealVector BestPoint {
+      get { return BestPointParameter.ActualValue; }
+      set { BestPointParameter.ActualValue = value; }
+    }
+    public bool Maximization {
+      get { return MaximizationParameter.ActualValue.Value; }
+    }
+    #endregion
+
+    #region Construction & Cloning
+
+    [StorableConstructor]
+    protected SwarmUpdater(bool deserializing) : base(deserializing) { }
+    protected SwarmUpdater(SwarmUpdater original, Cloner cloner)
+      : base(original, cloner) {
+    }
+
     public SwarmUpdater()
       : base() {
-      Parameters.Add(new LookupParameter<RealVector>("CurrentPosition", "Current position"));
-      Parameters.Add(new LookupParameter<RealVector>("BestLocal", "Best local position"));
-      Parameters.Add(new LookupParameter<RealVector>("BestGlobal", "Best global position"));
-      Parameters.Add(new LookupParameter<DoubleValue>("LocalBestQuality", "Best local quality"));
-      Parameters.Add(new LookupParameter<DoubleValue>("GlobalBestQuality", "Best global quality"));
-      Parameters.Add(new LookupParameter<DoubleValue>("CurrentQuality", "Current quality"));
+      Parameters.Add(new LookupParameter<DoubleValue>("Quality", "Particle's quality"));
+      Parameters.Add(new LookupParameter<DoubleValue>("PersonalBestQuality", "Particle's personal best quality"));
+      Parameters.Add(new LookupParameter<DoubleValue>("BestQuality", "Global best particle quality"));
+      Parameters.Add(new LookupParameter<RealVector>("Point", "Particle's position"));
+      Parameters.Add(new LookupParameter<RealVector>("PersonalBestPoint", "Particle's personal best position"));
+      Parameters.Add(new LookupParameter<RealVector>("BestPoint", "Globa best particle position"));
       Parameters.Add(new ValueLookupParameter<BoolValue>("Maximization", "True if the problem is a maximization problem, otherwise false."));
     }
 
+    public override IDeepCloneable Clone(Cloner cloner) {
+      return new SwarmUpdater(this, cloner);
+    }
+
+    #endregion
+
     public override IOperation Apply() {
-      if (MaximizationParameter.ActualValue.Value) {
-        if (CurrentQualityParameter.ActualValue.Value > LocalBestQualityParameter.ActualValue.Value) {
-          LocalBestQualityParameter.ActualValue.Value = CurrentQualityParameter.ActualValue.Value;
-          BestLocalParameter.ActualValue = (RealVector)CurrentPositionParameter.ActualValue.Clone();
-        }
-        if (CurrentQualityParameter.ActualValue.Value > GlobalBestQualityParameter.ActualValue.Value) {
-          GlobalBestQualityParameter.ActualValue.Value = CurrentQualityParameter.ActualValue.Value;
-          BestGlobalParameter.ActualValue = (RealVector)CurrentPositionParameter.ActualValue.Clone();
-        }
-      } else {
-        if (CurrentQualityParameter.ActualValue.Value < LocalBestQualityParameter.ActualValue.Value) {
-          LocalBestQualityParameter.ActualValue.Value = CurrentQualityParameter.ActualValue.Value;
-          BestLocalParameter.ActualValue = (RealVector)CurrentPositionParameter.ActualValue.Clone();
-        }
-        if (CurrentQualityParameter.ActualValue.Value < GlobalBestQualityParameter.ActualValue.Value) {
-          GlobalBestQualityParameter.ActualValue.Value = CurrentQualityParameter.ActualValue.Value;
-          BestGlobalParameter.ActualValue = (RealVector)CurrentPositionParameter.ActualValue.Clone();
+
+      if (Maximization && Quality > PersonalBestQuality ||
+         !Maximization && Quality < PersonalBestQuality) {
+        PersonalBestQuality = Quality;
+        PersonalBestPoint = Point;
+        if (Maximization && PersonalBestQuality > BestQuality ||
+           !Maximization && PersonalBestQuality < BestQuality) {
+          BestQuality = PersonalBestQuality;
+          BestPoint = PersonalBestPoint;
         }
       }
