• Keine Ergebnisse gefunden

Foundations of Artificial Intelligence 21. Combinatorial Optimization: Advanced Techniques Malte Helmert

N/A
N/A
Protected

Academic year: 2022

Aktie "Foundations of Artificial Intelligence 21. Combinatorial Optimization: Advanced Techniques Malte Helmert"

Copied!
17
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

21. Combinatorial Optimization: Advanced Techniques

Malte Helmert

University of Basel

April 7, 2021

(2)

Dealing with Local Optima Outlook: Simulated Annealing Outlook: Genetic Algorithms Summary

Combinatorial Optimization: Overview

Chapter overview: combinatorial optimization 20. Introduction and Hill-Climbing 21. Advanced Techniques

(3)

Dealing with Local Optima

(4)

Dealing with Local Optima Outlook: Simulated Annealing Outlook: Genetic Algorithms Summary

Example: Local Minimum in the 8 Queens Problem

local minimum:

candidate has 1 conflict all neighbors have at least 2

(5)

Weaknesses of Local Search Algorithms

difficult situations for hill climbing:

local optima: all neighbors worse than current candidate plateaus: many neighbors equally good as current candidate;

none better

German: lokale Optima, Plateaus consequence:

algorithm gets stuck at current candidate

(6)

Dealing with Local Optima Outlook: Simulated Annealing Outlook: Genetic Algorithms Summary

Combating Local Optima

possible remedies to combat local optima:

allowstagnation (steps without improvement) includerandom aspects in the search neighborhood (sometimes) make randomsteps

breadth-first search to better candidate restarts (with new random initial candidate)

(7)

Allowing Stagnation

allowing stagnation:

do not terminate when no neighbor is an improvement limit number of steps to guarantee termination

at end, return best visited candidate

pure search problems: terminate as soon as solution found

Example 8 queens problem:

with a bound of 100 steps solution found in 96% of the cases on average 22 steps until solution found

works very well for this problem;

for more difficult problems often not good enough

(8)

Dealing with Local Optima Outlook: Simulated Annealing Outlook: Genetic Algorithms Summary

Random Aspects in the Search Neighborhood

a possible variation of hill climbing for 8 queens:

Randomlyselect a file; move queen in this file

to square with minimal number of conflicts (null move possible).

2 2 1 2 3 1 2

3 3

2 3 2 3 0

Good local search approaches often combine

randomness(exploration) withheuristic guidance (exploitation).

German: Exploration, Exploitation

(9)

Outlook: Simulated Annealing

(10)

Dealing with Local Optima Outlook: Simulated Annealing Outlook: Genetic Algorithms Summary

Simulated Annealing

Simulated annealingis a local search algorithm that systematically injectsnoise, beginning with high noise, then lowering it over time.

walk with fixed number of steps N (variations possible) initially it is “hot”, and the walk is mostly random over time temperature drops (controlled by a schedule) as it gets colder, moves to worse neighbors become less likely very successful in some applications, e.g., VLSI layout

German: simulierte Abk¨uhlung, Rauschen

(11)

Simulated Annealing: Pseudo-Code

Simulated Annealing (for Maximization Problems) curr:= a random candidate

best:=none

for eacht ∈ {1, . . . ,N}:

if is solution(curr) and(best is none or v(curr)>v(best)):

best:=curr T :=schedule(t)

next:= a random neighbor of curr

∆E :=h(next)−h(curr)

if ∆E ≥0or with probabilitye∆ET : curr:=next

returnbest

(12)

Dealing with Local Optima Outlook: Simulated Annealing Outlook: Genetic Algorithms Summary

Outlook: Genetic Algorithms

(13)

Dealing with Local Optima Outlook: Simulated Annealing Outlook: Genetic Algorithms Summary

Genetic Algorithms

Evolutionoften finds good solutions.

idea: simulate evolution byselection,crossoverandmutation of individuals

ingredients:

encode each candidate as a string of symbols (genome) fitness function: evaluates strength of candidates (= heuristic) population of k (e.g. 10–1000) individuals(candidates) German: Evolution, Selektion, Kreuzung, Mutation, Genom, Fitnessfunktion, Population, Individuen

(14)

Dealing with Local Optima Outlook: Simulated Annealing Outlook: Genetic Algorithms Summary

Genetic Algorithm: Example

example 8 queens problem:

genome: encode candidate as string of 8 numbers fitness: number of non-attacking queen pairs use population of 100 candidates

(15)

Selection, Mutation and Crossover

many variants:

How to select?

How to perform crossover?

How to mutate?

select according to fitness function, followed by pairing

determine crossover points, then recombine

mutation: randomly modify each string position with a certain probability

(16)

Dealing with Local Optima Outlook: Simulated Annealing Outlook: Genetic Algorithms Summary

Summary

(17)

Summary

weakness of local search: local optimaand plateaus remedy: balance explorationagainst exploitation (e.g., with randomnessand restarts)

simulated annealing andgenetic algorithms are more complex search algorithms

using the typical ideas of local search

(randomization, keeping promising candidates)

Referenzen

ÄHNLICHE DOKUMENTE

21.1 Dealing with Local Optima 21.2 Outlook: Simulated Annealing 21.3 Outlook: Genetic Algorithms 21.4 SummaryM. Helmert (University of Basel) Foundations of Artificial

We have already seen this algorithm: Backtracking corresponds to depth-first search Chapter 12 with the following state space: states: partial assignments initial state:

Propositional formulas combine atomic formulas with ¬, ∧, ∨, → to more complex statements. Interpretations determine which atomic formulas are true and which ones

if splitting rule applied, then current formula satisfiable, and if a wrong decision is taken, then this will be recognized without applying further splitting rules (i.e., only

basic idea of abstraction heuristics: estimate solution cost by considering a smaller planning task. formally: abstraction function α maps states to abstract states and thus

Hence the objective of our landmark heuristics is to approximate the optimal delete relaxed heuristic h + as accurately as possible.. More advanced landmark techniques work directly

default policy simulates a game to obtain utility estimate default policy must be evaluated in many positions if default policy is expensive to compute,. simulations

initialize first RL policy network to SL policy network in each iteration, pick a former RL policy network uniformly randomly prevents overfitting to the current policy play with