SlideShare a Scribd company logo
Ant Colony Optimization
Swarm Intelligence
“Swarm intelligence (SI) is artificial
intelligence based on the collective
behaviour of decentralized, self-
organized systems”
Swarm Intelligence General
Characteristics
Composed of many individuals
Individuals are homogeneous
Local interaction based on simple rules
Self-organization
Constituting a natural model particularly
suited to distributed problem solving
Swarm Intelligence General
Characteristics
 Collective system capable of accomplishing
difficult tasks in dynamic and varied
environments without any external guidance or
control and with no central coordination
 Achieving a collective performance which could
not normally be achieved by an individual acting
alone
 Constituting a natural model particularly suited
to distributed problem solving
http://www.scs.carleton.ca/~arpwhite/courses/95590Y/notes/SI%20Lecture%203.pdf
http://www.scs.carleton.ca/~arpwhite/courses/95590Y/notes/SI%20Lecture%203.pdf
http://www.scs.carleton.ca/~arpwhite/courses/95590Y/notes/SI%20Lecture%203.pdf
Ant Colony System
 First introduced by Marco Dorigo in 1992 as a
method for solving hard combinatorial
optimization problems (COPs).
 Progenitor to “Ant Colony System,” later
discussed
 Result of research on computational intelligence
approaches to combinatorial optimization
 Originally applied to Traveling Salesman
Problem
 Applied later to various hard optimization
problems
Inherent Features
Inherent parallelism
Stochastic nature
Adaptivity
Use of positive feedback
Autocatalytic in nature
Real Ant actual scenario
Almost blind.
Incapable of achieving complex tasks alone.
Rely on the phenomena of swarm intelligence for
survival.
Capable of establishing shortest-route paths from
their colony to feeding sources and back.
Use stigmergic communication via pheromone trails.
Follow existing pheromone trails with high
probability.
What emerges is a form of autocatalytic behavior:
the more ants follow a trail, the more attractive that
trail becomes for being followed.
Real Ant actual scenario
The process is thus characterized by a positive
feedback loop, where the probability of a
discrete path choice increases with the number
of times the same path was chosen before.
Natural behavior of an ant :
Foraging modes
Wander mode
Search mode
Return mode
Attracted mode
Trace mode
Carry mode
Behavior of Ant colony
regulation of nest temperature within 1 degree celsius
range;
forming bridges;
raiding specific areas for food;
building and protecting nest;
sorting brood and food items;
cooperating in carrying large items;
emigration of a colony;
finding shortest route from nest to food
source;
preferentially exploiting the richest food source
available.
Autocatalyzation
Autocatalysis is a positive feedback
loop that drives the ants to explore
promising aspects of the search space
over less promising areas.
A key concept: Stigmergy
Stigmergy is: indirect communication via
interaction with the environment.
 A problem gets solved bit by bit ..
 Individuals communicate with each other in the
above way, affecting what each other does on the
task.
 Individuals leave markers or messages – these
don’t solve the problem in themselves, but they
affect other individuals in a way that helps them
solve the problem.
Stigmergy in Ants
Ants are behaviourally unsophisticated, but
collectively they can perform complex tasks.
Ants have highly developed sophisticated sign-
based stigmergy.
– They communicate using pheromones;
– They lay trails of pheromone that can be
followed by other ants.
Pheromone Trails
 Individual ants lay pheromone trails while travelling
from the nest, to the nest or possibly in both
directions.
 The pheromone trail gradually evaporates over time.
 But pheromone trail strength accumulate with
multiple ants using path.
Food source
Nest
Naturally Observed Ant Behavior
All is well in the world of the ant.
Naturally Observed Ant Behavior
An obstacle has blocked our path
Naturally Observed Ant Behavior
Naturally Observed Ant Behavior
ACO Algorithms: Basic Ideas
 Ants are agents that: Move along between nodes in a
graph.
 They choose where to go based on pheromone
strength (and maybe other things)
 An ant’s path represents a specific candidate solution.
 When an ant has finished a solution, pheromone is laid
on its path, according to quality of solution.
 This pheromone trail affects behaviour of other ants
by `stigmergy’
Artificial Ants
• artifcial ants may simulate pheromone
laying by modifying appropriate pheromone
variables associated with problem states
they visit while building solutions to the
optimization problem. Also, according to the
stigmergic communication model, the
artifcial ants would have only local access
tothese pheromone variables.
Artificial Ants
Main characteristics of stigmergy can be extended to
artificial agents by
• Associating state variables with different problem
states; and
• Giving the agents only local access to these
variables.
• Coupling between the autocatalytic mechanism
and the implicit evaluation of solutions
• Just like real ants, artificial ants create their
solutions sequentially by moving from one
problem state to another
Differences between real and artificial
ants:
 Artificial ants live in a discrete world| they move
sequentially through a finite set of problem states.
 The pheromone update (i.e., pheromone
depositing and evaporation) is not accomplished
in exactly the same way by artificial ants as by real
ones. Sometimes the pheromone update is done
only by some of the artificial ants, and often only
after a solution has been constructed.
 Some implementations of artificial ants use
additional mechanisms that do not exist in the
case of real ants. Examples include look-ahead,
local search, backtracking, etc.
Nature/Technology
SHORTEST PATH
Ants deposit pheromones on ground that form
a trail. The trail attracts other ants.
Pheromones evaporate faster on longer paths.
Shorter paths serve as the way to food for
most of the other ants.
Minimum Cost Path
General ACO
• A stochastic construction procedure
• Probabilistically build a solution
• Iteratively adding solution components to partial
solutions
- Heuristic information
- Trace/Pheromone trail
• Reinforcement Learning reminiscence
• Modify the problem representation at each
iteration
• Ants work concurrently and independently
• Collective interaction via indirect communication
leads to good solutions
Some inherent advantages
• Positive Feedback accounts for rapid
discovery of good solutions
• Distributed computation avoids premature
convergence
• The greedy heuristic helps find acceptable
solution in the early solution in the early
stages of the search process.
• The collective interaction of a population of
agents.
Disadvantages in Ant Systems
Slower convergence than other Heuristics
Performed poorly for TSP problems larger
than 75 cities.
No centralized processor to guide the AS
towards good solutions
Ant System (AS) Algorithm
1. Initialization
2. Randomly place ants
3. Build tours
4. Deposit trail
5. Update trail
6. Loop or exit
Ant with Binary Bridge
• Let the amount of pheromone on a branch be proportional
to the number of ants that used the branch in the past and
let ms(t) and ml(t) be the numbers of ants that have used
the short and the long branches after a total of t ants have
crossed the bridge, with ms(t) þ ml(t) =t.The probability
ps(t) with which the (t+1) th ant chooses the short branch
can then be written as
Ant with Binary Bridge
The number of ants choosing the short branch is
given by
The number of ants choosing the long branch by
where q is a uniform random number drawn from the interval [0; 1].
Mote Carlo Simulation method will give good solution
ACO Parameters
ACO Parameters
Application
Traveling Salesman Problem
Quadratic Assignment Problem
Network Model Problem
Vehicle routing
Graph coloring
ACO system -PSEUDOCODE
 Often applied to TSP (Travelling Salesman Problem):
shortest path between n nodes
 Algorithm in Pseudocode:
– Initialize Trail
– Do While (Stopping Criteria Not Satisfied) – Cycle Loop
• Do Until (Each Ant Completes a Tour) – Tour Loop
• Local Trail Update
• End Do
• Analyze Tours
• Global Trail Update
– End Do
ACO 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
• 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.
ACO 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:
where is the neighborhood of ant k when in node i.
ACO Algorithm
k
ij ij
  
  
• When the arc (i,j) is traversed , the pheromone value changes
as follows:
• By using this rule, the probability increases that forthcoming
ants will use this arc.
• After each ant k has moved to the next node, the pheromones
evaporate by the following equation to all the arcs:
(1 ) , ( , )
ij ij
p i j A
 
   
Steps for Solving a Problem by ACO
1. 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
2. Define the meaning of the pheromone trails
3. Define the heuristic preference for the ant while
constructing a solution
4. If possible implement a efficient local search
algorithm for the problem to be solved.
5. Choose a specific ACO algorithm and apply to
problem being solved
6. Tune the parameter of the ACO algorithm.
Combinatorial optimization
• Find values of discrete variables
• Optimizing a given objective function
Π = (S, f, Ω) – problem instance
S – set of candidate solutions
f – objective function
Ω – set of constraints
set of feasible solutions (with respect to Ω)
Find globally optimal feasible solution s*
Combinatorial optimization
problem mapping
• Combinatorial problem (S, f, Ω(t))
• Ω(t) – time-dependent constraints
 Example – dynamic problems
• Goal – find globally optimal feasible solution
s*
• Minimization problem
• Mapped on another problem
Combinatorial optimization
problem mapping
• C = {c1, c2, …, cNc} – finite set of
components
• States of the problem:
X = {x = <ci, cj, …, ch, …>, |x| < n < +∞}
• Set of candidate solutions:
Combinatorial optimization
problem mapping
Combinatorial optimization
problem mapping
• X – states
• S – candidate solutions
• – feasible states
• S* – optimal solutions
S* X
~
S
X
Combinatorial optimization
problem mapping
• Cost g(s, t) for each
• In most cases – g(s, t) ≡ f(s, t)
• GC = (C, L) – completely connected graph
• C – set of components
• L – edges fully connecting the components
(connections)
• GC – construction graph
• Artificial ants build solutions by performing
randomized walks on GC(C, L)
ACO for Traveling Salesman Problem
The first ACO algorithm was called the Ant system and
it was aimed to solve the travelling salesman problem,
in which the goal is to find the shortest round-trip to
link a series of cities. At each stage, the ant chooses to
move from one city to another according to some
rules:
 It must visit each city exactly once;
 A distant city has less chance of being chosen (the visibility);
 The more intense the pheromone trail laid out on an edge between
two cities, the greater the probability that that edge will be chosen;
 Having completed its journey, the ant deposits more pheromones
on all edges it traversed, if the journey is short;
 After each iteration, trails of pheromones evaporate.
ACO for Traveling Salesman Problem
TSP PROBLEM : Given N cities, and a distance function d between cities,
find a tour that:
1. Goes through every city once and only once
2. Minimizes the total distance.
HOW TO IMPLEMENT IN A PROGRAM
• Ants: Simple computer agents
• Move ant: Pick next component in the const. solution
• Pheromone:
• Memory: MK or TabuK
• Next move: Use probability to move ant
• Graph (N,E): where N = cities/nodes, E = edges
• = the tour cost from city i to city j (edge weight)
• Ant move from one city i to the next j with some transition probability.
A simple TSP example
A
D
C
B
1
[]
4
[]
3
[]
2
[]
dAB =8;dBC = 4;dCD =15;dDA =6
53
Iteration 1
A
D
C
B
1
[A]
3
[C]
2
[B]
4
[D]
54
How to build next sub-solution?
1
[A]
A
D
C
B
55
Iteration 2
A
D
C
B
2
[B,C]
3
[C,D]
1
[A,B]
4
[D,A]
56
Iteration 3
A
D
C
B
2
[B,C,D]
3
[B,C,A]
4
[D,A,B]
1
[A,B,C]
57
Iteration 4
A
D
C
B
1
[A,B,C,D]
2
[B,C,D,A]
3
[C,D,A,B]
4
[D,A,B,C]
58
Path and Pheromone Evaluation
1
[A,B,C,D
L1 =27
L2 =25
L3 =29
L4 =18
2
[B,C,D,A]
3
[C,D,A,B]
4
[D,A,B,C]
59
Best tour
MAX–MIN Ant System
• MAX–MIN Ant System (MMAS) (Stu¨ tzle & Hoos,
1997, 2000; Stu¨ tzle, 1999) introduces four main
modifications with respect to AS. First, it strongly
exploits the best tours found: only either the
iteration-best ant, that is, the ant that produced
the best tour in the current iteration, or the best-
so-far ant is allowed to deposit pheromone.
Unfortunately, such a strategy may lead to a
stagnation situation in which all the ants follow
the same tour, because of the excessive growth of
pheromone trails on arcs of a good, although
suboptimal, tour.
MAX–MIN Ant System
• To counteract this effect, a second modification
introduced by MMAS is that it limits the possible
range of pheromone trail values to the interval
[Ʈmin; Ʈmax]. Third, the pheromone trails are
initialized to the upper pheromone trail limit,
which, together with a small pheromone
evaporation rate, increases the exploration of
tours at the start of the search. Finally, in MMAS,
pheromone trails are reinitialized each time the
system approaches stagnation or when no
improved tour has been generated for a certain
number of consecutive iterations.
Greedy Search Algorithm
• A greedy algorithm is an algorithm that
follows the problem solving heuristic of
making the locally optimal choice at each
stage[1] with the hope of finding a global
optimum. In many problems, a greedy
strategy does not in general produce an
optimal solution, but nonetheless a greedy
heuristic may yield locally optimal solutions
that approximate a global optimal solution
in a reasonable time.
Greedy Search Algorithm
• For example, a greedy strategy for the
traveling salesman problem (which is of a
high computational complexity) is the
following heuristic: "At each stage visit an
unvisited city nearest to the current city".
This heuristic need not find a best solution,
but terminates in a reasonable number of
steps; finding an optimal solution typically
requires unreasonably many steps. In
mathematical optimization, greedy
algorithms solve combinatorial problems
having the properties of matroids.
Constructive Heuristics
• Start from an “empty solution”
• Repeatedly, extend the current solution until a
complete solution is constructed
• Use heuristics to try to extend in such a way that
the final solution is a good one
It is essential to know the difference between:
• Constructive methods
Extend empty solution until get complete
solution
• Local search
Take complete solution and try to improve it
via local moves

More Related Content

What's hot

Agents1
Agents1Agents1
Agents1
Amar Jukuntla
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
Tajim Md. Niamat Ullah Akhund
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning
DongHyun Kwak
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
Muhammad Amjad Rana
 
LSTM Basics
LSTM BasicsLSTM Basics
LSTM Basics
Akshay Sehgal
 
Forms of learning in ai
Forms of learning in aiForms of learning in ai
Forms of learning in ai
Robert Antony
 
2-Agents- Artificial Intelligence
2-Agents- Artificial Intelligence2-Agents- Artificial Intelligence
2-Agents- Artificial Intelligence
Mhd Sb
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searchingLuigi Ceccaroni
 
Swarm intelligence
Swarm intelligenceSwarm intelligence
Swarm intelligence
Velmurugan Sivaraman
 
Artificial intelligence(04)
Artificial intelligence(04)Artificial intelligence(04)
Artificial intelligence(04)
Nazir Ahmed
 
Pushdown automata
Pushdown automataPushdown automata
Pushdown automata
eugenesri
 
An introduction to reinforcement learning
An introduction to reinforcement learningAn introduction to reinforcement learning
An introduction to reinforcement learning
Subrat Panda, PhD
 
Reinforcement learning, Q-Learning
Reinforcement learning, Q-LearningReinforcement learning, Q-Learning
Reinforcement learning, Q-Learning
Kuppusamy P
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & ReasoningSajid Marwat
 
Agents in Artificial intelligence
Agents in Artificial intelligence Agents in Artificial intelligence
Agents in Artificial intelligence
Lalit Birla
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
Megha Sharma
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimizationAbdul Rahman
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
Md. Tanvir Masud
 
Activation function
Activation functionActivation function
Activation function
RakshithGowdakodihal
 

What's hot (20)

Agents1
Agents1Agents1
Agents1
 
AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)AI Lecture 3 (solving problems by searching)
AI Lecture 3 (solving problems by searching)
 
Reinforcement Learning
Reinforcement LearningReinforcement Learning
Reinforcement Learning
 
Greedy Algorihm
Greedy AlgorihmGreedy Algorihm
Greedy Algorihm
 
LSTM Basics
LSTM BasicsLSTM Basics
LSTM Basics
 
Forms of learning in ai
Forms of learning in aiForms of learning in ai
Forms of learning in ai
 
2-Agents- Artificial Intelligence
2-Agents- Artificial Intelligence2-Agents- Artificial Intelligence
2-Agents- Artificial Intelligence
 
Solving problems by searching
Solving problems by searchingSolving problems by searching
Solving problems by searching
 
Swarm intelligence
Swarm intelligenceSwarm intelligence
Swarm intelligence
 
Artificial intelligence(04)
Artificial intelligence(04)Artificial intelligence(04)
Artificial intelligence(04)
 
Pushdown automata
Pushdown automataPushdown automata
Pushdown automata
 
An introduction to reinforcement learning
An introduction to reinforcement learningAn introduction to reinforcement learning
An introduction to reinforcement learning
 
Reinforcement learning, Q-Learning
Reinforcement learning, Q-LearningReinforcement learning, Q-Learning
Reinforcement learning, Q-Learning
 
Ai Slides
Ai SlidesAi Slides
Ai Slides
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & Reasoning
 
Agents in Artificial intelligence
Agents in Artificial intelligence Agents in Artificial intelligence
Agents in Artificial intelligence
 
Problem solving agents
Problem solving agentsProblem solving agents
Problem solving agents
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
 
Knowledge representation
Knowledge representationKnowledge representation
Knowledge representation
 
Activation function
Activation functionActivation function
Activation function
 

Similar to ANT ALGORITME.pptx

Bio-inspired computing Algorithms.pptx
Bio-inspired computing Algorithms.pptxBio-inspired computing Algorithms.pptx
Bio-inspired computing Algorithms.pptx
pawansher2002
 
Ai presentation
Ai presentationAi presentation
Ai presentationvini89
 
cs621-lect7-SI-13aug07.ppt
cs621-lect7-SI-13aug07.pptcs621-lect7-SI-13aug07.ppt
cs621-lect7-SI-13aug07.ppt
DeveshKhandare
 
Cs621 lect7-si-13aug07
Cs621 lect7-si-13aug07Cs621 lect7-si-13aug07
Cs621 lect7-si-13aug07
Borseshweta
 
Classification with ant colony optimization
Classification with ant colony optimizationClassification with ant colony optimization
Classification with ant colony optimization
kamalikanath89
 
ant colony optimization
ant colony optimizationant colony optimization
ant colony optimization
Shankha Goswami
 
SWARM INTELLIGENCE FROM NATURAL TO ARTIFICIAL SYSTEMS: ANT COLONY OPTIMIZATION
SWARM INTELLIGENCE FROM NATURAL TO ARTIFICIAL SYSTEMS: ANT COLONY OPTIMIZATIONSWARM INTELLIGENCE FROM NATURAL TO ARTIFICIAL SYSTEMS: ANT COLONY OPTIMIZATION
SWARM INTELLIGENCE FROM NATURAL TO ARTIFICIAL SYSTEMS: ANT COLONY OPTIMIZATION
Fransiskeran
 
Ant_Colony_Optimization
Ant_Colony_OptimizationAnt_Colony_Optimization
Ant_Colony_OptimizationNeha Reddy
 
Performance Evaluation of Different Network Topologies Based On Ant Colony Op...
Performance Evaluation of Different Network Topologies Based On Ant Colony Op...Performance Evaluation of Different Network Topologies Based On Ant Colony Op...
Performance Evaluation of Different Network Topologies Based On Ant Colony Op...
ijwmn
 
Swarm Intelligence: An Application of Ant Colony Optimization
Swarm Intelligence: An Application of Ant Colony OptimizationSwarm Intelligence: An Application of Ant Colony Optimization
Swarm Intelligence: An Application of Ant Colony Optimization
IJMER
 
Ant Colony Optimization (ACO)
Ant Colony Optimization (ACO)Ant Colony Optimization (ACO)
Ant Colony Optimization (ACO)
Mahmoud El-tayeb
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
Joy Dutta
 
antcolonyoptimization-130619020831-phpapp01.pdf
antcolonyoptimization-130619020831-phpapp01.pdfantcolonyoptimization-130619020831-phpapp01.pdf
antcolonyoptimization-130619020831-phpapp01.pdf
nrusinhapadhi
 
SWARM INTELLIGENCE
SWARM INTELLIGENCESWARM INTELLIGENCE
SWARM INTELLIGENCE
VeenaMadhuriGundapun
 
Ant Colony Algorithm
Ant Colony AlgorithmAnt Colony Algorithm
Ant Colony Algorithm
guest4c60e4
 
Ant colony algorithm
Ant colony algorithmAnt colony algorithm
Ant colony algorithm
قصي نسور
 
Swarm intelligence
Swarm intelligenceSwarm intelligence
Swarm intelligence
Eslam Hamed
 
Classification with ant colony optimization
Classification with ant colony optimizationClassification with ant colony optimization
Classification with ant colony optimization
kamalikanath89
 
Foundations-of-Ants-Ant-Colony-Optimization (1).pptx
Foundations-of-Ants-Ant-Colony-Optimization (1).pptxFoundations-of-Ants-Ant-Colony-Optimization (1).pptx
Foundations-of-Ants-Ant-Colony-Optimization (1).pptx
CharanjitSingh468469
 
Swarm intelligence and particle swarm optimization
Swarm intelligence and particle swarm optimizationSwarm intelligence and particle swarm optimization
Swarm intelligence and particle swarm optimization
Muhammad Haroon
 

Similar to ANT ALGORITME.pptx (20)

Bio-inspired computing Algorithms.pptx
Bio-inspired computing Algorithms.pptxBio-inspired computing Algorithms.pptx
Bio-inspired computing Algorithms.pptx
 
Ai presentation
Ai presentationAi presentation
Ai presentation
 
cs621-lect7-SI-13aug07.ppt
cs621-lect7-SI-13aug07.pptcs621-lect7-SI-13aug07.ppt
cs621-lect7-SI-13aug07.ppt
 
Cs621 lect7-si-13aug07
Cs621 lect7-si-13aug07Cs621 lect7-si-13aug07
Cs621 lect7-si-13aug07
 
Classification with ant colony optimization
Classification with ant colony optimizationClassification with ant colony optimization
Classification with ant colony optimization
 
ant colony optimization
ant colony optimizationant colony optimization
ant colony optimization
 
SWARM INTELLIGENCE FROM NATURAL TO ARTIFICIAL SYSTEMS: ANT COLONY OPTIMIZATION
SWARM INTELLIGENCE FROM NATURAL TO ARTIFICIAL SYSTEMS: ANT COLONY OPTIMIZATIONSWARM INTELLIGENCE FROM NATURAL TO ARTIFICIAL SYSTEMS: ANT COLONY OPTIMIZATION
SWARM INTELLIGENCE FROM NATURAL TO ARTIFICIAL SYSTEMS: ANT COLONY OPTIMIZATION
 
Ant_Colony_Optimization
Ant_Colony_OptimizationAnt_Colony_Optimization
Ant_Colony_Optimization
 
Performance Evaluation of Different Network Topologies Based On Ant Colony Op...
Performance Evaluation of Different Network Topologies Based On Ant Colony Op...Performance Evaluation of Different Network Topologies Based On Ant Colony Op...
Performance Evaluation of Different Network Topologies Based On Ant Colony Op...
 
Swarm Intelligence: An Application of Ant Colony Optimization
Swarm Intelligence: An Application of Ant Colony OptimizationSwarm Intelligence: An Application of Ant Colony Optimization
Swarm Intelligence: An Application of Ant Colony Optimization
 
Ant Colony Optimization (ACO)
Ant Colony Optimization (ACO)Ant Colony Optimization (ACO)
Ant Colony Optimization (ACO)
 
Ant colony optimization
Ant colony optimizationAnt colony optimization
Ant colony optimization
 
antcolonyoptimization-130619020831-phpapp01.pdf
antcolonyoptimization-130619020831-phpapp01.pdfantcolonyoptimization-130619020831-phpapp01.pdf
antcolonyoptimization-130619020831-phpapp01.pdf
 
SWARM INTELLIGENCE
SWARM INTELLIGENCESWARM INTELLIGENCE
SWARM INTELLIGENCE
 
Ant Colony Algorithm
Ant Colony AlgorithmAnt Colony Algorithm
Ant Colony Algorithm
 
Ant colony algorithm
Ant colony algorithmAnt colony algorithm
Ant colony algorithm
 
Swarm intelligence
Swarm intelligenceSwarm intelligence
Swarm intelligence
 
Classification with ant colony optimization
Classification with ant colony optimizationClassification with ant colony optimization
Classification with ant colony optimization
 
Foundations-of-Ants-Ant-Colony-Optimization (1).pptx
Foundations-of-Ants-Ant-Colony-Optimization (1).pptxFoundations-of-Ants-Ant-Colony-Optimization (1).pptx
Foundations-of-Ants-Ant-Colony-Optimization (1).pptx
 
Swarm intelligence and particle swarm optimization
Swarm intelligence and particle swarm optimizationSwarm intelligence and particle swarm optimization
Swarm intelligence and particle swarm optimization
 

Recently uploaded

To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
DianaGray10
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Jeffrey Haguewood
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Thierry Lestable
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
DianaGray10
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 

Recently uploaded (20)

To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 
UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4UiPath Test Automation using UiPath Test Suite series, part 4
UiPath Test Automation using UiPath Test Suite series, part 4
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdfFIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
FIDO Alliance Osaka Seminar: Passkeys at Amazon.pdf
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
Slack (or Teams) Automation for Bonterra Impact Management (fka Social Soluti...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdfFIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
FIDO Alliance Osaka Seminar: Passkeys and the Road Ahead.pdf
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
Empowering NextGen Mobility via Large Action Model Infrastructure (LAMI): pav...
 
Connector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a buttonConnector Corner: Automate dynamic content and events by pushing a button
Connector Corner: Automate dynamic content and events by pushing a button
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 

ANT ALGORITME.pptx

  • 2. Swarm Intelligence “Swarm intelligence (SI) is artificial intelligence based on the collective behaviour of decentralized, self- organized systems”
  • 3. Swarm Intelligence General Characteristics Composed of many individuals Individuals are homogeneous Local interaction based on simple rules Self-organization Constituting a natural model particularly suited to distributed problem solving
  • 4. Swarm Intelligence General Characteristics  Collective system capable of accomplishing difficult tasks in dynamic and varied environments without any external guidance or control and with no central coordination  Achieving a collective performance which could not normally be achieved by an individual acting alone  Constituting a natural model particularly suited to distributed problem solving
  • 5.
  • 9. Ant Colony System  First introduced by Marco Dorigo in 1992 as a method for solving hard combinatorial optimization problems (COPs).  Progenitor to “Ant Colony System,” later discussed  Result of research on computational intelligence approaches to combinatorial optimization  Originally applied to Traveling Salesman Problem  Applied later to various hard optimization problems
  • 10. Inherent Features Inherent parallelism Stochastic nature Adaptivity Use of positive feedback Autocatalytic in nature
  • 11. Real Ant actual scenario Almost blind. Incapable of achieving complex tasks alone. Rely on the phenomena of swarm intelligence for survival. Capable of establishing shortest-route paths from their colony to feeding sources and back. Use stigmergic communication via pheromone trails. Follow existing pheromone trails with high probability. What emerges is a form of autocatalytic behavior: the more ants follow a trail, the more attractive that trail becomes for being followed.
  • 12. Real Ant actual scenario The process is thus characterized by a positive feedback loop, where the probability of a discrete path choice increases with the number of times the same path was chosen before.
  • 13. Natural behavior of an ant : Foraging modes Wander mode Search mode Return mode Attracted mode Trace mode Carry mode
  • 14. Behavior of Ant colony regulation of nest temperature within 1 degree celsius range; forming bridges; raiding specific areas for food; building and protecting nest; sorting brood and food items; cooperating in carrying large items; emigration of a colony; finding shortest route from nest to food source; preferentially exploiting the richest food source available.
  • 15. Autocatalyzation Autocatalysis is a positive feedback loop that drives the ants to explore promising aspects of the search space over less promising areas.
  • 16. A key concept: Stigmergy Stigmergy is: indirect communication via interaction with the environment.  A problem gets solved bit by bit ..  Individuals communicate with each other in the above way, affecting what each other does on the task.  Individuals leave markers or messages – these don’t solve the problem in themselves, but they affect other individuals in a way that helps them solve the problem.
  • 17. Stigmergy in Ants Ants are behaviourally unsophisticated, but collectively they can perform complex tasks. Ants have highly developed sophisticated sign- based stigmergy. – They communicate using pheromones; – They lay trails of pheromone that can be followed by other ants.
  • 18. Pheromone Trails  Individual ants lay pheromone trails while travelling from the nest, to the nest or possibly in both directions.  The pheromone trail gradually evaporates over time.  But pheromone trail strength accumulate with multiple ants using path. Food source Nest
  • 19. Naturally Observed Ant Behavior All is well in the world of the ant.
  • 20. Naturally Observed Ant Behavior An obstacle has blocked our path
  • 23. ACO Algorithms: Basic Ideas  Ants are agents that: Move along between nodes in a graph.  They choose where to go based on pheromone strength (and maybe other things)  An ant’s path represents a specific candidate solution.  When an ant has finished a solution, pheromone is laid on its path, according to quality of solution.  This pheromone trail affects behaviour of other ants by `stigmergy’
  • 24. Artificial Ants • artifcial ants may simulate pheromone laying by modifying appropriate pheromone variables associated with problem states they visit while building solutions to the optimization problem. Also, according to the stigmergic communication model, the artifcial ants would have only local access tothese pheromone variables.
  • 25. Artificial Ants Main characteristics of stigmergy can be extended to artificial agents by • Associating state variables with different problem states; and • Giving the agents only local access to these variables. • Coupling between the autocatalytic mechanism and the implicit evaluation of solutions • Just like real ants, artificial ants create their solutions sequentially by moving from one problem state to another
  • 26. Differences between real and artificial ants:  Artificial ants live in a discrete world| they move sequentially through a finite set of problem states.  The pheromone update (i.e., pheromone depositing and evaporation) is not accomplished in exactly the same way by artificial ants as by real ones. Sometimes the pheromone update is done only by some of the artificial ants, and often only after a solution has been constructed.  Some implementations of artificial ants use additional mechanisms that do not exist in the case of real ants. Examples include look-ahead, local search, backtracking, etc.
  • 28. SHORTEST PATH Ants deposit pheromones on ground that form a trail. The trail attracts other ants. Pheromones evaporate faster on longer paths. Shorter paths serve as the way to food for most of the other ants.
  • 30. General ACO • A stochastic construction procedure • Probabilistically build a solution • Iteratively adding solution components to partial solutions - Heuristic information - Trace/Pheromone trail • Reinforcement Learning reminiscence • Modify the problem representation at each iteration • Ants work concurrently and independently • Collective interaction via indirect communication leads to good solutions
  • 31. Some inherent advantages • Positive Feedback accounts for rapid discovery of good solutions • Distributed computation avoids premature convergence • The greedy heuristic helps find acceptable solution in the early solution in the early stages of the search process. • The collective interaction of a population of agents.
  • 32. Disadvantages in Ant Systems Slower convergence than other Heuristics Performed poorly for TSP problems larger than 75 cities. No centralized processor to guide the AS towards good solutions
  • 33. Ant System (AS) Algorithm 1. Initialization 2. Randomly place ants 3. Build tours 4. Deposit trail 5. Update trail 6. Loop or exit
  • 34. Ant with Binary Bridge • Let the amount of pheromone on a branch be proportional to the number of ants that used the branch in the past and let ms(t) and ml(t) be the numbers of ants that have used the short and the long branches after a total of t ants have crossed the bridge, with ms(t) þ ml(t) =t.The probability ps(t) with which the (t+1) th ant chooses the short branch can then be written as
  • 35. Ant with Binary Bridge The number of ants choosing the short branch is given by The number of ants choosing the long branch by where q is a uniform random number drawn from the interval [0; 1]. Mote Carlo Simulation method will give good solution
  • 38. Application Traveling Salesman Problem Quadratic Assignment Problem Network Model Problem Vehicle routing Graph coloring
  • 39. ACO system -PSEUDOCODE  Often applied to TSP (Travelling Salesman Problem): shortest path between n nodes  Algorithm in Pseudocode: – Initialize Trail – Do While (Stopping Criteria Not Satisfied) – Cycle Loop • Do Until (Each Ant Completes a Tour) – Tour Loop • Local Trail Update • End Do • Analyze Tours • Global Trail Update – End Do
  • 40. ACO 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 • 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.
  • 41. ACO 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: where is the neighborhood of ant k when in node i.
  • 42. ACO Algorithm k ij ij       • When the arc (i,j) is traversed , the pheromone value changes as follows: • By using this rule, the probability increases that forthcoming ants will use this arc. • After each ant k has moved to the next node, the pheromones evaporate by the following equation to all the arcs: (1 ) , ( , ) ij ij p i j A      
  • 43. Steps for Solving a Problem by ACO 1. 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 2. Define the meaning of the pheromone trails 3. Define the heuristic preference for the ant while constructing a solution 4. If possible implement a efficient local search algorithm for the problem to be solved. 5. Choose a specific ACO algorithm and apply to problem being solved 6. Tune the parameter of the ACO algorithm.
  • 44. Combinatorial optimization • Find values of discrete variables • Optimizing a given objective function Π = (S, f, Ω) – problem instance S – set of candidate solutions f – objective function Ω – set of constraints set of feasible solutions (with respect to Ω) Find globally optimal feasible solution s*
  • 45. Combinatorial optimization problem mapping • Combinatorial problem (S, f, Ω(t)) • Ω(t) – time-dependent constraints  Example – dynamic problems • Goal – find globally optimal feasible solution s* • Minimization problem • Mapped on another problem
  • 46. Combinatorial optimization problem mapping • C = {c1, c2, …, cNc} – finite set of components • States of the problem: X = {x = <ci, cj, …, ch, …>, |x| < n < +∞} • Set of candidate solutions:
  • 48. Combinatorial optimization problem mapping • X – states • S – candidate solutions • – feasible states • S* – optimal solutions S* X ~ S X
  • 49. Combinatorial optimization problem mapping • Cost g(s, t) for each • In most cases – g(s, t) ≡ f(s, t) • GC = (C, L) – completely connected graph • C – set of components • L – edges fully connecting the components (connections) • GC – construction graph • Artificial ants build solutions by performing randomized walks on GC(C, L)
  • 50. ACO for Traveling Salesman Problem The first ACO algorithm was called the Ant system and it was aimed to solve the travelling salesman problem, in which the goal is to find the shortest round-trip to link a series of cities. At each stage, the ant chooses to move from one city to another according to some rules:  It must visit each city exactly once;  A distant city has less chance of being chosen (the visibility);  The more intense the pheromone trail laid out on an edge between two cities, the greater the probability that that edge will be chosen;  Having completed its journey, the ant deposits more pheromones on all edges it traversed, if the journey is short;  After each iteration, trails of pheromones evaporate.
  • 51. ACO for Traveling Salesman Problem TSP PROBLEM : Given N cities, and a distance function d between cities, find a tour that: 1. Goes through every city once and only once 2. Minimizes the total distance.
  • 52. HOW TO IMPLEMENT IN A PROGRAM • Ants: Simple computer agents • Move ant: Pick next component in the const. solution • Pheromone: • Memory: MK or TabuK • Next move: Use probability to move ant • Graph (N,E): where N = cities/nodes, E = edges • = the tour cost from city i to city j (edge weight) • Ant move from one city i to the next j with some transition probability.
  • 53. A simple TSP example A D C B 1 [] 4 [] 3 [] 2 [] dAB =8;dBC = 4;dCD =15;dDA =6 53
  • 55. How to build next sub-solution? 1 [A] A D C B 55
  • 59. Path and Pheromone Evaluation 1 [A,B,C,D L1 =27 L2 =25 L3 =29 L4 =18 2 [B,C,D,A] 3 [C,D,A,B] 4 [D,A,B,C] 59 Best tour
  • 60. MAX–MIN Ant System • MAX–MIN Ant System (MMAS) (Stu¨ tzle & Hoos, 1997, 2000; Stu¨ tzle, 1999) introduces four main modifications with respect to AS. First, it strongly exploits the best tours found: only either the iteration-best ant, that is, the ant that produced the best tour in the current iteration, or the best- so-far ant is allowed to deposit pheromone. Unfortunately, such a strategy may lead to a stagnation situation in which all the ants follow the same tour, because of the excessive growth of pheromone trails on arcs of a good, although suboptimal, tour.
  • 61. MAX–MIN Ant System • To counteract this effect, a second modification introduced by MMAS is that it limits the possible range of pheromone trail values to the interval [Ʈmin; Ʈmax]. Third, the pheromone trails are initialized to the upper pheromone trail limit, which, together with a small pheromone evaporation rate, increases the exploration of tours at the start of the search. Finally, in MMAS, pheromone trails are reinitialized each time the system approaches stagnation or when no improved tour has been generated for a certain number of consecutive iterations.
  • 62. Greedy Search Algorithm • A greedy algorithm is an algorithm that follows the problem solving heuristic of making the locally optimal choice at each stage[1] with the hope of finding a global optimum. In many problems, a greedy strategy does not in general produce an optimal solution, but nonetheless a greedy heuristic may yield locally optimal solutions that approximate a global optimal solution in a reasonable time.
  • 63. Greedy Search Algorithm • For example, a greedy strategy for the traveling salesman problem (which is of a high computational complexity) is the following heuristic: "At each stage visit an unvisited city nearest to the current city". This heuristic need not find a best solution, but terminates in a reasonable number of steps; finding an optimal solution typically requires unreasonably many steps. In mathematical optimization, greedy algorithms solve combinatorial problems having the properties of matroids.
  • 64. Constructive Heuristics • Start from an “empty solution” • Repeatedly, extend the current solution until a complete solution is constructed • Use heuristics to try to extend in such a way that the final solution is a good one It is essential to know the difference between: • Constructive methods Extend empty solution until get complete solution • Local search Take complete solution and try to improve it via local moves