Вы находитесь на странице: 1из 53

1

Iay Shah(CL 117)


Neha| Shah(CL 119)
Abh|shek Suthar(CL 131)
1he 8ees A|gor|thm and Its
App||cat|ons
2
Agenda
ntroduction
The Bees Algorithm
Bees in Nature
Proposed Bees Algorithm
Simple Example
BA Applications
Conclusion

nLroducLlon
There was a great interest between
researchers to generate search algorithms
that find near-optimal solutions in reasonable
running time
The Swarm-based Algorithm is a search
algorithm capable of locating good solutions
efficiently
The algorithm could be considered as
belonging to the category of "ntelligent
Optimisation Tools

@e 8ees AlgorlL (8A)


Bees in nature
Proposed Bees Algorithm

8ees ln naLure
- A colony of honey bees can extend itself
over long distances in multiple directions
(more than km)

8ees ln naLure
llower paLces wlL plenLlful aounLs of necLar
or pollen LaL can be collecLed wlL less efforL
sould be vlslLed by ore bees wereas paLces
wlL less necLar or pollen sould recelve fewer
bees

8ees ln naLure
- Scout bees search randomly from one
patch to another

8ees ln naLure
- The bees who return to the hive, evaluate
the different patches depending on certain
quality threshold (measured as a
combination of some elements, such as
sugar content)

8ees ln naLure
- They deposit their nectar or pollen go to
the dance floor" to perform a waggle
dance"
10
8ees ln naLure
- Bees communicate through this waggle
dance which contains the following
information:
1 @e d|rect|on of flower paLces
(angle beLween Le sun and Le
paLc)
2 @e d|stance fro Le lve
(duraLlon of Le dance)
@e qua||ty raLlng (flLness)
(frequency of Le dance)
11
8ees ln naLure
These information helps the colony to send
its bees precisely
6- Follower bees go after the dancer bee to
the patch to gather food efficiently and
quickly
12
8ees ln naLure
- The same patch will be advertised in the
waggle dance again when returning to the
hive is it still good enough as a food source
(depending on the food level) and more bees
will be recruited to that source
8- More bees visit flower patches with
plentiful amounts of nectar or pollen
1
8ees ln naLure
Thus, according to the fitness, patches can
be visited by more bees or may be
abandoned
1
9roposed 8ees AlgorlL (8A)
The Bees Algorithm is an optimisation
algorithm inspired by the natural foraging
behaviour of honey bees to find the optimal
solution
The following figure shows the pseudo code
of the algorithm in its simplest form
1
9roposed 8ees AlgorlL (8A)
1 nlLlallse populaLlon wlL rando soluLlons
2 LvaluaLe flLness of Le populaLlon
3 Wlle (sLopplng crlLerlon noL eL)
//lorlng new populaLlon
4 SelecL slLes for nelgbourood searc
S 8ecrulL bees for selecLed slLes (ore bees for
besL e slLes) and evaluaLe flLnesses
6 SelecL Le flLLesL bee fro eac paLc
7 Asslgn realnlng bees Lo searc randoly
and evaluaLe Lelr flLnesses
8 Lnd Wlle
seudo code of the bas|c bees a|gor|thm
1
9roposed 8ees AlgorlL (8A)
The algorithm requires a number of parameters
to be set:
Number of scout bees n
Number of sites selected m out of n visited sites
Number of best sites e out of m selected sites
Number of bees recruited for best e sites nep or (n)
Number of bees recruited for the other (m-e)
selected sites which is nsp or (n)
nitial size of patches ngh which includes site and
its neighbourhood and stopping criterion
Number of algorithm steps repetitions imax
1
9roposed 8ees AlgorlL (8A)
The following figure shows the flowchart of
the Basic Bees Algorithm
1
LvaluaLe Le llLness of Le 9opulaLlon
ueLerlne Le Slze of nelgbourood
(9aLc Slze nqh)
8ecrulL 8ees for SelecLed SlLes
(ore 8ees for Le 8esL e SlLes)
SelecL Le llLLesL 8ee fro Lac SlLe
Asslgn Le %nm% 8ealnlng 8ees Lo 8ando Searc
new 9opulaLlon of ScouL 8ees
SelecL m SlLes for nelgbourood Searc
N
e
i
q
h
b
o
u
r
h
o
o
d

5
e
o
r
c
h
|owchart of the 8as|c 8A
nlLlallse a 9opulaLlon of n ScouL 8ees
1
roposed 8ees A|gor|thm (8A)
1he fo||ow|ng |s a descr|pt|on of the a|gor|thm
steps
1 @e algorlL sLarLs wlL Le n scouL bees
belng placed randoly ln Le searc space
(for examp|e n100)
20
roposed 8ees A|gor|thm (8A)
2 @e flLnesses of Le slLes vlslLed by Le scouL bees
afLer reLurn are evaluaLed ln step 2 as follow
@e flrsL scouL bee ls Laken and Lralned wlL Le daLa
(for exaple lf we geL 200 correcL answer ouL of 1000
record Le bee wlll glve Le evoluLlon of 20)
@e second scouL bee ls Laken and Le sae process ls
repeaLed and we y geL 0
@e processes wlll be repeaLed on Le all scouL bees and
evaluaLed Lroug evaluaLlon funcLlon known as llLness
wlc canges upon Le sLudled proble
21
roposed 8ees A|gor|thm (8A)
@e evaluaLlon of Le 100 scouL bees ls sLored ln
array as follow
@en Le array wlll be reordered based on Le
evaluaLlon fro Le lger Lo Le lower value
1 2 3 4 5 6 . . ... 99 100
20% 50% 60% 30% 80% 10% . . . 35% 72%
22
roposed 8ees A|gor|thm (8A)
3 @e m slLes wlll be selecLed randoly (Le besL
evaluaLlon Lo m scouL bee) fro n
lor exaple m10
@en we coose Le besL e slLe (scouL bee) ouL off
wlc ls deLerlned randoly
lor exaple e2 Len me 1028
1 2 3 4 5 6 7 8 9 10
80% 78% 75% 72% 69% 66% 65% 60% 59% 58%
2
roposed 8ees A|gor|thm (8A)
4 A nelgborood searc slLes of slze ngh ls
selecLed
@us ln Lls sLep a nelgborood slze ngh ls
deLerlned wlc wlll be used Lo updaLe Le
bees declared ln Le prevlous sLep
@ls ls lporLanL as Lere lgL be beLLer
soluLlons Lan Le orlglnal soluLlon ln Le
nelgborood area
Suppose ngh0S
2
roposed 8ees A|gor|thm (8A)
S kecrulL 8ees for Le selecLed slLes and evaluaLe
Le flLness of Le slLes
nuber of bees (n2) wlll be selecLed randoly Lo
be senL Lo e slLes (n240)
and cooslng n1 bees randoly wlc Lelr
nuber ls less Lan n2 (n120) Lo be senL Lo me
slLes
2
roposed 8ees A|gor|thm (8A)
6 ooslng Le besL bee fro eac slLe (Le lgesL
flLness) Lo for Le nexL bee populaLlon
@ls ls noL exlsL ln naLure lL as been placed ln Le
algorlL Lo reduce Le nuber of slLes Lo be explored
2
roposed 8ees A|gor|thm (8A)
@e besL bee fro eac slLe of m slLes ls selecLed as
follow
@e flrsL slLe wlll be Laken (for exaple a slLe fro e
slLes)
An array conLalns n240 bees wlll be consLrucLed
were Le value of eac bee ls equal Lo Le value of Le
orlglnal scouL bee wlL a llLLle odlflcaLlon dependlng
on Le nelgborood ngh
2
roposed 8ees A|gor|thm (8A)
@e daLa wlll be Lralned on Le 0 bees and evaluaLed
Lroug Le flLness funcLlon
@e resulLs wlll be sLored ln Leporary array
@e array wlll be ordered and Le besL value wlll be
Laken
1 2 3 . 40
82% 81.2% 79.9% . 79.2%
2
roposed 8ees A|gor|thm (8A)
@e step 6 ls repeaLed for all m slLes
AL Le end we wlll geL Le besL m10 bees wlc wlll
be sLored aL Le beglnnlng of Le array (n100)
1 2 3 4 5 6 . 10 11 . 99 100
82% 79% 77% 73% 70% 67% . 58.2%
2
roposed 8ees A|gor|thm (8A)
Searces ln Le nelgborood of Le besL e slLes
wlc represenL ore prolslng soluLlons are
ade ore deLalled by recrulLlng ore bees Lo
follow Le Lan Le oLer selecLed bees
@ogeLer wlL scouLlng Lls dlfferenLlal
recrulLenL ls a key operaLlon of Le 8ees
AlgorlL
0
roposed 8ees A|gor|thm (8A)
7 nlLlals new populaLlon
@e realnlng bees ln Le populaLlon wlll be
asslgned randoly around Le searc space
(values fro 11 Lo 100 ln Le prevlous array)
@e new populaLlon becoes as follow
1 2 3 4 5 6 . 10 11 . 99 100
82% 79% 77% 73% 70% 67% . 58.2% Random vaIues
1
roposed 8ees A|gor|thm (8A)
@e loop counLer ls reduced and Le sLeps two
Lo seven are repeaLed unLll Le sLopplng crlLerlon
ls eL (endlng Le nuber of Le repeLlLlons
lax)
lor exaple lax1000
2
roposed 8ees A|gor|thm (8A)
AL Le end of eac lLeraLlon Le colony wlll ave
Lwo parLs Lo lLs new populaLlon represenLaLlves
fro eac selecLed paLc and oLer scouL bees
asslgned Lo conducL rando searces

S|mp|e Lxamp|e unct|on Cpt|m|sat|on


ere are a slple exaple abouL ow 8ees
algorlL works
@e exaple explalns Le use of bees
algorlL Lo geL Le besL value represenLlng a
aLeaLlcal funcLlon (funcLlonal opLlal)

S|mp|e Lxamp|e
@e followlng flgure sows Le aLeaLlcal
funcLlon

S|mp|e Lxamp|e
1 @e flrsL sLep ls Lo lnlLlaLe Le populaLlon wlL
any 10 scouL bees wlL rando searc and
evaluaLe Le flLness (n10)

S|mp|e Lxamp|e
rap 1 nlLlallse a 9opulaLlon of (n10% ScouL 8ees
wlL rando Searc and evaluaLe Le flLness
x
y
*
*
*
*
*
*
*
*
*
*

S|mp|e Lxamp|e
2 opu|at|on eva|uat|on f|tness
an array of 10 values ln consLrucLed and ordered
ln ascendlng way fro Le lgesL value of y Lo
Le lowesL value of y dependlng on Le prevlous
aLeaLlcal funcLlon

S|mp|e Lxamp|e
@e besL m slLe ls cosen randoly ( Le besL
evaluaLlon Lo scouL bee) fro n
mS e2 me3

rap 2 SelecL besL (mS) SlLes for nelgbourood Searc


(e2) ellLe bees " and (me3) oLer selecLed bees"
x
y

*
*
*
*
*
S|mp|e Lxamp|e

e
0
S|mp|e Lxamp|e
SelecL a nelgborood searc slLe upon ngh
slze
Ass|gn random nelgborood ngh as follow
1
x
y

rap ueLerlne Le Slze of nelgbourood (9aLc Slze ngh)


S|mp|e Lxamp|e
2
S|mp|e Lxamp|e
recrulLs ore bees Lo Le selecLed slLes and
evaluaLe Le flLness Lo Le slLes
Sendlng bees Lo e slLes (rlc slLes) and me slLes
(poor slLes)
More bees wlll be senL Lo Le e slLe
n2 4 (r|ch)
n1 2 (poor)

x
y

*
* *
*
rap 8ecrulL 8ees for SelecLed SlLes
(ore 8ees for Le e2 LllLe SlLes)
*
*
*
*
*
*
*
*
*
*
* *
& &
& &
S|mp|e Lxamp|e

S|mp|e Lxamp|e
SelecL Le besL bee fro eac locaLlon (lger
flLness) Lo for Le new bees populaLlon
ooslng Le besL bee fro every m slLe as follow

x
y

*
* *
*
rap SelecL Le llLLesL 8ee & fro Lac SlLe
*
*
*
*
*
*
*
*
*
*
S|mp|e Lxamp|e

S|mp|e Lxamp|e
lnlLlallzes a new populaLlon
@aklng Le old values () and asslgnlng rando values
() Lo Le realnlng values nm

x
y
*
rap Asslgn Le (nm) 8ealnlng 8ees Lo 8ando Searc
*
*
*
o
*
o
o
o
o

e
S|mp|e Lxamp|e

S|mp|e Lxamp|e
Le loop counLer wlll be reduced and Le sLeps
fro Lwo Lo seven wlll be repeaLed unLll reaclng
Le sLopplng condlLlon (endlng Le nuber of
repeLlLlons |max)
AL Le end we reac Le besL soluLlon as sown ln
Le followlng flgure
@ls besL value (besL bees fro m) wlll represenL
Le opLlu answer Lo Le aLeaLlcal funcLlon

x
y
*
rap llnd @e lobal 8esL polnL
*
*
*
*
S|mp|e Lxamp|e
0
8A App||cat|ons
Function Optimisation
TSP
Electronic Design
Fuzzy Control Design
Data Clustering (solving the local optimum Ior K-
means algorithm)
Robot control
1
8A pros and cons
The advantages oI the BA
Very eIIicient in Iinding optimal solutions
Overcoming the problem oI local optima
The disadvantages oI the BA
It is using a number oI tunable parameters
The parameters values could be set by
conducting a small number oI trails
2
oncluslon
A new optimisation algorithm has been presented
Authors claimed that the algorithm has
remarkable robustness, producing 100 success
rate in all cases they have tackled
The algorithm outperIormed other techniques in
terms oI speed oI optimisation and accuracy oI
the obtained results

8eferences
1hanks for your attention

Вам также может понравиться