Sei sulla pagina 1di 92

Biologically Inspired Computation

Evolutionary computation (e.g., genetic algorithms) Immune-system-inspired computer/network security Ant-colony optimization Swarm intelligence Neural networks Molecular (DNA) computation

Research Methodology

Genetic Algorithms: A Tutorial

Genetic Algorithms: A Tutorial


Genetic Algorithms are good at taking large, potentially huge search spaces and navigating them, looking for optimal combinations of things, solutions you might not otherwise find in a lifetime.
- David E. Goldberg Computer Design, May 1995
Charles Darwin 18091882

Research Methodology

Genetic Algorithms: A Tutorial

The Genetic Algorithm


Directed search algorithms based on the mechanics of biological evolution Developed by John Holland, University of Michigan (1970s)

To understand the adaptive processes of natural systems To design artificial systems software that retains the robustness of natural systems

Provide efficient, effective techniques for optimization and machine learning applications Widely-used today in business, scientific and engineering processes.

Research Methodology

Genetic Algorithms: A Tutorial

Evolutionary Computation A collection of computational methods inspired by biological evolution:


A population of candidate solutions evolves over time, with the fittest at each generation contributing the most offspring to the next generation Offspring are produced via crossover between parents, along with random mutations and other genetic operations.

Research Methodology

Genetic Algorithms: A Tutorial

Classes of Search Techniques

Research Methodology

Genetic Algorithms: A Tutorial

Components of a GA
Basic genetic population (gene,chromosome) Initialization procedure (creation) Selection of parents (reproduction) Evaluation function (environment) Genetic operators (mutation, recombination) Parameter settings (practice and art)
Research Methodology 6 Genetic Algorithms: A Tutorial

Simple Genetic Algorithm


{

initialize node population; evaluate node population; while (TerminationCriteriaNotSatisfied)


{

select parent nodes for reproduction; perform recombination and mutation; evaluate population;
} }
Research Methodology 7 Genetic Algorithms: A Tutorial

The GA Cycle of Reproduction


reproduction
parents
1 2 4

children
3

modification
modified children

population
deleted members
6

evaluated children

evaluation

discard
Research Methodology 8 Genetic Algorithms: A Tutorial

Population
population Chromosomes could be:

Bit strings Real numbers Any element Lists of rules Program elements ... any data structure ...

(0101 ... 1100) (43.2 -33.1 ... 0.0 89.2) (E11 E3 E7 ... E1 E15) (R1 R2 R3 ... R22 R23) (genetic programming)

Research Methodology

Genetic Algorithms: A Tutorial

Reproduction
reproduction
parents children

population

Parents are selected at random with selection chances biased in relation to evaluations.
Research Methodology 10 Genetic Algorithms: A Tutorial

Chromosome Modification
children

modification
modified children

Modifications are stochastically triggered Operator types are: Mutation (alter, change) Crossover (recombination)
Research Methodology 11 Genetic Algorithms: A Tutorial

Mutation: Local Modification


Before: After: Before: After: (1 0 1 1 0 1 1 0) (0 1 1 0 0 1 1 0) (1.38 -69.4 326.44 0.1) (1.38 -67.5 326.44 0.1)

Causes movement in the search space (local or global) Restores lost information to the population
Research Methodology 12 Genetic Algorithms: A Tutorial

Crossover: Recombination
P1 P2

(0 1 1 0 1 0 0 0) (1 1 0 1 1 0 1 0)

(0 1 0 0 1 0 0 0) (1 1 1 1 1 0 1 0)

C1 C2

Crossover is a critical feature of genetic algorithms: It greatly accelerates search early in evolution of a population It leads to effective combination of schemata (subsolutions on different chromosomes)
Research Methodology 13 Genetic Algorithms: A Tutorial

Evaluation
evaluated children modified children

evaluation

The evaluator decodes a chromosome and assigns it a fitness measure The evaluator is the only link between a classical GA and the problem it is solving
Research Methodology 14 Genetic Algorithms: A Tutorial

Deletion
population
discarded members

discard Generational GA: entire populations replaced with each iteration Steady-state GA: a few members replaced each generation
Research Methodology 15 Genetic Algorithms: A Tutorial

Genetic Programming

David E. Goldberg Director, Illinois Genetic Algorithms Laboratory (IlliGAL) University of Illinois at UrbanaChampaign

John R. Koza Consulting Professor Department of Electrical Engineering School of Engineering, Stanford University

Research Methodology

16

Genetic Algorithms: A Tutorial

A Simple Example

The Gene is by far the most sophisticated program around.


- Bill Gates, Business Week, June 27, 1994

Research Methodology

17

Genetic Algorithms: A Tutorial

A Simple Example
The Traveling Salesman Problem: Find a tour of a given set of cities so that

each city is visited only once the total distance traveled is minimized

Research Methodology

18

Genetic Algorithms: A Tutorial

Representation
Representation is an ordered list of city numbers known as an order-based GA.
1) Chennai 3) Vellore 5) Mumbai 7) Tiruchi 2) Coimbatore 4) Hyderabad 6) Pondicherry 8) Vizag

CityList1 CityList2

(3 5 7 2 1 6 4 8) (2 5 7 6 8 1 3 4)
19 Genetic Algorithms: A Tutorial

Research Methodology

Crossover
Crossover combines inversion and recombination: * * Parent1 (3 5 7 2 1 6 4 8) Parent2 (2 5 7 6 8 1 3 4)
Child

(8 5 7 2 1 6 3 4)

This operator is called the Order1 crossover.


Research Methodology 20 Genetic Algorithms: A Tutorial

Mutation
Mutation involves reordering of the list:
* * (8 5 7 2 1 6 3 4) (8 5 6 2 1 7 3 4)

Before: After:

Research Methodology

21

Genetic Algorithms: A Tutorial

TSP Example: 30 Cities


100 90 80 70 60 50 40 30 20 10 0 0 10 20 30 40 50 x 60 70 80 90 100

Research Methodology

22

Genetic Algorithms: A Tutorial

Solution i (Distance = 941)


TSP30 (Performance = 941)
100 90 80 70 60 50 40 30 20 10 0 0 10 20 30 40 50 x 60 70 80 90 100 y

Research Methodology

23

Genetic Algorithms: A Tutorial

Solution j(Distance = 800)


TSP30 (Performance = 800)
100 90 80 70 60 50 40 30 20 10 0 0 10 20 30 40 50 x 60 70 80 90 100 y

Research Methodology

24

Genetic Algorithms: A Tutorial

Solution k(Distance = 652)


TSP30 (Performance = 652)
100 90 80 70 60 50 40 30 20 10 0 0 10 20 30 40 50 x 60 70 80 90 100 y

Research Methodology

25

Genetic Algorithms: A Tutorial

Best Solution (Distance = 420)


TSP30 Solution (Performance = 420)
100 90 80 70 60 50 40 30 20 10 0 0 10 20 30 40 50 x 60 70 80 90 100 y

Research Methodology

26

Genetic Algorithms: A Tutorial

Overview of Performance
O ve rvie w o f P e rfo rm a n ce
1800 1600 1400 1200 Distance 1000 800 600 400 200 0 11 13 15 17 19 21 23 25 27 29 31 1 3 5 7 9 Ge n e r atio n s (1000) Bes t W ors t

A v erage

Research Methodology

27

Genetic Algorithms: A Tutorial

Considering the GA Technology


Almost eight years ago ... people at Microsoft wrote a program which uses some genetic function for finding short code sequences. Windows 3.0 and XP, NT, and almost all Microsoft applications products have shipped with pieces of code created by that system.
- Nathan Myhrvold, Microsoft Advanced Technology Group, Wired, September 1995 Research Methodology 28 Genetic Algorithms: A Tutorial

Issues for GA Practitioners


Choosing basic implementation issues:

representation population size, mutation rate, ... selection, deletion policies crossover, mutation operators

Termination Criteria Performance, scalability Solution is only as good as the evaluation function (often hardest part)
Research Methodology 29 Genetic Algorithms: A Tutorial

Benefits of Genetic Algorithms


Concept is easy to understand Modular, separate from application Supports multi-objective optimization Good for noisy environments Always gives answer; answer gets better with time Inherently parallel; easily distributed
Research Methodology 30 Genetic Algorithms: A Tutorial

Benefits of Genetic Algorithms (cont.)


Multiple ways to speed up and improve a GA-based application as knowledge about problem domain is gained Easy to exploit previous or alternate solutions Flexible building blocks for hybrid applications Substantial history and range of use
Research Methodology 31 Genetic Algorithms: A Tutorial

When to Use a GA
Alternate solutions are too slow or much complicated Need an exploratory tool to examine new approaches Problem is similar to one that has already been successfully solved. Want to hybridize with an existing solution Benefits of the GA technology meet key problem requirements

Research Methodology

32

Genetic Algorithms: A Tutorial

Some GA Application Types


Domain
Control Design Scheduling Robotics Machine Learning Signal Processing Game Playing Combinatorial Optimization
Research Methodology

Application Types
gas pipeline, pole balancing, missile evasion, pursuit semiconductor layout, aircraft design, keyboard configuration, communication networks manufacturing, facility scheduling, resource allocation trajectory planning designing neural networks, improving classification algorithms, classifier systems filter design poker, checkers, prisoners dilemma set covering, travelling salesman, routing, bin packing, graph colouring and partitioning
33

Genetic Algorithms: A Tutorial

Some Applications of Genetic Algorithms


Optimization and design numerical optimization, circuit design, airplane design, factory scheduling, drug design, network optimization Automatic programming evolving computer programs (e.g., for image processing), evolving cellular automata Machine learning and adaptive control robot navigation, evolution of rules for solving expert problems, evolution of neural networks, adaptive computer security, adaptive user interfaces
Research Methodology 34 Genetic Algorithms: A Tutorial

Some Applications of Genetic Algorithms


Complex data analysis and time-series prediction prediction of chaotic systems, financial-market prediction, protein-structure prediction Scientific models of complex systems economics, immunology, ecology, population genetics, evolution, cancer

Research Methodology

35

Genetic Algorithms: A Tutorial

Evolutionary process
Essentials of Darwinian evolution:

Essentials of evolutionary algorithms:

Organisms reproduce in proportion to their fitness in the environment Offspring inherit all traits from parents Traits are inherited with some variation, via mutation and sexual recombination

Computer organisms (e.g., programs) reproduce in proportion to their fitness of problem environment (e.g., how well they perform a desired task) Offspring (outcome) inherit only strong traits (fitness)from their parent. Traits are inherited, with some variation, via mutation and cross-over methods
Genetic Algorithms: A Tutorial

Research Methodology

36

Research Methodology

37

Genetic Algorithms: A Tutorial

Research Methodology

38

Genetic Algorithms: A Tutorial

Genetic algorithms

Fitness function: number of non-attacking pairs of queens (min = 0, max = 8 7/2 = 28) 24/(24+23+20+11) = 31% 23/(24+23+20+11) = 29% etc

Research Methodology

39

Genetic Algorithms: A Tutorial

DEFINITION OF THE GENETIC ALGORITHM (GA)


The genetic algorithm is a probabilistic search algorithm that (a) iteratively transforms a set (called a population) of mathematical objects (typically fixed-length binary character strings), (b) each with an associated fitness value, into a new population of offspring objects using the Darwinian principle of natural selection, (c) using operations that are patterned after naturally occurring genetic operations, such as crossover and mutation.

Research Methodology

40

Genetic Algorithms: A Tutorial

Research Methodology

41

Genetic Algorithms: A Tutorial

ANTENNA DESIGN

Research Methodology

42

Genetic Algorithms: A Tutorial

ANTENNA DESIGN
The problem (Altshuler and Linden 1998) is to determine the x-y-z coordinates of the 3-dimensional position of the ends (X1, Y1, Z1, X2, Y2, Z2, , X7, Y7, Z7) of 7 straight wires so that the resulting 7-wire antenna satisfies certain performance requirements The first wire starts at feed point (0, 0, 0) in the middle of the ground plane The antenna must fit inside the 0.5 cube
Research Methodology 43 Genetic Algorithms: A Tutorial

ANTENNA GENOME
X1 Y1 Z1 X2 Y2 Z2

+0010 -1110 +0001 +0011 -1011 +0011 105-bit chromosome (genome) Each x-y-z coordinate is represented by 5 bits (4-bit granularity for data plus a sign bit) Total chromosome is 3 7 5 = 105 bits
Research Methodology 44 Genetic Algorithms: A Tutorial

ANTENNA FITNESS
Antenna is for ground-to-satellite communications for cars and handsets We desire near-uniform gain pattern 10 above the horizon Fitness is measured based on the antenna's radiation pattern. The radiation pattern is simulated by National Electro-magnetics Code (NEC) Fitness is sum of the squares of the difference between the average gain and the antenna's gain Radiation can be considered for angles between 90 and +90 and all azimuth angles from 0 to 180 The smaller the value of fitness, the better
Research Methodology 45

Genetic Algorithms: A Tutorial

GRAPH OF ANTENNA FITNESS

Research Methodology

46

Genetic Algorithms: A Tutorial

FIVE MAJOR PREPARATORY STEPS FOR GP

Determining the set of terminal inputs Determining the set of functions Determining the fitness measure Determining the parameters for the run Determining the method for designating a result and the criterion for terminating a run
Research Methodology 47 Genetic Algorithms: A Tutorial

PREPARATORY STEPS
Objective: Find a computer program with one input (independent variable X) whose output equals the given data T = {X, Random-Constants} F = {+, -, *, %} 1 2 3 Terminal set: Function set: Fitness:

The sum of the absolute value of the differences between the candidate programs output and the given data (computed over numerous values of the independent variable x from 1.0 to +1.0) Population size M = 4 An individual emerges whose sum of absolute errors is less than 0.1

4 5

Parameters: Termination:

Research Methodology

48

Genetic Algorithms: A Tutorial

Research Methodology

49

Genetic Algorithms: A Tutorial

Conclusions

Question: Answer:

Why GAs are so smart, rich? Genetic algorithms are rich - rich in application across a large and growing number of disciplines.
- David E. Goldberg, Genetic Algorithms in Search, Optimization and Machine Learning

Research Methodology

50

Genetic Algorithms: A Tutorial

What is this all about?


operating as a collective, do remarkable things. A single neuron in the human brain can respond only to what the neurons connected to it are doing, but all of them together can be Albert Einstein." By Deborah M. Gordon (Stanford University)

"An individual ant is not very bright, but ants in a colony,

We are interested in systems where simple units work together to solve complicated tasks.
Research Methodology 51 Genetic Algorithms: A Tutorial

Swarm Intelligence
Based on the study of emergent collective intelligence of groups of simple agents
Bird Flock

Ant Colony

Fish School

Animal Herd

Research Methodology

52

Genetic Algorithms: A Tutorial

Natural Ants
In a colony each ant has its prescribed task, but the ants can switch tasks if the collective needs it.

Outside the nest, ants can have 4 different tasks:


Foraging: searching for and retrieving food Patrolling: controlling, monitoring flow Midden work: Sorting the colony refuse pile Nest maintenance work: construction and clearing of chambers

An ants decision whether to perform a task depends on:


The Physical State of the environment:
If part of the nest is damaged, more ants do nest maintenance work to repair it

Social Interactions with other ants

Research Methodology

53

Genetic Algorithms: A Tutorial

ACO - Introduction
The Ant Colony Optimization (ACO) meta-heuristic is a suite of algorithms inspired by the foraging behaviour of ants. Abstraction of the adaptive and cooperation features observed in real ant colonies. Efficient optimization of the food searching process with global information of global environment variables Heuristic / Intelligence in search Consistent Updates on learning
Research Methodology 54

Genetic Algorithms: A Tutorial

Introduction, cont
Developed by Marco Dorigo (Milan, Italy), and others in early 1990s Some common applications:

Quadratic assignment problems Scheduling problems Dynamic routing problems in networks algorithm is based on a series of random decisions (by artificial ants) probability of decisions changes on each iteration
55 Genetic Algorithms: A Tutorial

Theoretical analysis difficult


Research Methodology

ACO Concept
Ants (blind) navigate from nest to food source Shortest path is discovered via pheromone trails

each ant moves at random pheromone is deposited on each path ants detect lead ants path and inclines to follow high intensity of pheromone on path increases probability of same path being followed

Research Methodology

56

Genetic Algorithms: A Tutorial

ACO Algorithm
Virtual trail accumulated on path segments Starting node selected at random Path selected at random

based on amount of trail present on possible paths from starting node higher probability for paths with more trail

Ant reaches next node, selects next path Continues until reaches starting node Finished tour is a solution
Research Methodology 57

Genetic Algorithms: A Tutorial

Ant Algorithms

Research Methodology

58

Genetic Algorithms: A Tutorial

How Do Social Insects Achieve Self-organization?


Communication is necessary Two types of communication:

Direct: antennation, trophallaxis (food or liquid exchange), mandibular contact, visual contact, chemical contact, etc. Indirect: two individuals interact indirectly when one of them modifies the environment and the other responds to the new environment at a later time. This is called stigmergy.

Research Methodology

59

Genetic Algorithms: A Tutorial

Steps for Solving a Problem by ACO


1. 2. 3.

4.

5.

6.

Represent the problem in the form of sets of components and transitions, or by a set of weighted graphs, on which ants can build solutions Define the meaning of the pheromone trails Define the heuristic preference for the ant while constructing a solution If possible implement a efficient local search algorithm for the problem to be solved. Choose a specific ACO algorithm and apply to problem being solved Tune the parameter of the ACO algorithm.

Research Methodology

60

Genetic Algorithms: A Tutorial

The Algorithm
Ant Colony Algorithms are typically use to solve minimum cost problems. We may usually have N nodes and A undirected arcs There are two working modes for the ants: either forwards or backwards. Pheromones are only deposited in backward mode.
Research Methodology 61 Genetic Algorithms: A Tutorial

Ant Algorithm
The ants memory allows them to retrace the path it has followed while searching for the destination node Before moving backward on their memorized path, they eliminate any loops from it. While moving backwards, the ants leave pheromones on the arcs they traversed.
Research Methodology 62 Genetic Algorithms: A Tutorial

The Algorithm
The ants evaluate the cost of the paths they have traversed. The shorter paths will receive a greater deposit of pheromones. An evaporation rule will be tied with the pheromones, which will reduce the chance for poor quality solutions.

Research Methodology

63

Genetic Algorithms: A Tutorial

The Algorithm
At the beginning of the search process, a constant amount of pheromone is assigned to all arcs. When located at a node i an ant k uses the pheromone trail to compute the probability of choosing j as the next node:
p ikj ij = l N ik 0

il

if if

j N j N
k i

k i

where N ik is the neighborhood of ant k when in node i.


Research Methodology 64 Genetic Algorithms: A Tutorial

The Algorithm
When the arc (i,j) is traversed , the pheromone value changes as follows:

ij ij +

By using this rule, the probability increases that forthcoming ants will use this arc.
Research Methodology 65 Genetic Algorithms: A Tutorial

The Algorithm
After each ant k has moved to the next node, the pheromones evaporate by the following equation to all the arcs:

ij (1 p ) ij , (i, j ) A
wherep (0,1] is a parameter. An iteration is a completer cycle involving ants movement, pheromone evaporation, and pheromone deposit.
Research Methodology 66 Genetic Algorithms: A Tutorial

Steps for Solving a Problem by ACO


1.

2. 3.

4.

5.

6.

Represent the problem in the form of sets of components and transitions, or by a set of weighted graphs, on which ants can build solutions Define the meaning of the pheromone trails Define the heuristic preference for the ant while constructing a solution If possible implement a efficient local search algorithm for the problem to be solved. Choose a specific ACO algorithm and apply to problem being solved Tune the parameter of the ACO algorithm.

Research Methodology

67

Genetic Algorithms: A Tutorial

Natural ants: Experiments


( 1 ) (3 ) (2 )
(1) Ants finished all using the same path (each one of the 2 paths, 50% of times) (2) Ants use the short path (3) Ants get to find the shortest path

Research Methodology

68

( 1 )

(2 )
Genetic Algorithms: A Tutorial

Natural ants: How do they do it?


The pheromone concentration on trail B will increase at a higher rate than on A, and soon the ants on route A will choose to follow route B Since most ants will no longer travel on route A, and since the pheromone is volatile, trail A will start evaporating Only the shortest route will remain!
69 Genetic Algorithms: A Tutorial

Since the route B is shorter, the ants on this path will complete the travel more times and thereby lay more pheromone over it.
Research Methodology

food foraging in ant colonies

A computer simulation of an ant colony performing an efficient search: Blue spot in the middle is an ant nest; other 3 spots represent food sources. Ants (red dots) use chemical signals (green) to find the shortest path to the food and alter their signals as the food is depleted.
Research Methodology 70 Genetic Algorithms: A Tutorial

Modeling Ants Colony


It is known that the ability of ants in finding the shortest route between the nest and a food source can be used to solve graph problems.
Graph Nodes Natural Ants Individual Ants Places where ants can stop Model Agents Cities Routes

Environment:
Edges

Actions that an agent performs:


In a city, it chooses a route based on the intensity of the pheromone over the available paths When it finds the food source, it starts the return travel on its own pheromone trail

All actions require only local information and short memory


Research Methodology 71 Genetic Algorithms: A Tutorial

Applications
Efficiently Solves NP hard Problems Routing

1 5

TSP (Traveling Salesman Problem) 2 Vehicle Routing Sequential Ordering

Assignment
QAP (Quadratic Assignment Problem) Graph Coloring Generalized Assignment Frequency Assignment University Course Time Scheduling
72

Research Methodology

Genetic Algorithms: A Tutorial

Applications
Scheduling

Job Shop Open Shop Flow Shop Total tardiness (weighted/non-weighted) Project Scheduling Group Shop Multi-Knapsack Max Independent Set Redundancy Allocation Set Covering Weight Constrained Graph Tree partition Arc-weighted L cardinality tree Maximum Clique

Subset

Research Methodology

73

Genetic Algorithms: A Tutorial

Applications
Other

Shortest Common Sequence Constraint Satisfaction 2D-HP protein folding Bin Packing Classification Rules Bayesian networks Fuzzy systems Connection oriented network routing Connection network routing Optical network routing

Machine Learning

Network Routing

Research Methodology

74

Genetic Algorithms: A Tutorial

Advantages and Disadvantages


For TSPs (Traveling Salesman Problem), relatively efficient for a small number of nodes, TSPs can be solved by exhaustive search for a large number of nodes, TSPs are very computationally difficult to solve (NP-hard) exponential time to convergence Performs better against other global optimization techniques for TSP (neural net, genetic algorithms, simulated annealing) Compared to GAs (Genetic Algorithms): retains memory of entire colony instead of previous generation only less affected by poor initial solutions (due to combination of random path selection and colony memory)
Research Methodology 75

Genetic Algorithms: A Tutorial

Advantages and Disadvantages, cont.


Can be used in dynamic applications (adapts to changes such as new distances, etc.) Has been applied to a wide variety of applications As with GAs, good choice for constrained discrete problems (not a gradient-based algorithm)
Research Methodology 76 Genetic Algorithms: A Tutorial

Advantages and Disadvantages, cont.


Theoretical analysis is difficult: Due to sequences of random decisions (not independent) Probability distribution changes by iteration Research is experimental rather than theoretical Convergence is guaranteed, but time to convergence uncertain
Research Methodology 77

Genetic Algorithms: A Tutorial

Sources
Dorigo, Marco and Sttzle, Thomas. (2004) Ant Colony Optimization, Cambridge, MA: The MIT Press. Dorigo, Marco, Gambardella, Luca M., Middendorf, Martin. (2002) Guest Editorial, IEEE Transactions on Evolutionary Computation, 6(4): 317-320. Thompson, Jonathan, Ant Colony Optimization. http://www.orsoc.org.uk/region/regional/swords/swords.ppt, accessed April 24, 2005. Camp, Charles V., Bichon, Barron, J. and Stovall, Scott P. (2005) Design of Steel Frames Using Ant Colony Optimization, Journal of Structural Engineeering, 131 (3):369379. Fjalldal, Johann Bragi, An Introduction to Ant Colony Algorithms. http://www.informatics.sussex.ac.uk/research/nlp/gazdar/teach/a tc/1999/web/johannf/ants.html, accessed April 24, 2005.
Research Methodology 78

Genetic Algorithms: A Tutorial

Applications
The ACO can be used to solve graph problems such as the Traveling Salesman Problem (TSP).

Of High computational complexity For which the exact algorithms are inefficient For which we dont need the best solution but a good one.

Research Methodology

79

Genetic Algorithms: A Tutorial

Travelingcities and the costs of Salesman Problem Given a number of


traveling from any city to any other city, what is the cheapest round-trip route that visits each city exactly once and then returns to the starting city?

Trying all possible solutions means n! permutations. Using the techniques of dynamic programming, it can be solved in time O(n22n)

If a salesman starts at point A, and if the distances between every pair of points are known, what is the shortest route which visits all points and returns to point A?

The problem is of considerable practical importance. Example: printed circuit manufacturing: scheduling of a route of the drill machine to drill holes in a PCB.
Research Methodology 80 Genetic Algorithms: A Tutorial

I shoud have an applet, but

TSP solved using ACO

Research Methodology

81

Genetic Algorithms: A Tutorial

ACO algorithms for routing


is the acquisition of routing information through sampling of paths using small control packets, which are called ants. The ants are generated by the nodes in a network in order to test a path to a particular destination. [1] As the ant travels from a source node s to a destination node d it collects information about the quality of the path. [2]It uses this information acquired when traveling from the d to s to update routing information at intermediate nodes. [3] Each node records routing information in a routing table. [4]The table entries contain for each destination a vector value, for each known neighbour. These values are called pheromone variables, [they correspond to the chemical substance layered by ants in real life.] These tables are used to by ants to define their paths to various destinations and also by nodes when routing data packet. [5]The ants are usually attracted towards the paths with higher pheromone concentration. [6] Shorter paths will be traveled over more frequently and thus be marked with a higher pheromone concentration. [7] By this process of local interaction ants are able to converge at the shortest path from their nest to a food source. Research Methodology
82 Genetic Algorithms: A Tutorial

Vehicular Ad-Hoc Sensor Networks


In-Vehicular Component Sensor(s) WiFi / WiMax Nodes

GATEWAY MAIN SERVER

CONTROL CENTER

Vehicular Traffic Domain Research Methodology 83 Genetic Algorithms: A Tutorial

Modeling bird flocking


The synchrony of flocking behavior is thought to be a function of birds efforts to maintain an optimal distance between themselves and their neighbors.
Individual members can profit from the discoveries and previous experience of other members during the search for food. This advantage can become decisive , overweighting the disadvantages of competition for food

Birds and fish adjust their physical movement to avoid predators, seek for food and mates. Humans tend to adjust our beliefs and attitudes to conform with those of our social peers. Humans change in abstract multidimensional space, collisionfree.
84 Genetic Algorithms: A Tutorial

Research Methodology

Modeling bird flocking


Definitions:

Flock is a group of objects that exhibit the general class of polarized (aligned), non-colliding, aggregate motion. Boid is a simulated bird-like object, i.e., it exhibits this type of behavior. It can be a fish, bee, dinosaur, etc. Cohesion: Each boid fly towards the centroid of its local flock mates (that is, boid in its local neighborhood) Separation : Each boid keep a certain distance away from local flock mates to avoid collisions Alignment: Each boid align its velocity vector and keep velocity magnitude similar with that of the local flock

Rules for flocking:


Note: There might be many other rules for making the flock more realistic.
Research Methodology 85 Genetic Algorithms: A Tutorial

Particle Swarm Kennedy in the middle 90 Optimisation Proposed by Eberhart and


Global Optimization Algorithm dealing with problems in which a best solution can be represented as a point or surface in an n-dimensional space. Inspired in the social behavior of bird flocks and fish schools The main application is on Numeric Optimization Advantages:

It requires only primitive mathematical operators Is computationally inexpensive, in terms of both


Memory requirements Speed

The large number of members that make up the particle swarm make the technique impressively resistant to the problem of local minima.

Research Methodology

86

Genetic Algorithms: A Tutorial

Particle Swarm Optimisation


Imagine a birds flock in an area where there is a single food source. A bird dont know where the food is, but it knows its distance to the food. The best strategy is to follow the bird that is closer to the food. Particles save and communicate the best solution they have found.
Research Methodology 87 Genetic Algorithms: A Tutorial

Particle Swarm Optimisation


It considers a particle swarm (or cloud) that moves over the solution space, and particles are evaluated according to some fitness criterion. The movement of each particle depends on:

Its best position since the algorithm started (pBest) The best position of the particles around it (lBest) or of the whole group (gBest)

On each iteration, the particle changes its velocity towards pBest and lBest/gBest. So the swarm explores the solution space looking for promising zones.
Research Methodology 88 Genetic Algorithms: A Tutorial

The pseudo code of the procedure is as follows: For each particle Initialize particle END Do

Particle Swarm Optimisation

For each particle Calculate fitness value If the fitness value is better than the best fitness value (pBest) in history set current value as the new pBest End Choose the particle with the best fitness value of all the particles as the gBest For each particle Calculate particle velocity according equation (a) Update particle position according equation (b) End
Research Methodology

While maximum iterations or minimum error criteria is not attained


89 Genetic Algorithms: A Tutorial

Particle Swarm Optimisation


Combination of gBest and the pBest : need a compromise lBest can be:

Social: the particles around are always the same, no matter where they are in space Geographical: the particles around are those whose distance is the shortest

Global PSO vs. Local PSO: the global version converges quickly to a solution but it gets more easily stuck in local minima.

Research Methodology

90

Genetic Algorithms: A Tutorial

Swarm Technology: Applications


Swarm technology is particularly attractive because it is

cheap robust Simple

Some examples of applications:


Controlling unmanned vehicles Possibility of using it to control nanobots within the body to kill cancer tumors Disney's The Lion King was the first movie to make use of swarm technology (the stampede of the wildebeests scene). The Lord of the rings used it too during the battle scenes. Grid Data Replication:

Research Methodology

91

Genetic Algorithms: A Tutorial

Conclusions
We can learn from nature and take advantage of the problems that she has already solved. Many simple individuals interacting with each other can make a global behavior emerge. Techniques based on natural collective behavior (Swarm Intelligence) are interesting as they are cheap, robust, and simple. They have lots of different applications. Swarm intelligence is an active field in Artificial Intelligence, many studies are going Research Methodology 92 Genetic Algorithms: A Tutorial on.

Potrebbero piacerti anche