In computer science, particle swarm optimization (PSO) is a computational method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality.
In computer science, particle swarm optimization (PSO) is a computational method that optimizes a problem by iteratively trying to improve a candidate solution with regard to a given measure of quality.
Algorithm:
Initialize all agents;
while (not maximum iterations nor minimum error )
{
foreach(agent in agents)
{
Calculate function value at agent position;
If (value < best_value_in_history)
best_value_in_history= value;
}
current_best_value= calculate best value of all current agents positions;
foreach(agent in agents)
{
agent current_velocity =
w * current_velocity +
p * random_double() * (current_best_value.position - current_position) +
g * random_double * (best_value_in_history.position - current_position);
update_agent_position(current_velocity);
}
}
where w,p,g are selected by the practitioner and control the behaviour and efficacy of the PSO method.
Third party implementations:
- RRSI is a C# project to simulate particle swarm optimization on communicating robots.
- SwarmOps C# and ANSI C codes for several optimization methods, including a few global best PSO variants.
- Java Based PSO Framework part of the open-source project CIlib (Computational Intelligence Library).
- PSO visualisation applet randomly generated particle swarm of 12 particles attempts to find the "global maximum" on the landscape.