Professional Documents
Culture Documents
AI SMPS Stochastic Local Search
AI SMPS Stochastic Local Search
AI SMPS Stochastic Local Search
Deepak Khemani
Department of Computer Science & Engineering
IIT Madras
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Exploding Search Spaces
N Candidates in SAT: 2N Candidates in TSP: N! Ratio
1 2 1 0.5
2 4 2 0.5
3 8 6 0.75
4 16 24 1.5
5 32 120 3.75
6 64 720 11.25
7 128 5040 39.38
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Worst case time to solve SAT with 100 variables
N SAT: 2N TSP (brute force): N! Ratio
100 1.267650600 ×1030 9.332621544×10157 10127
the alternative is
to look for algorithms that can do better than Hill Climbing.
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Hill Climbing – a local search algorithm
Move to the best neighbour if it is better, else terminate
Hill Climbing
N ß Start
newNode ß best(moveGen (N))
While newNode is better than N Do
N ß newNode
newNode ß best(moveGen (N))
endWhile
return N
End In practice sorting is not needed, only the best node
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Best Neighbour– a variation of Hill Climbing
Move to the best neighbour anyway
Best Neighbour
N ß Start
bestSeen ß N
Until some termination criterion
N ß best(moveGen (N))
IF N better than bestSeen
bestSeen ß N
return bestSeen
End
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Getting off a Local Optima
Can Best Neighbour find a path to a better optimum?
BUT
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Tabu Search – not allowed back immediately
Move to the best neighbour anyway,
Best Neighbour
N ß Start but only if it is not tabu
bestSeen ß N
Until some termination criterion
N ß best(allowed(moveGen (N))
IF N better than bestSeen
bestSeen ß N
return bestSeen
End
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Tabu Search for SAT
When N= 7, the neigbourhood function N1 changes one bit.
1011010
Initially M = 0 0 0 0 0 0 0
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Tabu Search: an illustration (let tt=2)
1011010 Initially M = 0 0 0 0 0 0 0
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Tabu Search: driving search into newer areas
Initially F = 0 0 0 0 0 0 0
Let F = F1 F2 F3 F4 F5 F6 F7
eval(nodei) ß eval(nodei) - Fi
- for a maximization problem
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
The solution space for a 4 variable SAT problem
0100 1100
1110
0110
1111
0111
1101
0101 1001
0001 1011
0011 1010
0010
0000 1000
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
A formula with 6 clauses F = (aÚ¬b)Ù(¬aÚbÚc)Ù(¬cÚd)
Ù(d)Ù(¬aÚbÚd)Ù(¬aÚ¬d)
0100 1100 h = number of satisfied clauses
4
1110 5
4
0110
3 1111
5
0111
5 1101
5
0101 1001
5
4
0001 1011
6
5
0011 1010
6 3
0010
4 3
0000 1000
5
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Gradients and ridges F = (aÚ¬b)Ù(¬aÚbÚc)Ù(¬cÚd)
Ù(d)Ù(¬aÚbÚd)Ù(¬aÚ¬d)
0100 1100 h = number of satisfied clauses
4
1110 5 a ridge
4
0110 one of multiple best
3 1111
5 neighbours
0111
5 1101 unique best
5 neighbour
0101 1001
5
4
0001 1011
6
5
0011 1010
6 3
0010
4 3
0000 1000
5
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Maxima: global and local F = (aÚ¬b)Ù(¬aÚbÚc)Ù(¬cÚd)
Ù(d)Ù(¬aÚbÚd)Ù(¬aÚ¬d)
0100 1100 h = number of satisfied clauses
4
1110 5 local maximum
4
0110
3 1111 global maximum
5
0111
5 1101
5
0101 1001
5
4
0001 1011
6
5
0011 1010
6 3
0010
4 3
0000 1000
5
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Tabu Search F = (aÚ¬b)Ù(¬aÚbÚc)Ù(¬cÚd)
Ù(d)Ù(¬aÚbÚd)Ù(¬aÚ¬d)
0100 1100 h = number of satisfied clauses
4
1110 5
4 Starting from here Tabu
0110
3 1111 Search traverses one of the
5
0111 three possible routes along
5 1101
5 the ridges to reach the goal
0101 1001
5
4
0001 1011
6
5
0011 1010
6 3
0010
4 3
0000 1000
5
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Stochastic Local Search Methods
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Beam Search for SAT (b V ~c) Ù (c V ~d) Ù (~b) Ù (~a V ~e) Ù (e V ~c) Ù (~c V ~d)
4 01111 3
10111 3 11011 4 11101 3 11110
11111 00111 01011 01101 01110 01101 10101 11001 11111 11100
3 4 4 5 3
* 5 4 4 3 4
11101 00101 01001 01111 01100 11101 00101 01001 01111 01100
4 5 5 4 4 4 5 5 4 4
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Iterated Hill Climbing F = (aÚ¬b)Ù(¬aÚbÚc)Ù(¬cÚd)
Ù(d)Ù(¬aÚbÚd)Ù(¬aÚ¬d)
0100 1100 h = number of satisfied clauses
4
1110 5
4 Iterated Hill Climbing reaches
0110 solution from any of these
3 1111
5 nodes as the starting point
0111
5 1101
5
0101 1001
5
4
0001 1011
6
5
0011 1010
6 3
0010
4 3
0000 1000
5
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Iterated Hill Climbing
h(n)
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Stochastic Hill Climbing
Accept a good random move with high probability
Accept a bad random move too but with low probability
- combines exploration with exploitation
1.0
0.5
0.0
0 ΔE
Accept a move from vc to vn with probability P = 1/(1 + e-ΔE/T)
given by the Sigmoid function, where DE = (eval(vn) -eval(vc)) –
for a maximization problem, and T is a parameter
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Begin with Exploration à End with Exploitation
SimulatedAnnealing()
1 node ¬ random candidate solution or start
2 bestNode ¬ node
3 T ¬ some large value
4 for time ¬ 1 to numberOfEpochs
5 do while some termination criteria /* M cycles in a simple case */
6 do
7 neighbour ¬ RandomNeighbour(node)
8 DE ¬ Eval(neighbour) − Eval(node)
9 if Random(0, 1) < 1 / (1+e-DE/T)
10 then node ¬ neighbour
11 if Eval(node) > Eval(bestNode)
12 then bestNode ¬ node
13 T ¬ CoolingFunction(T, time)
14 return bestNode
Tà¥
0.0
0 ΔE
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Effect of temperature T e-13/T P
1 0.000002 1.0
-DE = eval(vc) - eval(vn) = -13
5 0.0743 0.93
10 0.2725 0.78
20 0.52 0.66
50 0.77 0.56
80 27 14.88 0.06
Source: Michalewicz and Fogel. How to Solve It: Modern Heuristics, page 119.
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Intuition – why Simulated Annealing works
B
ΔEB
ΔEA
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Simulated Annealing works well when…
h(n)
Or
eval(n)
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Evolution in Nature
Some fundamental questions…
What is life?
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
What is Life?
In his book on Artificial Life and Creatures
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Things that persist, persist.
Grand goes on to clarify that much of what we see persisting,
like clouds on a hilltop, ripples in a pond,
or even human bodies,
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Life
Inanimate matter has a natural persistence
for example, rocks, water and so on
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Competition
Species compete for the same resources
for example, lions and hyenas for prey
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Paul Valery the French poet Mixing up genes via
sexual reproduction
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Selection by attractiveness
In Nature the mixing up of genes does not happen at random.
All life forms have evolved ways to attract the opposite sex.
- Most male birds put up a song and dance show.
- Humans are more complex.
Health, wealth, cleverness
are all part of the mating game.
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
An Ecosystem of Predators and Prey A small fragment of the
vast ecosystem. The
natural world contains
millions of species
hawk lion
interacting with each
fox other. Arrows depict a
snake robin positive influence of
sparrow rabbit the population of one
species on another.
mouse grasshopper beetle squirrel
fungi bacteria
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Evolution: Survival of the Fittest
French poet Paul Valéry: “It takes two to invent anything. The one makes
up combinations: the other chooses ... what is important to him in the
mass of the things which the former has imparted to him.”
Genetic Algorithms
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Genetic Algorithms (GAs)
• Devised by John Holland (1975), popularized by his student
David Goldberg via his book “Genetic Algorithms”.
• A class of methods for optimization problems, more generally
known as Evolutionary Algorithms.
• Heuristic stochastic adaptive search algorithms
• Implemented on a population of candidates in the solution space
• Inspired by the process of natural selection
• A fitness function evaluates each candidate
• The fittest candidates get to mate and reproduce
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Genetic Algorithms : Artificial Selection
Given a population of candidate solutions
Clone each candidate in proportion
to its fitness. Some may get more
than one copy, some none.
Reproduction
Randomly mate the
resulting population
Crossover and mix up the genes.
Once in a while, in
Mutation search of a lost gene.
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Crossover operators
A single point crossover simply cuts the two parents at a randomly
chosen point and recombines them to form two new solution strings.
P1 = X1 X2 X3 X4 X5 X6 X7 X8
P2 = Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8
For example, SAT
C 1 = X1 X2 X3 X4 Y5 Y6 Y7 Y8
C 2 = Y1 Y2 Y3 Y4 X5 X6 X7 X8
Any operator that mixes up the genes will do.
One can have multi-pont crossovers, for example,
P1 = X1 X2 X3 X4 X5 X6 X7 X8
P2 = Y1 Y2 Y3 Y4 Y5 Y6 Y7 Y8
C3 = X1 Y2 X3 Y4 X5 Y6 X7 Y8
C4 = Y1 X2 Y3 X4 Y5 X6 Y7 X8
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Genetic Algorithms
GeneticAlgorithm()
1 Initialize an initial population of candidate solutions p[1..n]
2 repeat
3 Calculate the fitness value of each member in p[1..n]
4 selected[1..n] ¬ the new population obtained by picking n members
5 from p[1..n] with probability proportional to fitness
6 Partition selected[1..n] into two halves, and randomly mate and
7 crossover members to generate offspring[1..n]
8 With a low probability mutate some members of offspring[1..n]
9 Replace k weakest members of p[1..n] with the k strongest
10 members of offspring[1..n]
11 until some termination criteria
12 return the best member of p[1..n]
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Genetic Algorithms
Competition
Evolution
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
An Ecosystem of Predators and Prey A small fragment of the
vast ecosystem. The
natural world contains
millions of species
interacting with each
other. Arrows depict a
positive influence of
the population of one
species on another.
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Evolution
Species evolve continually.
A species is like the design of a life form.
Nature has evolved a process of creative adaptation
Once in a while, in
Mutation search of a lost gene.
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
The Algorithm
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Complexity of SAT
F = (aÚ¬b)Ù(¬aÚc)Ù(¬cÚf)Ù(¬eÚf)Ù(¬aÚb)Ù(aÚ¬d )
kSAT -k>3
- could be much harder
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
A SAT problem with 6 variables F = (aÚ¬bÚe)Ù(¬aÚbÚc)Ù(¬cÚd Úf)
Ù(d Ú¬e Úf)Ù(¬aÚbÚd)Ù(aÚ¬d Úf)
Single Point Crossover h = number of satisfied clauses
P1 010110 0+1+1+1+1+0=4
P2 111010 1 + 1 + 0 + 0 + 1 + 1 = 4
C1 111110 1+1+1+1+1+1=6
C2 010010 0 + 1 + 1 + 0 + 1 + 1 = 4
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Probability of 3SAT being satisfiable m clauses
1.0
n variables
0.5
0.0
2 3 4 5 6 7 8
m/n = 4.3
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Iterated Hill Climbing Recap
h(n)
h(n)
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
GAs: The evolved population The Initial population may be
randomly distributed, but as Genetic
Algorithm is run the population has
more members around the peaks.
h(n)
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
A Tiny Example From: David E. Goldberg, Genetic Algorithms in Search,
Optimization and Machine Learning , Addison-Wesley, 1989
Let the fitness function f(x) be the square of the 5-bit binary number
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
A Tiny Example: Selection
Initial Binary f(x) Prob. Expected Actual Selected
01101 13 169 0.14 0.58 1 01101
11000 24 576 0.49 1.97 2 11000
01000 8 64 0.06 0.22 0 11000
10011 19 361 0.31 1.23 1 10011
Total 1170
Avg. 293
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
A Tiny Example: Single Point Crossover
Selected Crossed-over Binary f(x)
Total 1754
Fitter population Avg. 493
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
A Tiny Example: Cycle 2
Crossed-over Binary f(x) Prob. Expected Actual Selected
01100 12 144 0.08 0.33 0 11001
11001 25 625 0.36 1.42 2 11001
11011 27 729 0.42 1.66 2 11011
10000 16 256 0.16 0.58 0 11011
Total 1754 Total 2708
Avg. 493 Avg. 677
h(n)
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
GAs: practical matters
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
GAs for TSP
Genetic Algorithms can be used for the TSP problem as follows –
Create a population of candidate TSP solutions. Let the fitness function be the cost
of the tour. It is a minimization problem.
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Single point crossover does not work
O DG L A H K M B J F C N I E
H G MF O A D K I C N E L B J
OD G L A H KM B J N E L B J
H G MF O A D K I C F CN I E
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Cycle Crossover
1 1 1
P1 O D G L A H K M B J F C N I E Step 1: Identify cycles
P2 H G M F O A D K I C N E L B J
1 2 2 1 1 2 2
O DG L A H K M B J F C N I E
H G MF O A D K I C N E L B J
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Cycle Crossover
C1 O G M L A H D K I J F C N B E C1 gets even numbered cycles from P2
P1 O D G L A H K M B J F C N I E
1 2 2 3 1 1 2 2 4 5 3 5 3 4 5
P2 H G M F O A D K I C N E L B J
C2 H D G F O A K M B C N E L I J
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Cycle Crossover
C B C
P1 A
B
D C1 A D
E O E
O
F F
N N
G G
M M
H H
L L
I K I
K J J
B C B C
A D A D
E O E
O
F F
N N
G G
M M
H H
L L
I
P2 K J
I C2 K J
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Partially Mapped Crossover (PMX)
P1 O D G L A H K M B J F C N I E
Choose a subtour and establish a mapping
P2 H G M F O A D K I C N E L B J
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Partially Mapped Crossover (PMX)
P1 O D G L A H K M B J F C N I E
P2 H G M F O A D K I C N E L B J
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Partially Mapped Crossover (PMX)
C1 A D H K M B J
P1 O D G L A H K M B J F C N I E
P2 H G M F O A D K I C N E L B J
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Partially Mapped Crossover (PMX)
C1 A G D F O H K M B J N E L I C The second child C2 is
constructed in a similar manner,
first copying the subtour from P2
P1 O D G L A H K M B J F C N I E
P2 H G M F O A D K I C N E L B J
C2 O M G L H A D K I C F J N B E
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: PMX Dashed edges
C B C show copied
P1 A
B
D C1 A D
E
subtour
O E O
F F
N N
G G
M M
H H
L L
I K I
K J J
C B C
B A D
A D
E O E
O
F F
N N
G G
M M
H H
L L
K I
P2 K J
I C2 J
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Order Crossover C2 O G L H M A D K I C B J F N E
The second child C2 is
P1 O D G L A H K M B J F C N I E constructed in a similar manner,
first copying the subtour from P2
P2 H G M F O A D K I C N E L B J
C1 G F O A D H K M B J I C N E L
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Order Crossover
Dashed edges
C
P1 B C
D C1 A
B
D show copied
A
E O E subtour
O
F F
N N
G G
M M
H H
L L
I K I
K J J
C B C
B A D
A D
E O E
O
F F
N N
G G
M M
H H
L L
K I
P2 K J
I C2 J
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Adjaceny Representation In Adjacency Representation the
cities are arranged based on
P1 O D G L A H K M B J F C N I E where they come from
w.r.t. the INDEX.
P1 H J N G O C L K E F M A B I D
For example AàH, Bà J, …
A B C D E F G H I J K L M N O Cities INDEX
P2 D J N K L O M G C H I B F E A
P2 H G M F O A D K I C N E L B J
The Adjacency Representation from P2
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Adjaceny Representation This permutation cannot be a tour
P1 B A N G O C L K E F M J H I D because it says
- go from A to B
- go from B to A
…….which is a cycle
A B C D E F GH I J K L MN O
No!
• Heuristic Crossover
– For each city choose the from
that parent (P1 or P2) which is closer
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Alternating Edges - careful
P1 H J N G O C L K E F M A B I D
A B C D E F GH I J K L MN O
P2 D J N K L O M G C H I B F E A
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
A B C D E F G H I J K L M N O
Current numeric index of remaining cities
First replace city O and remove it from the current index
Next replace D and remove it from current index
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Ordinal Representation
Replace the name of the city
Path O D G L A H K M B J F C N I E in Path Representation
one by one
by its current numeric index
15 4 6 10
1 2 3 4 5 6 7 8 9 10 11 12 13 14
A B C D E F G H I J K L M N O
Current numeric index of remaining cities
Observe that for the next city G the current numeric index is 6
And after G is removed L will become 10
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Ordinal Representation
Replace the name of the city
Path O D G L A H K M B J F C N I E in Path Representation
one by one
by its current numeric index
15 4 6 10 1 5 7 7 1 5 3 1 3 2 1
1 2 3 4 5 6 7 8 9 10 11
A B C D E F G H I J K L M N O
Current numeric index of remaining cities
Next is A with the index 1, and indices of all will decrement
And so on….(not showing the contracting index after city A)
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
TSP: Ordinal Representation
Try it out!
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Next
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Emergent Systems
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Emergent Systems
Collections of simple entities organize themselves and a larger more
sophisticated entity emerges. The behaviour of this complex system
is a property that emerges from interactions amongst its components.
• An ant colony is like a living organism that can find food very quickly
• The brain is made up of billions of comparatively simple neurons
• A flock of birds moves in synchrony
• Elaborate termite mounds
• Stock market behaviour
• Formation of sand dunes
• Hurricanes and cyclones
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Conway’s Game of Life John Conway, 1970
The Game of Life is a Cellular Automaton in which cells are alive or dead.
Each cell obeys the following rules to decide its fate in the next time step.
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Chaos and Fractals
A fractal is a never-ending pattern. Fractals are
infinitely complex patterns that are self-similar
across different scales.
Soma or
cell body Myelin
sheath
Axon
Flow of signal
Synapse
Dendrites
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
The Biological Neuron
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
The Human Brain: Massive Connectivity
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
A computational neuron
x1
x2
xn
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Artificial Neural Networks (ANNs) The ANN learns the function through a
process of training,
in which a large number of labeled
patterns are shown as input,
the ANN generates an output,
and the BackProp algorithm
propagates the error back to tune the
weights of the connections.
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Next
Cooperation
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Biosemiotics Road signs for example
Semiotics
1.the study of signs and symbols and their use or interpretation.
Origin late 19th century: from Greek sēmeiotikos ‘of signs’, from
sēmeioun ‘interpret as a sign’.
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Ant Colonies
Ants live in complex social colonies, with the queen being the
leader and the workers foraging for food and protecting their home.
The term "ant colony" describes not only the physical structure in
which ants live, but also the social rules by which ants organize
themselves and the work they do.
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Ants foraging for food
Let 5 ants A,B,C,D and E go out in search for food.
Each ant lays a trail of pheromone where it goes.
A
B
An Ant
Nest E
H
D
C
Ants F, G and H
have emerged
meanwhile
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Ants foraging for food
After some time all other trails are
abandoned and all ants now follow
the trail formed by ant A….
An Ant
Nest
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Ants follow pheromone trails left by ants
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
The ACO Algorithm
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
The ACO Algorithm (more detail)
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
Ant Colony Optimization for TSP
On a city i the kth ant moves to city j with a probability given by,
0 otherwise
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
ACO: Updating Pheromone
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras
End
Randomized Algorithms
Artificial Intelligence: Search Methods for Problem Solving Deepak Khemani, IIT Madras