37
29/04/1434 1 Bee Algorithm Direct Bee Colony Algorithm

Bee algorithm

Embed Size (px)

DESCRIPTION

CI research

Citation preview

Page 1: Bee algorithm

29/04/1434

1

Bee Algorithm

Direct Bee Colony Algorithm

Page 2: Bee algorithm

29/04/1434

2

Njoud Maitah and Lila Bdour

Copyright ©

Page 3: Bee algorithm

29/04/1434

3

The Goal

• We will present an optimization algorithm that inspired by decision-making process of honey bees .

Page 4: Bee algorithm

29/04/1434

4

Bee Algorithm

Presented by : Njoud Maitah and Lila bdour

Page 5: Bee algorithm

29/04/1434

5

Outline •Introduction

•Bee in nature

•Bee algorithm

•Example

•Applications

Page 6: Bee algorithm

29/04/1434

6

• Honeybee search for the best nest site between many sites with taking care of both speed and accuracy .

• This analogues to finding the optimal solution (optimality) in an optimization process.

Introduction

Page 7: Bee algorithm

29/04/1434

7

Bee in nature

• The group decision making process used by bees for searching out the best food resources among various solutions is a robust example of swarm-based decision method.

• This group decision-making process can be mimicked for finding out solutions of optimization problems.

Page 8: Bee algorithm

29/04/1434

8

Bee in nature cont..

• Bee use a waggle dance to communicate

• What is the waggle dance ?!

It is a dance that performed by scout bees to inform other foraging bees about nectar site.

• What are the scout and foraging ?!

Scout bee : the navigator

Forging bee : the collector of food from

Page 9: Bee algorithm

29/04/1434

9

Bee in nature cont..

• The waggle dance is showed in the following video .

Page 10: Bee algorithm

29/04/1434

10

A moment of thinking ?? بـســـم هللا الـرحـمـــن الـرحـيــــم

خذي من الجبال بيوتا ومن " حل أن ات ك إلى الن وأوحى رب

ا يعرشون جر ومم مرات فاسلكي ( 68)الش ثم كلي من كل الث

ك ذلال يخرج من بطونها شراب مختلف ألوانه فيه سبل رب

رون اس إن في ذلك آلية لقوم يتفك ”( 69)شفاء للن

Page 11: Bee algorithm

29/04/1434

11

Bee in nature >>

• Waggle dance is a communication method used by bees to inform other bees about food resources and location of nest site .

• Figure-eight running 8 .

• Number of runs represents the distance .

• The angle of run indicates the direction.

Page 12: Bee algorithm

29/04/1434

12

Bee in nature >>

• Waggle dance in decision-making

• Waggle dance gives precise information about quality ,distance and direction of flower patch.

Page 13: Bee algorithm

29/04/1434

13

Bee in nature >>

• Decision 1 : Quiescent bees evaluate the patch and decide to recruit or explore for other patches. “decision”

If the patch still good ,increase the number of foraging bees.

Page 14: Bee algorithm

29/04/1434

14

Bee in nature >>

• Decision 2 : decide the number of bees recruited to the patch based on the quality.

Page 15: Bee algorithm

29/04/1434

15

Bee in nature >>

• Decision 3 : Nest-site selection.

Two activity to reach to the decision :

• Consensus : agreement among the group of quiescent.

• Quorum : threshold value.

Page 16: Bee algorithm

29/04/1434

16

Bee Algorithm (BA)

• The Bees Algorithm is an optimisation

algorithm inspired by the natural foraging

behaviour of honey bees to find the

optimal solution.

Page 17: Bee algorithm

29/04/1434

17

Bee Algorithm (BA)

1. Initialise population with random solutions.

2. Evaluate fitness of the population.

3. While (stopping criterion not met)

//Forming new population.

4. Select sites for neighbourhood search.

5. Recruit bees for selected sites (more bees for best e sites) and evaluate fitnesses.

6. Select the fittest bee from each patch.

7. Assign remaining bees to search randomly

and evaluate their fitnesses.

8. End While.

Page 18: Bee algorithm

29/04/1434

18

Evaluate the Fitness of the Population

Determine the Size of Neighbourhood

(Patch Size ngh)

Recruit Bees for Selected Sites (more Bees for the Best e Sites)

Select the Fittest Bee from Each Site

Assign the (n–m) Remaining Bees to Random Search

New Population of Scout Bees

Select m Sites for Neighbourhood Search

Nei

gh

bo

urh

oo

d S

earc

h

Flowchart of the Basic BA

Initialise a Population of n Scout Bees

Page 19: Bee algorithm

29/04/1434

19

Simple Example: Function Optimisation

• Here are a simple example about how Bee algorithm works

• The example explains the use of bee algorithm to get the best value representing a mathematical function (functional optimal)

Page 20: Bee algorithm

29/04/1434

20

Simple Example

• The following figure shows the mathematical function

Page 21: Bee algorithm

29/04/1434

21

Simple Example

• 1- The first step is to initiate the population with any 10 scout bees with random search and evaluate the fitness. (n=10)

Page 22: Bee algorithm

29/04/1434

22

Graph 1. Initialise a Population of (n=10) Scout Bees with random Search and evaluate the fitness.

x

y

*

*

*

*

*

* * * * *

Simple Example

Page 23: Bee algorithm

29/04/1434

23

2- Population evaluation fitness:

• An array of 10 values is constructed and ordered in ascending way from the highest value of y to the lowest value of y depending on the previous mathematical function

Page 24: Bee algorithm

29/04/1434

24

3- The best m site is chosen ( the best evaluation to m scout bee) from n

m=5, e=2, m-e=3

Page 25: Bee algorithm

29/04/1434

25

Graph 2. Select best (m=5) Sites for Neighbourhood Search: (e=2) elite bees “▪” and (m-e=3) other selected bees“▫”

x

y

▪ ▫

* * * * *

m e

Page 26: Bee algorithm

29/04/1434

26

4- Select a neighborhood search site upon ngh size:

x

y

▪ ▫

Graph 3. Determine the Size of Neighbourhood (Patch Size ngh)

Page 27: Bee algorithm

29/04/1434

27

• 5- recruits bees to the selected sites and evaluate the fitness to the sites:

– Sending bees to e sites (rich sites) and m-e sites (poor sites).

– More bees will be sent to the e site.

• n2 = 4 (rich)

• n1 = 2 (poor)

Page 28: Bee algorithm

29/04/1434

28

x

y

▪ ▫

*

* *

*

Graph 4. Recruit Bees for Selected Sites (more Bees for the e=2 Elite Sites)

*

*

*

*

* *

* * *

*

* *

* * * *

Page 29: Bee algorithm

29/04/1434

29

6- Select the best bee from each location (higher fitness) to form the new bees population.

Choosing the best bee from every m site as follow:

Page 30: Bee algorithm

29/04/1434

30

30

x

y

▪ ▫

*

* *

*

Graph 5. Select the Fittest Bee * from Each Site

*

* *

*

* *

* * *

*

Simple Example

Page 31: Bee algorithm

29/04/1434

31

31

Simple Example

7- initializes a new population:

Taking the old values (5) and assigning random values (5) to the remaining values n-m

Page 32: Bee algorithm

29/04/1434

32

32

x

y

*

Graph 6. Assign the (n–m) Remaining Bees to Random Search

*

* *

o *

o

o

o

o

m

e

Simple Example

Page 33: Bee algorithm

29/04/1434

33

33

Simple Example

8- the loop counter will be reduced and the steps from two to seven will be repeated until reaching the stopping condition (ending the number of repetitions imax)

• At the end we reach the best solution as shown in the following figure

• This best value (best bees from m) will represent the optimum answer to the mathematical function

Page 34: Bee algorithm

29/04/1434

34

x

y *

Graph 7. Find The Global Best point

*

* *

*

Simple Example

Page 35: Bee algorithm

29/04/1434

35

BA- Applications

Function Optimisation

BA for TSP

Training NN classifiers like MLP, LVQ, RBF and

SNNs

Control Chart Pattern Recognitions

Wood Defect Classification

ECG Classification

Electronic Design

Page 36: Bee algorithm

29/04/1434

36

Honeybee foraging algorithm for load balancing in cloud computing

• Servers are bees

• Web applications are flower patches

• And an advert board is used to simulate a waggle dance.

• Each server is either a forager or a scout

• The advert board is where servers, successfully fulfilling a request or may place adverts

Page 37: Bee algorithm

29/04/1434

37

Flow chart of Honeybee Foraging Algorithm in load balancing for cloud computing