You are on page 1of 37

29/04/1434

Bee Algorithm Direct Bee Colony Algorithm

29/04/1434

Njoud Maitah

and Lila Bdour

Copyright

29/04/1434

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

29/04/1434

Bee Algorithm

Presented by : Njoud Maitah and Lila bdour

29/04/1434

Outline
Introduction Bee in nature Bee algorithm Example Applications

29/04/1434

Introduction
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.

29/04/1434

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.

29/04/1434

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

29/04/1434

Bee in nature cont..


The waggle dance is showed in the following video .

29/04/1434

?? A moment of thinking
" ( )68 ( )69

10

29/04/1434

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.

11

29/04/1434

Bee in nature >>


Waggle dance in decision-making Waggle dance gives precise information about quality ,distance and direction of flower patch.

12

29/04/1434

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.

13

29/04/1434

Bee in nature >>


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

14

29/04/1434

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.

15

29/04/1434

Bee Algorithm (BA)


The Bees Algorithm is an optimisation algorithm inspired by the natural foraging behaviour of honey bees to find the optimal solution.

16

29/04/1434

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.

17

29/04/1434

Initialise a Population of n Scout Bees Evaluate the Fitness of the Population Select m Sites for Neighbourhood Search Neighbourhood Search

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 (nm) Remaining Bees to Random Search New Population of Scout Bees

Flowchart of the Basic BA

18

29/04/1434

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)

19

29/04/1434

Simple Example
The following figure shows the mathematical function

20

29/04/1434

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)

21

29/04/1434

Simple Example
y

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

*
x

22

29/04/1434

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

23

29/04/1434

3- The best m site is chosen ( the best evaluation to m scout bee) from n
m=5, e=2, m-e=3

24

29/04/1434

* *

*
x

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

25

29/04/1434

4- Select a neighborhood search site upon ngh size:

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

26

29/04/1434

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 n1 = 2 (rich) (poor)

27

29/04/1434

** **
y

**

* * * * *

**
* *

*
*

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

28

29/04/1434

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:

29

29/04/1434

Simple Example
y

* * * * *

* *

* *

*
*

Graph 5. Select the Fittest Bee * from Each Site

30

30

29/04/1434

Simple Example
7- initializes a new population:
Taking the old values (5) and assigning random values (5) to the remaining values n-m

31

31

29/04/1434

Simple Example
y

* * o o * o

o *
m

o
x

Graph 6. Assign the (nm) Remaining Bees to Random Search

32

32

29/04/1434

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

33

33

29/04/1434

Simple Example
y

* * * * *

Graph 7. Find The Global Best point

34

29/04/1434

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

35

29/04/1434

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

36

29/04/1434

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

37

You might also like