Srarm - Unit 1
Srarm - Unit 1
Syllabus
Unit-1
Introduction: Approximate Methods, Heuristics, Metaheuristic Techniques and Local Search.
Swarm Intelligence & Unit-2
Evolutionary Algorithms Introduction to Evolutionary Algorithms: Genetic Algorithms: Genetic Algorithms: Elementary
Concepts, Genetic algorithm, Subset-Coded Genetic Algorithm, Permutation-Coded Genetic
Algorithm, Grouping-based Genetic Algorithm.
Unit-3
Introduction to Swarm Intelligence Techniques: Basic concepts, examples of Swarm Intelligence
By Techniques such as Ant-Colony Optimization and Artificial Bee Colony Algorithm.
Dr. Naeem Ahmad Unit-4
Assistant Professor Warm-up to Swarm Intelligence and Evolutionary Algorithms: Introduction to implementation of
swarm intelligence techniques and evolutionary algorithm on some COPs such as 0/1 Knapsack
NIT Raipur, India problem, TSP problem, job-scheduling problem, bin packing problem.
1 2
Books
• An Introduction to Genetic Algorithms
by Melanie Mitchell
• Ant-Colony Optimization
by Marco Dorigo and Thomas Stützle
Unit 1
Introduction
• Heuristic Search- Theory and Applications
by Stefan Edelkamp, Stefan Schrodl By
Dr. Naeem Ahmad
• Handbook of Metaheuristics Assistant Professor
by Michel Gendreau NIT Raipur, India
3 4
1
12-08-2022
7 8
9 10
• If f(x) or any gj(x) is non-linear, we have non-linear optimization • Non-linear programming problem:
problem, and this is often called non-linear programming (NLP). • Given N observations: (x1, p(x1)), ( x2, p(x2)), … , ( xN, p(xN)) of an unknown
function p(x).
• Conventional methods usually finds local optimal solutions.
Metaheuristic methods are useful for finding global solutions. • Find a polynomial q(x) = a0 + a1 + a2x2, such that
2
12-08-2022
15 16
3
12-08-2022
20
21 22
23 24
4
12-08-2022
• Step 4: Select a node n’ from S at random. • Step 4: Select a node 𝑛′ ∈ 𝐶 from S. If such n’ does not exist, finish
with failure.
• Step 5: n = n’, return to 2. • Step 5: n = n’, and return to Step 2.
Quiz-1: What is “node expansion”? Point: Do not re-visit the same node!
Quiz-2: What are the weak points of random search?
25 26
27 28
29 30
5
12-08-2022
31 32
33 34
35 36
6
12-08-2022
37 38
Heuristics Heuristics
• Heuristics is an approach to problem-solving in which the objective is to produce • Heuristics are meant to be estimates of the remaining distance from a node to the
a working solution within a reasonable time frame. goal.
• These techniques are used to find the approximate solution of a problem when • Graph representation of a weighted state space problem
classical methods do not. These are derived from past experience with similar
problems. 𝐺 = (𝑉, 𝐸, 𝑠, 𝑇, 𝑤)
• This information can be exploited by search algorithms to assess whether one state
is more promising than the rest. • A heuristic h is a node evaluation function, mapping V to IR ≥ 0.
• Estimate of the total path cost from the start node to the target destination:
• Why do we need heuristics? 𝑓 𝑢 = 𝑔 𝑢 + ℎ(𝑢)
• Node with minimum f is most promising node to be expanded.
39 40
41 42
7
12-08-2022
43 44
45 46
How do you escape local optima? A global optimization algorithm is guaranteed to find the global
optimum if it runs long enough.
47 48
8
12-08-2022
• It is also called greedy local search as it only looks to its good immediate neighbor
state and not beyond that.
49 50
Hill Climbing
51 52
53 54
9
12-08-2022
55 56
• Objective function
57 Solution to a symmetric TSP with 7 cities using brute force search. Note: Number of permutations: (7−1)!/2 = 360 58
Solution of a TSP with 7 cities using a simple Branch and bound algorithm.
Note: The number of permutations is much less than Brute force search
• Not very appropriate for TSP, where the adjacency of elements is important. (weak
locality)
59 60
10
12-08-2022
2-edge exchange (aka 2-opt) k-edge exchange Swap operator Insertion operator
Appropriate for TSP, where the adjacency of elements is important. (strong locality). 61 62
A* Algorithm A* Algorithm
• A* Search Algorithm is a simple and efficient search algorithm that can be used to • If the heuristic function is admissible meaning that :
find the optimal path between two nodes in a graph. – it never overestimates the actual cost to get to the goal
• A* is an informed search algorithm, or a best-first search. – A* is guaranteed to return a least-cost path from start to goal.
• It does this by maintaining a tree of paths originating at the start node and
extending those paths one edge at a time until its termination criterion is satisfied. • It is an extension of Dijkstra's shortest path algorithm.
• The cost of a node is evaluated using both the estimated cost and the true cost as
follows
𝑓 𝑥 = 𝑔 𝑥 + ℎ(𝑥)
• A* terminates when the path it chooses to extend is a path from start to goal or if
there are no paths eligible to be extended.
63 64
65 66
11
12-08-2022
67 68
Metaheuristics Metaheuristics
• The term was coined by Glover (1986). • A meta heuristic:
Meta– (beyond, at a higher level) –heuristic (to find, to search, to discover)
oGuides a subordinate heuristic in an iterative manner
• “A metaheuristic is a high-level problem-independent algorithmic framework that
provides a set of guidelines or strategies to develop heuristic optimization oAre guided random search techniques
algorithms” (Sörensen and Glover, 2013) oExplore and exploits the search space
• “a metaheuristic is a higher-level procedure or heuristic designed to find, generate, oIncludes methods to avoid getting trapped in local optima
or select a heuristic (partial search algorithm) that may provide a sufficiently good oUses search experience intelligently to guide further search
solution to an optimization problem, especially with incomplete or imperfect
information or limited computation capacity” (Bianchi et al, 2009) oFind near–optimal solutions
• “Metaheuristics is a rather unfortunate term often used to describe a major
subfield, indeed the primary subfield, of stochastic optimization. Stochastic
optimization (also called randomized optimization) is the general class of
algorithms and techniques which employ some degree of randomness to find
optimal (or as optimal as possible) solutions to hard problems.” (Luke 2013)
69 70
12
12-08-2022
Metaheuristics Taxonomies
• Advantages • Many classification criteria may be used
– General purpose for metaheuristics. The most common
– Successful in practice are:
– Easy implementation – Nature inspired vs non-nature inspired
– Easy parallelization – Memory usage vs memoryless methods
– Deterministic vs stochastic
– Iterative vs greedy
• Drawbacks – Population vs single-solution based search
– They are not exact algorithms
– They are not deterministic
– Poor theoretical foundations
73 74
75 76
https://commons.wikimedia.org/wiki/File:ParticleSwarmArrowsAnimation.gif
77 78
13
12-08-2022
83 84
14
12-08-2022
89 90
15
12-08-2022
Thank You
91
16