Artificial Bee Colony Algorithm

Artificial Bee Colony Algorithm
Artificial Bee Colony
Artificial Bee Colony
Behaviour of Bees in Nature
 Experienced
Scout
Employed
Food
sources:
Beebees
(SB):
foragers
foragers:
theIf value
the
(EF):
These
ofWhen
starts
aunemployed
food
types
searching
the
source
recruit
of forager
depends
bee use
finds
on
their
andto
onlooker
(OB):
Ifbee
the
forager
attends
spontaneously
exploits
many
historical
factors.
the
memories
food
For
without
source,
thefor
simplicity,
the
it
will
location
knowledge,
raise
the and
‘‘profitability’’
to be
quality
an bee
employed
ofwill
food
ofstart
a
a waggle
dance
done
byany
some
other
bee,
the
it willsource
forager
food
sources.
bewho
aby
scout
can
memorizes
be
bee
represented
the location
with
aofsingle
the
food
quantity
source.
searching
using
the
knowledge
from
waggle
dance.
ES
EF
It
can the
be ascout
reactivated
recruit
beebee
toforaging
search
which
foragernew
is
by
After
employed
bee
using
patches
searching
ifinformation
athe
new
whole
food
source
from
source
loads athe
portion
offood
nectar
from
the
waggle
is
declared
exhausted
dance
in
dancing
(ES).
(RF)
area
by
food source, it returns to the hive
another
employed
bee (ER)
and unloads
the nectar
to the food
area in the hive
RF
ER
RF
Dancing area for B
Unloading nectar
from B
Dancing aea for A
ER
OB
Unloading nectar
from A
OB
ES
EF
SB
Artificial Bee Colony
Behaviour of Bees in Nature
 Communication among bees about the quality of food sources
is being achieved in the dancing area by performing waggle
dance
 While performing the waggle dance, the direction
of bees indicates the direction of the food source in
relation to the Sun, the intensity of the waggles
indicates how far away it is and the duration of
the dance indicates the amount of nectar on
related food source.
Dancing aea for A
Artificial Bee Colony
Methodology
 Artificial bee colony (ABC) algorithm was first proposed by Karaboga
in 2005, which is based on a particular intelligent behavior of honeybee
swarms
 ABC algorithm is inspired by the foraging behavior of real
bee colony. The objective of a bee colony is to maximize the
nectar amount stored in the hive.
 Each bee performs one of following three kinds of
roles. They could transform from one role to another
in different phases of foraging
employed bees (EB)
onlooker bees (OB)
 scout bees(SB)
Artificial Bee Colony
Methodology
 The flow of nectar collection is as follow :
1.In initial phase, there are only some SB and OB in the colony. SB are sent out
to search for potential nectar source, and OB wait near the hive for being
recruited. If any SB finds a nectar source, it will transform into EB.
2. EB collect some nectar and go back to the hive, and then dance with different
forms to share information of the source with OB. Diverse forms of dance
represent different quality of nectar source.
3. Each OB estimates quality of the nectar sources found by all EB, then follows
one of EB to the corresponding source. All OB choose EB according to some
probability. Better sources (more nectar) are more attractive (with larger
probability to be selected) to OB.
4. Once any sources are exhausted, the corresponding EB will abandon them,
transform into SB and search for new source
Artificial Bee Colony
Flowchart of ABC algorithm
Parameters
Initialization
Bee Colony
Initialization
Cycle
Start
1.Population Number (PN)
i=1:PN/2 Threshold (Limit) Scout Bee Phase
2.For
SB Triggering
1. Randomly
Select
Another
Solution
k Found
Other EBby (1)
Randomly
Generate
a newbySolution
3.Maximum
Cycle
Number
(MCN)
2. Randomly
Pick anto
Element
j to be Modified
4.Dimention
of Vector
Be Optimized
(D)
3.
Modification
Each
Solution
5.Upper Bound (UB) & Lower Bound(LB) of Each Element
4. Fitness
Estimation
before
and after Modification:
Yes
Fitness
Threshold
(IFT)
1.6.Ideal
PN/2
Become
Employed
Bees,
Other
PN/2
Become
Onlooker
Bees
Fitness(x),Fitness(v)
No
2. 5. wheel’
AllAccording
theselection
PN/2 EB
Find PN/2
Nectar Solution
Source with better Fitness is
‘roulette
mechanism:
to Greedy
Selection,
Failure(i) > Limit
Cycle
=
Cycle
+
1
3. Fitness
Estimation
of
Each
Source:
Fitness(i)
t=0; i=1;
reserved
Failure
Counter
of not
EachImprove,
Source:Failure(i)=Failure(i)+1,
Failure(i)=0
While4.(t<PN/2)
6. If Solution
does
otherwise
If rand<prob(i)
Failure(i)=0
t=t+1 7. End
Fllowing Step 1- 6 Employed Bee Phase, Modify the ith Solution.
No
End
i=i+1
Yes
Has reached MCN?
End
Optimization
Prob(i) = Fitness(i) / sum(Fitness)
Or
Complete
Ideal solution is found ?
Employed Bee
Phase
Estimate Recruiting
Probability
Onlooker Bee
Phase
Record Best
Solution
Artificial Bee Colony Algorithm
• ABC is developed based on inspecting
– the behaviors of real bees on finding nectar and
– sharing the information of food sources to the bees in the hive
• Three types of bee in ABC
– The Employed Bee
– The Onlooker Bee
– The Scout
5.2 Agents in ABC
• The Employed Bee:
It stays on a food source and provides the neighborhood of
the source in its memory.
• The Onlooker Bee:
It gets the information of food sources from the employed
bees in the hive and select one of the food source to gathers
the nectar.
• The Scout:
It is responsible for finding new food, the new nectar, sources
5.2 Movement of the Onlookers
• Probability of Selecting a nectar source:
𝑃𝑖 =
𝐹(𝜃𝑖 )
(7)
𝑆
𝑘=1 𝐹(𝜃𝑘 )
– Pi : The probability of selecting the ith employed
bee
– S : The number of employed bees
– θi : The position of the ith employed bee
– F(i) : The fitness value
10
5.2 Movement of the Onlookers (2)
• Calculation of the new position:
𝑥𝑖𝑗 (𝑡 + 1) = 𝜃𝑖𝑗 𝑡 + ∅(𝜃𝑖𝑗 𝑡 − 𝜃𝑘𝑗 𝑡 ) (8)
– xi :The position of the onlooker bee.
– t : The iteration number
– k : The randomly chosen employed bee.
– j : The dimension of the solution
– (.) : A series of random variable in the range [-1,1] .
11
Movement of the Scouts
• The movement of the scout bees follows equation (3).
• 𝜃𝑖𝑗 = 𝜃𝑗𝑚𝑖𝑛 + 𝑟 × (𝜃𝑗𝑚𝑎𝑥 − 𝜃𝑗𝑚𝑖𝑛 )
(9)
– r : A random number, r[0,1]
12
5.2 Artificial Bee Colony (ABC) (4)
Record the best
solution found so far
 ij   j min  r   j max   j min 
•
•
•
The Employed Bee
The Onlooker Bee
The Scout
F  i 
xij t  1S   ij t     ij t    kj t 
 F  k 
Pi 
k 1
13