محاضرات متقدمة تدرس لطلاب حاسبات بنى سويف السنة الثالثة لتنمية قدراتهم البحثية وهذة الموضوعات تدرس على مستوى الدكتوراة - - نريد تميز طلاب حاسبات ليتميزو فى البحث العلمى -
4. 4
Swarm Intelligence (SI)
An artificial intelligence (AI) technique
based on the collective behavior in
decentralized, self-organized systems
Generally made up of agents who
interact with each other and the
environment
No centralized control structures
Based on group behavior found in
nature
5. 5
Swarm-based Optimisation Algorithms
SOAs include:
The Ant Colony Optimisation (ACO)
algorithm
The Genetic Algorithm (GA)
The Particle Swarm Optimisation (PSO)
algorithm (for example the flocking of birds
and the schooling of fish)
Others……(Bees (BA), BAT, Firefly
Algorithms)
6. 6
Examples of Swarms in Nature:
Classic Example: Swarm of Bees
Can be extended to other similar systems:
Ant colony
Agents: ants
Traffic
Agents: cars
Crowd
Agents: humans
Flock of birds
Agents: birds
Immune system
Agents: cells
and molecules
7. 7
Bees algorithm
• the Bees Algorithm is a
population-based search
algorithm which was
developed in 2005. It
mimics the food
foraging behaviour of
honey bee colonies.
• The only condition for
the application of the
Bees Algorithm is that
some measure of
topological distance
between the solutions is
defined.
8. 8
Bees in Nature
1- A colony of honey bees can extend itself over
long distances in multiple directions (more than 10
km)
10. 10
Bees in Nature
3- 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)
11. 11
Bees in Nature
4- They deposit their nectar or pollen go to the
“dance floor” to perform a “waggle dance”
12. 12
Bees in Nature
5- Bees communicate through this waggle dance
which contains the following information:
1. The direction of flower patches (angle
between the sun and the patch)
2. The distance from the hive (duration of
the dance)
3. The quality rating (fitness) (frequency of
the dance)
13. 13
Bees in Nature
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
14. 14
Bees in Nature
7- 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
18. 18
Example
• n = 100 number of scout bees
• m = 10 number of sites selected out of n visited sites
• e = 2 number of best sites out of m selected sites
• nep = 40 number of bees recruited for best e sites
• nsp = 20 number of bees recruited for other (m-e)
selected sites
• ngh = 3 neighbourhood size
19. 19
Simple Example: Function Optimisation
• Here are a simple example about how Bees
algorithm works
• The example explains the use of bees algorithm to
get the best value representing a mathematical
function (functional optimal)
21. 21
• 1- The first step is to initiate the population with
any 10 scout bees with random search and evaluate
the fitness. (n=10)
Simple Example
22. 22
Graph 1. Initialise a Population of (n=10) Scout Bees
with random Search and evaluate the fitness.
x
y
*
*
*
*
*
*
*
*
*
*
Simple Example
23. 23
• 2- Population evaluation fitness:
• an array of 10 values in constructed and ordered in
ascending way from the highest value of y to the
lowest value of y depending on the previous
mathematical function
Simple Example
24. 24
• 3- The best m site is chosen randomly ( the best
evaluation to m scout bee) from n
• m=5, e=2, m-e=3
Simple Example
25. 25
Graph 2. Select best (m=5) Sites for Neighbourhood Search:
(e=2) elite bees “▪” and (m-e=3) other selected bees“▫”
x
y
▪
▫
▪
▫
▫
*
*
**
*
me
Simple Example
26. 26
• 4- Select a neighborhood search site upon ngh size:
• Assign random neighborhood ngh as follow
Simple Example
28. 28
• 5- recruits more 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)
Simple Example
29. 29
x
y
▪
▫
▪
▫
▫
*
* *
*
Graph 4. Recruit Bees for Selected Sites
(more Bees for the e=2 Elite Sites)
*
*
*
*
*
*
*
*
*
*
* *
* *
* *
Simple Example
30. 30
• 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:
Simple Example
32. 32
• 7- initializes a new population:
• Taking the old values (5) and assigning random
values (5) to the remaining values n-m
Simple Example
33. 33
x
y
*
Graph 6. Assign the (n–m) Remaining Bees to Random Search
*
*
*
o
*
o
o
o
o
m
e
Simple Example
34. 34
• 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
Simple Example
36. 36
• 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
Simple Example
37. 37
BA pros and cons
The advantages of the BA
Very efficient in finding optimal solutions
The disadvantages of the BA
It is using a number of tunable parameters
38. 38
Ant Colony Optimization
• Ant Colony Optimization is an
efficient method to finding
optimal solutions to a graph
• Using three algorithms based on
choosing a city, updating
pheromone trails and pheromone
trail decay, we can determine an
optimal solution to a graph
• Ant Colony Optimization has
been used to figure out solutions
to real world problems, such as
truck routing
42. 42
How to choose next city?
A
E
D
C
B
1
[A]
1
[A]
1
[A]
1
[A]
1
[A,D]
otherwise0
allowedjif k
∈
∑=
∈ kallowedk
ikik
ijij
k
ij
][)]t([
][)]t([
)t(p
βα
βα
ητ
ητ
...
In this talk, we are going to apply two neural network controller design techniques to fuzzy controllers, and construct the so-called on-line adaptive neuro-fuzzy controllers for nonlinear control systems. We are going to use MATLAB, SIMULINK and Handle Graphics to demonstrate the concept. So you can also get a preview of some of the features of the Fuzzy Logic Toolbox, or FLT, version 2.
Specifically, this is the outline of the talk. Wel start from the basics, introduce the concepts of fuzzy sets and membership functions. By using fuzzy sets, we can formulate fuzzy if-then rules, which are commonly used in our daily expressions. We can use a collection of fuzzy rules to describe a system behavior; this forms the fuzzy inference system, or fuzzy controller if used in control systems. In particular, we can can apply neural networks?learning method in a fuzzy inference system. A fuzzy inference system with learning capability is called ANFIS, stands for adaptive neuro-fuzzy inference system. Actually, ANFIS is already available in the current version of FLT, but it has certain restrictions. We are going to remove some of these restrictions in the next version of FLT. Most of all, we are going to have an on-line ANFIS block for SIMULINK; this block has on-line learning capability and it ideal for on-line adaptive neuro-fuzzy control applications. We will use this block in our demos; one is inverse learning and the other is feedback linearization.