60
مهندس شرفی هوشمصنوعی دانشجوی دکتری( حقیقاتم و تاحد علوه آزاد و نشگا دا) زش تکاملی پردا( نه سازی بهی)

Evolutionary Algorithms

Embed Size (px)

Citation preview

شرفیمهندس

(دانشگاه آزاد واحد علوم و تحقیقات)دانشجوی دکتری هوش مصنوعی

(بهینه سازی)پردازش تکاملی

Nature-Inspired Optimization Algorithms

Cat Swarm OptimizationCuckoo Optimization Algorithm

Grey Wolf OptimizationGenetic Algorithm

Differential Evolution

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Search space

x

y

(x,y) = (9.039 , 8.668)

f(x,y) = -8.5547

9.039 8.668

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

7 .425 0.118

2.324 1.0

4.5 8.6

1.257 6.364

1.23 5.3

2.34 9.1

9.039 8.668

x y

( x* , y* )

. . .

Population

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Population - based

Evolutionary ComputationEvolutionary Algorithms

RandomSwarm intelligence

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Swarm intelligence

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Genetic Algorithm

Grey Wolf Optimization

Cat Swarm Optimization

Cuckoo Optimization Algorithm

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Genetic Algorithm Cycle

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Genetic Algorithm

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Genetic Algorithm

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cat Swarm Optimization

The first paper based on cats’ behavior problems was

published in 2006 by Chu and Tsai to resolve continuous

optimization. They investigated cats’ behavior in two

modes, namely seeking and tracing modes. Cats are

always categorized into one of the aforementioned modes.

That what ratio of all cats (mixture ratio) exists in each

mode is considered as a crucial parameter which can be asubject of discussion.

Seeking mode(Exploration)

Tracing mode(Exploitation)

MixtureRate (MR)

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cat Swarm OptimizationThe seeking mode process

SMP(Seeking Memory Pool) SRD(Seeking Range of the selected Dimension)

CDC(Counts of Dimension to Change) SPC(Self-Position Considering)

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cat Swarm OptimizationThe seeking mode process

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cat Swarm OptimizationThe tracing mode process

Global best

Velocity

New Position

Current Position

acceleration coefficient

best position

velocity

inertia weight

Random[0,1]

position

resultant

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cat Swarm Optimization

The tracing mode process

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cat Swarm Optimizationpseudo code of cat swarm optimization algorithm

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cat Swarm Optimization

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

Grey wolf (Canis lupus) belongs to Canidae family

Grey wolves mostly prefer to live in a pack

The Group size is 5–12 on average

Hierarchy of grey wolf (dominance decreases from top down)

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

wolvesalphasThe leaders are a male and a female, called alphas. The

alpha is mostly responsible for making decisions about

hunting, sleeping place, time to wake, and so on.

The alpha’s decisions are dictated to the pack.

Interestingly, the alpha is not necessarily the strongest

member of the pack but the best in terms of managing the

pack. This shows that the organization and discipline of apack is much more important than its strength.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

Beta wolvesThe second level in the hierarchy of grey wolves is beta. The

betas are subordinate wolves that help the alpha in

decision-making or other pack activities.

The beta wolf can be either male or female, and he/she is

probably the best candidate to be the alpha in case one of

the alpha wolves passes away or becomes very old.

The beta wolf should respect the alpha, but commands the

other lower-level wolves as well. It plays the role of an

advisor to the alpha and discipliner for the pack. The beta

reinforces the alpha’s commands throughout the pack andgives feedback to the alpha

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

wolvesomegaThe lowest ranking grey wolf is omega. The omega plays the

role of scapegoat. Omega wolves always have to submit to

all the other dominant wolves.

They are the last wolves that are allowed to eat.

It may seem the omega is not an important individual in the

pack, but it has been observed that the whole pack face

internal fighting and problems in case of losing the omega.

This is due to the venting of violence and frustration of all

wolves by the omega(s). This assists satisfying the entire

pack and maintaining the dominance structure. In somecases the omega is also the babysitters in the pack.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

wolvesDeltaIf a wolf is not an alpha, beta, or omega, he/she is called

subordinate (or delta in some references). Delta wolves have

to submit to alphas and betas, but they dominate the

omega.

Scouts, sentinels, elders, hunters, and caretakers belong to

this category.Scouts are responsible for watching the boundaries of the territory and

warning the pack in case of any danger. Sentinels protect and guarantee

the safety of the pack. Elders are the experienced wolves who used to be

alpha or beta. Hunters help the alphas and betas when hunting prey

and providing food for the pack. Finally, the caretakers are responsiblefor caring for the weak, ill, and wounded wolves in the pack.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

The main phases of grey wolf hunting

are as follows:

Tracking, chasing, and approaching the prey.

Pursuing, encircling, and harassing the prey until it

stops moving.Attack towards the prey.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Hunting behavior of grey wolves: (A) chasing, approaching,and tracking prey

Grey Wolf Optimization

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Hunting behavior of grey wolves: (B–D) pursuiting,harassing, and encircling

Grey Wolf Optimization

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Hunting behavior of grey wolves: (E) stationary situationand attack

Grey Wolf Optimization

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Mathematical model and algorithm

Grey Wolf Optimization

Social hierarchy

In order to mathematically model the social hierarchy of

wolves when designing GWO, we consider the fittest

solution as the alpha (α). Consequently, the second and

third best solutions are named beta (β) and delta ( )

respectively. The rest of the candidate solutions are

assumed to be omega (ω). In the GWO algorithm the

hunting (optimization) is guided by α, β, and . The ωwolves follow these three wolves.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

2D and 3D position vectors and their possible next locations

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

HuntingGrey wolves have the ability to recognize the location of prey

and encircle them. The hunt is usually guided by the alpha.

The beta and delta might also participate in hunting

occasionally. However, in an abstract search space we have

no idea about the location of the optimum (prey). In order to

mathematically simulate the hunting behavior of grey

wolves, we suppose that the alpha (best candidate solution)

beta, and delta have better knowledge about the potential

location of prey. Therefore, we save the first three best

solutions obtained so far and oblige the other search agents

(including the omegas) to update their positions according tothe position of the best search agents.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

Position updading in GWO

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

The following formulas are proposed in this regard.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

Attacking prey (exploitation)

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Grey Wolf Optimization

Search for prey (exploration)

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization Algorithm

There are other birds that

dispense with every convention of

home making and parenthood,

and resort to cunning to raise their families

These are the “brood parasites,”

birds which never build their own

nests and instead lay their eggs in

the nest of another species,

leaving those parents to care for its young

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization Algorithm

The cuckoo is the best known brood parasite, an expert in

the art of cruel deception. Its strategy involves stealth,surprise and speed.

The mother removes one egg laid by the host mother, lays

her own and flies off with the host egg in her bill. The whole process takes barely ten seconds.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization Algorithm

Cuckoos parasitize the nests of a large variety of bird

species and carefully mimic the color and pattern of theirown eggs to match that of their hosts.

Many bird species learn to recognize a cuckoo egg dumped

in their own nest and either throw out the strange egg or desert the nest to start afresh.

So the cuckoo constantly tries to improve its mimicry of its

hosts’ eggs, while the hosts try to find ways of detecting the parasitic egg

For the cuckoos suitable habitat provides a source of food

(principally insects and especially caterpillars) and a place

to breed, for brood parasites the need is for suitable habitat for the host species.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization Algorithm

Like other evolutionary algorithms, the proposed

algorithm starts with an initial population of cuckoos.

These initial cuckoos have some eggs to lay in some host birds’ nests

Some of these eggs which are more similar to the host

bird’s eggs have the opportunity to grow up and become a mature cuckoo

Other eggs are detected by host birds and are killed.

After remained eggs grow and turn into a mature cuckoo,

they make some societies. Each society has its habitat

region to live in. The best habitat of all societies will be

the destination for the cuckoos in other societies. Then they immigrate toward this best habitat.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization Algorithm

Generating initial cuckoo habitat

In order to solve an optimization problem, it’s necessary

that the values of problem variables be formed as an

array. In GA and PSO terminologies this array is called

“Chromosome” and “Particle Position”, respectively. But

here in Cuckoo Optimization Algorithm(COA) it is called “habitat”.

In nature, each cuckoo lays from 5 to 20 eggs.

These values are used as the upper and lower limits ofegg dedication to each cuckoo at different iterations

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization Algorithm

maximum range will be called “Egg Laying Radius (ELR)”

In an optimization problem with upper limit of variable

High and lower limit of variable Low for variables, each

cuckoo has an egg laying radius (ELR) which is

proportional to the total number of eggs, number of

current cuckoo’s eggs and also variable limits of variableHigh and variable Low. So ELR is defined as:

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization Algorithm

Random egg laying in ELR, central red star is the initial

habitat of the cuckoo with 5 eggs; pink stars are the eggs’ new nest

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization Algorithm

Each cuckoo starts laying eggs randomly in some other host birds’ nests within her ELR.

After all cuckoos’ eggs are laid in host birds’ nests, some

of them that are less similar to host birds’ own eggs, are

detected by host birds and though are thrown out of the

nest. So after egg laying process,

p% of all eggs (usually 10%)

Rest of the eggs grow in host nests, hatch and are fed byhost birds.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization Algorithm

Another interesting point about laid cuckoo eggs is that

only one egg in a nest has the chance to grow. This is

because when cuckoo egg hatches and the chicks come out,

she throws the host bird’s own eggs out of the nest. In case

that host bird’s eggs hatch earlier and cuckoo egg hatches

later, cuckoo’s chick eats most of the food host bird brings

to the nest (because of her 3 times bigger body, she pushes

other chicks and eats more). After couple of days the host

bird’s own chicks die from hunger and only cuckoo chickremains in the nest

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization AlgorithmImmigration of cuckoos

When young cuckoos grow and become mature, they live in their own

area and society for sometime. But when the time for egg laying

approaches they immigrate to new and better habitats with more

similarity of eggs to host birds and also with more food for newyoungsters.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization Algorithm

When mature cuckoos live in all over the environment it’s

difficult to recognize which cuckoo belongs to which group.

To solve this problem, the grouping of cuckoos is done with

K-means clustering method (k of 3–5 seems to be sufficient in simulations).

When all cuckoos immigrated toward goal point and new

habitats were specified, each mature cuckoo is given some

eggs. Then considering the number of eggs dedicated to

each bird, an ELR is calculated for each cuckoo. Afterwardnew egg laying process restarts.

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization Algorithm

Eliminating cuckoos in worst habitats

Due to the fact that there is always equilibrium in birds’

population so a number of Nmax controls and limits the

maximum number of live cuckoos in the environment. This

balance is because of food limitations, being killed by

predators and also inability to find proper nest for eggs. In

the modeling proposed here in this paper, only those Nmax

number of cuckoos survive that have better profit values,others demise.

Convergence of more than 95% of all cuckoos to the same

habitat puts an end to Cuckoo Optimization Algorithm (COA).

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Flowchart of Cuckoo Optimization Algorithm

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

Cuckoo Optimization Algorithm

Pseudo-code for Cuckoo Optimization Algorithm

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.

𝐺𝑟𝑖𝑒𝑤𝑎𝑛𝑘(𝒏 = 𝟐𝟎𝟎)

2015 Workshop on Soft Computing and Big Data, ECE Dept. of K. N. Toosi University of Technology, Tehran.