swarm intelligence - 熊本大学 · introduction to swarm behavior individual -vs-collective...

28
Swarm Intelligence Introduction to swarm behavior Concepts of swarm intelligence Particle swarm optimization technique Ant colony optimization technique Conclusion

Upload: others

Post on 20-May-2020

3 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Swarm Intelligence

• Introduction to swarm behavior

• Concepts of swarm intelligence

• Particle swarm optimization technique

• Ant colony optimization technique

• Conclusion

Page 2: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Introduction to Swarm Behavior

• A swarm can be defined as a structured collection of interacting organisms (or agents)

• The individuals within a swarm interact to solve a global objective in a more efficient manner than one single individual could

• Consequences: the individual’s behavior have simple structure and the collective behavior can become quite complex

• Computational study of swarm intelligence, individual organisms studied include birds (in flocks), ants, fish (in schools), bees, wasps nest building*

*development of clustering and structural optimization algorithm

Page 3: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

A huge swarm of red-billed queleas returns to thecommunal roost at dusk, Okavango Delta, Botswana

Page 4: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Introduction to Swarm BehaviorIndividual -vs- Collective behaviors:

• There is a tight coupling between the swarm and the individuals.

• Individuals shape and dictate the behavior of the swarm.

• On the other hand, the behavior of the swarm determines the conditions under which an individual perform actions.

For example, in a colony of ants, individuals specialize in one of a set of simple tasks.

Collectively, the actions and behaviors of the ants ensure the building of optimal nest structures, protecting the queen and larva, cleaning nests, finding the best food sources, optimizing attack strategies, etc.

• Global behavior emerges in a nonlinear manner from the individuals’ behaviors and their interactions in the swarm.

Page 5: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Introduction to Swarm Behavior

• Interaction among individuals aids in refining experiential knowledge about the environment and enhances the progress of the swarm toward optimality.

• The cooperation among individuals is determined genetically or through social interaction.

• Social interactions can be direct or indirect.

Direct interactions are through visual, audio or chemical contact.

Indirect interactions occur when some individuals change the environment and others respond to the new environment.

• Social network structure provides communication channels to exchange experience.

Page 6: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Concepts of swarm intelligence• Swarm Intelligence (SI) is the property of a system whereby

the collective behaviors of (unsophisticated) agents interacting locally with their environment cause coherent functional global patterns to emerge.

• The basis of SI:basis of SI: it is possible to explore collective (or distributed) problem solving without centralized control or the provision of a global model.

• Successful applications – function optimization, finding optimal routes, scheduling, structural optimization, power system controller designs, and image and data analysis.

• PSO (particle swarm optimization) and ACO (Ant colony optimization)…next

Page 7: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Particle Swarm Optimization (PSO)

• The initial intent of the particle swarm concept was to graphically simulate the graceful and unpredictable choreography of a bird flock [Kennedy and Eberhart 1995]

• The aim of discovering patterns govern the ability of birds to fly synchronously and to suddenly change direction with a regrouping in an optimal formation.

• From this initial objective, the concept evolved into a simple and efficient optimization algorithm.

Page 8: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Main concept of PSO• PSO is a population-based search procedure where the individuals,

referred to as particles, are grouped into a swarm.

• Each particle in the swarm represents a candidate solution to the optimization problem.

• In a PSO system, each particle is "flown" through the multidimensional search space, adjusting its position in search space according to its own experience or knowledge and that of neighboring particles.

• Therefore, a particle makes use of the best position encountered by itself and the best position of its neighbors to position itself toward an optimum solution.

• The effect is that particles "fly" toward the global minimum, while still searching a wide area around the best solution.

• The performance of each particle is measured according to a predefined fitness function which is related to the problem being solved.

Page 9: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Social Network Structure: The Neighborhood Principle

• The feature that drives PSO is social interaction.

• Individuals (particles) within the swarm learn from each other, and based on the knowledge obtained, move to become more similar to their “better” neighborsIndividuals within a neighborhood communicate with one another.

•• The The social structure social structure for PSO is determined through the formation of neighborhoods.

Topology:•Ring•Star•Wheel

Page 10: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Ring Topology—Local best (lbest)

•Each particle communicates with its n immediate neighbors (n=2). •Each particle attempts to move closer to the best individual in its neighborhood particles move toward their neighborhood best as well as the swarm best.Advantage: a larger area ofthe search space is traversed much better solutions Disadvantage: slower convergence than gbest

Page 11: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Star Topology – Global best (gbest)

•Each particle can communicate with every other individual, forming a fully connected social network•In this case each particle is attracted toward the best particle (best problem solution) found by any member of the entire swarm. •Each particle therefore imitates the overall best particle.

Page 12: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Wheel Topology

•Only one particle is connected to all others, which effectively isolates individuals from one another .•Only this focal particle adjusts its position toward the best particle. •If the adjustment to the focal particle results in an improvement in that individual's performance, the improvement is communicated to the other particles.

For all topology: the neighborhood is determined based on the numerical index assigned to an individual and not on geometric measures such as position, or Euclidean distance.

Page 13: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

PSO Algorithm• The system initially has a population of random solutions

called particles

• Each particle has random velocity and memory that keeps track of previous best position and corresponding fitness

• Each individual compares its current position to its own best position ‘pbest’ particle best: No information from other particles is used

• It has another value called ‘gbest’, which is the best value of all the ‘pbestpbest’ positions in the swarm

• Basic concept of PSO lies in accelerating each particle towards its pbest and the gbest locations at each time step

• ‘Ibest’ PSO, influenced by the best position within their neighborhood, as well as their own past experience.

Page 14: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

PSO Algorithm

The velocity of the particles:

The position vector of the particles is changed:

•Performance of each particle measured according to a predefined fitness function.•Inertia weight (w) influences tradeoff between global and local exploration.•Good approach is to reduce inertia weight during run (i.e., from 0.9 to 0.4 over 1000 generations)•Usually set positive acceleration constants c1

and c2 to 2 ; c1 +c2 ≤ 4; if c1 +c2> 4, velocities and positions explode toward infinity.•rand1,rand2 ~ standard uniform distribution U(0,1) •Usually set maximum velocity to dynamic range of variable the larger the change in velocity to move the particle back toward the best solutions…but there is limit!

cognitive component social componentUpper limit of

Random variables

‘gbest’ version

Page 15: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Flow chart:

PSO AlgorithmPseudocode:

Page 16: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Fitness Calculation & ConvergenceFitness Calculation•The performance of each particle is measured by a fitness function. •Fitness function is a measure the closeness of the corresponding solution to the optimum. E.g, if the objective is to find the minimum of the function f(x1, x2) = sin x1.sin x2.(x1.x2)0.5, then the "fitness" function is the function f(x1, x2) .

Convergence•The algorithms above continue until convergence has been reached. Usually, a PSO algorithm is executed for a fixed number of iterations, or fitness function evaluations. •Alternatively, a PSO algorithm can be terminated if the velocity changes are close to zero for all the particles, in which case there will be no further changes in particle positions.

Page 17: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

PSO System ParametersStandard PSO is influenced by:

• dimension of the problem

• number of individuals

• upper limit random parameters

• upper limit on the maximum velocity (Vmax)

• neighborhood size

• inertia weight

Dimension is the number of tasksPSO has shown to perform better on higher-dimensional problems [Angeline 1998, Van den Bergh 1999]

The upper limit of the random value is a system parameter specified by the user. The larger the upper limit, the more the trajectory of the particles oscillates. Smaller values ensure smooth trajectories.

This upper limit prevents particles from moving too rapidly from one region in search space to another.Vmax is usually initialized as a function of the range of the problem

The gbest version is simply Ibest with the entire swarm as the neighborhood. The gbest is more susceptible to local minima, since all individuals are pulled toward that solution. The smaller the neighborhood radius, and the more neighborhoods can be used the less susceptible PSO is to local minima. The more neighborhoods the slower the convergence.

The inertia weight controls the influence of previous velocities on the new velocity. Large inertia weights cause larger exploration of the search space, while smaller inertia weights focus the search on a smaller region. Typically, PSO is started with a large inertia weight, which is decreased over time.

Page 18: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Modification to PSOOriginal developments in PSO resulted in the three PSO versions: pbest, Ibest

and gbest.

Recent research resulted some modifications to the original PSO algorithms, mainly to improve convergence and to increase diversity.

• Binary PSO : updating particle position by binary code; the velocity update follow the standard PSO.

• PSO with Selection : similar in evolutionary computing where a score (rank) is given to the particle performance improves the local search capabilities of PSO

• Breeding PSO : reproduction step to the standard PSO, cross-over operator for two particles (parents) to generate offspring

• Neighborhood Topologies : follow the concepts of lbest; particles within a neighborhood move toward their own best positions and the best solution of the entire neighborhood

Page 19: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

PSO-vs-EC-vs-CESimilarity PSO and EC:

• optimization algorithms use adaptation of a population of individuals, based on natural properties.

• The search space is traversed using probabilistic transition rules.

Differences PSO and EC:•PSO has memory, while EC has no memory•Particles keep track of their best solutions, as well as that of their neighborhood. •The changes are driven through learning from peers in the case of PSO, and not through genetic recombination and mutations. •PSO uses no fitness function to drive the search process.

PSO can more closely be related to CEThe cultural beliefs are defined by the best solutions per individual and neighborhood,In case of EP, a function of previous mutations and distances from the best solutions.

EC: evolutionary computingCE: cultural evolutionEP: Evolutionary programming

Page 20: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Ant Colony Optimization (ACO)

• PSO modeled on the choreography of relatively small swarms where all individuals have the same behavior and characteristics.

• ACO considers swarms that consist of large numbers of individuals, where individuals typically have different morphological structures and tasks – but all contributing to a common goal.

Page 21: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Facts about the living organism

• It is roughly estimated that the earth is populated by 108 living organisms, of which only 2% are social insects [Dorigo 1999]. That is, only 2% of all insects live in swarms where social interaction is the most important aspect to ensure survival.

• These insects include all ant and termite species, and some bees and wasps species.

• Of these social insects, 50% are ants. Ant colonies consist of from 30 to millions of individuals.

How modeling the behavior ofants can be used to solve real-world problems

Page 22: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

The "Invisible Manager" (Stigmergy)Operation within an ant colony involves several different tasks, performed by different ant groups.

reproduction - the task of the queendefense - done by soldier antsfood collection - the task of specialized worker antsbrood care - the task of specialized worker antsnest brooming (including cemetery maintenance) - the task of specialized worker antsnest building and maintenance - the task of specialized worker ants.

Command center(magic)!?

Distribution and execution of tasks are based on anatomical differences and stigmergy. E.g: Anatomical differences, such as size and larger jaw structures, distinguish between army ants and food collectors.

Page 23: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Characteristics of Natural Stigmery

• The lack of central coordination.

• Communication and coordination among individuals in a colony are based on local modifications of the environment.

• Positive feedback, which is a reinforcement of actions (e.g. the trail-following behavior to collect food).

Algorithmic modeling of ant colonies is based on the concept of artificial stigmergy,:

“to find a mathematical model which accurately describes the stigmergeticcharacteristics of the corresponding ant individuals”

Task: Food Collection

Page 24: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

The Pheromone• Ants have the ability to always find the shortest path between their nest and the food source.

• Initially, paths are chosen randomly. It was then observed that, with time, more and more ants follow the shorter path. In nature, however, if more ants choose a longer path during the initial search.

• This behavior the dropping of pheromones by each ant.

• During their search for food, and on return from the food source to the nest, each ant drops a pheromone deposit on the path. To select a path to follow, ants follow that path with the largest pheromone concentration.

• The shortest path will have stronger pheromone deposits, since ants return on that path from the food source quicker

•The pheromone deposits evaporate with time The strength of the pheromone deposits on the longer path will decrease more quickly than for the shorter path.

Page 25: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

ACO Algorithm

ACO algorithms were originally conceived to find the shortest route in traveling salesman problems. In ACO: several ants travel across the edges that connect the nodes of a graph while depositing virtual pheromones.

A virtual ant arriving from node A considers which edge to choose nexton the basis of pheromone levels tij and visibilities hij (inverse of distance 1/lij). The edge to node A is not considered because that node has already been visited.Let us now consider the algorithm more formally. The number of ants M is usually equal to the number of nodes N in the graph. A small amount of virtual pheromones is deposited on all edges at the beginning of the search. The probability that ant k chooses the edge from node i to node j

Page 26: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

ACO Algorithm…cont

The constants a, b weight the importance of the two factors. If a = 0, ants choose solely on the basis of the shortest distance; conversely, if b = 0, ants choose solely on the basis of the pheromone amount. The divider in the fractionsums up the pheromone and visibility values for all edges H that are available at the node where the ant sits as long as they belong to the set Jk of nodes that the ant k has not yet visited. As soon as the ant visits a node, this is deleted from the list Jk.

Once all ants have completed a tour of the graph, each ant k retraces its own path and deposits an amount of pheromone

on traveled edges according to

where Lk is the total length of the path found by ant k and Q is a constant, which is set to be the length of the shortest path estimated with a simple heuristic method.

The amount of pheromones on each edge after all M antshave retraced their own path is equal to

Before starting all ants again in a new search for the shortest path, pheromone levels evaporate according to

where 0 ≤ ρ < 1 is the coefficient of pheromone evaporation

This concludes one iteration of the algorithm. The process is repeated forseveral hundred iterations until a satisfactorily short path has been found

Page 27: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Several important parameters in ACO Algorithm

• The most important of these parameters include the forgetting factor to model pheromone evaporation and the number of ants used.

• Too many ants increase computational complexity, and result in fast convergence to suboptimal trails. On the other hand, too few ants limit the synergetic effects of cooperation.

• A good balance between parameters a and ß should be achieved:

• if ß = 0, only pheromone information is used, which may lead to suboptimal paths;

• if a = 0, no pheromone information is used, and the approach corresponds to a stochastic greedy search.

Page 28: Swarm Intelligence - 熊本大学 · Introduction to Swarm Behavior Individual -vs-Collective behaviors: • There is a tight coupling between the swarm and the individuals. • Individuals

Conclusion

• PSO has already shown to be efficient and robust, even considering the simplicity of the algorithm. Much research is still needed to tap the benefits of this optimization process.

• While the standard ACO works only for discrete optimization problems, ACO can be applied to continuous problems by discretizingthe search space into discrete regions