Professional Documents
Culture Documents
Advanced Intelligent Systems: Fourth Slide: Local Search
Advanced Intelligent Systems: Fourth Slide: Local Search
Table of Contents
1 Motivation
2 Hill-Climbing
3 Simulated Annealing
4 Genetic Algorithm
Advanced Intelligent Systems
Motivation
Motivation
Table of Contents
1 Motivation
2 Hill-Climbing
3 Simulated Annealing
4 Genetic Algorithm
Advanced Intelligent Systems
HC
function Simple-Hill-Climbing(problem)
current ←MAKE-NODE(problem.INITIAL-STATE)
repeat
repeat
action ← select an action not yet applied from
problem.ACTIONS(current)
until f(SUCCESSOR(current,action)) > f(current) or no more actions
if f(SUCCESSOR(current,action)) > f(current)
current ← SUCCESSOR(current,action)
until no more actions
return current
Advanced Intelligent Systems
HC
function Steepest-Ascent-Hill-Climbing(problem)
neighbour ←MAKE-NODE(problem.INITIAL-STATE)
repeat
current ← neighbour
for each action in problem.ACTIONS(current)
if f(SUCCESSOR(current,action)) > f(neighbour )
neighbour ← SUCCESSOR(current,action)
until current == neighbour
return current
Advanced Intelligent Systems
HC
Table of Contents
1 Motivation
2 Hill-Climbing
3 Simulated Annealing
4 Genetic Algorithm
Advanced Intelligent Systems
SimA
Simulated Annealing
SA Algorithm
Advanced Intelligent Systems
GenAlg
Table of Contents
1 Motivation
2 Hill-Climbing
3 Simulated Annealing
4 Genetic Algorithm
Advanced Intelligent Systems
GenAlg
Genetic Algorithm - 1
Genetic Algorithm - 2
Advanced Intelligent Systems
GenAlg
GA Operations
Advanced Intelligent Systems
GenAlg
Genetic Algorithm - 2
Advanced Intelligent Systems
GenAlg
Proportional Selection
function Roulette-Wheel(ϕs )
sum = ϕs (x1 )
r = random(0,1)
while (r ¡ sum)
i=i+1
sum = sum + ϕs (xi )
return xi
requires ns calls, with a high variance in the number of offspring
Advanced Intelligent Systems
GenAlg
Universal Sampling
function Universal-Sampling(ϕs )
for i = 1 to ns do λi = 0
r = random(0,1/λ) //λ is the total number of offspring
sum = 0
for i = 1 to ns do
sum = sum + ϕs (xi )
while r < sum
λi = λi + 1
r = r + 1/λ
return (λ1 , λ2 , . . . , λns )
Advanced Intelligent Systems
GenAlg
Tournament Selection
Rank-based Selection
Other Techniques