Beyond Classical Search




CS156

Chris Pollett

Feb 20, 2012

Outline

Introduction

Local Search

Quiz

Which of the following is true?

  1. Effective branching factor can help in determining which heuristic is better amongst a group of `A^star` heuristics.
  2. Coroutines are functions which output a sequence of values when their next() method is called
  3. Python does not support multiple inheritance of classes.

Hill Climbing

function HILL_CLIMBING(problem) returns a state that is a local maximum
    current := MAKE_NODE(problem, INITIAL-STATE)
    loop do
        neighbor := a highest-valued successor of current
        if(neighbor.value ≤ current.value) return current.state
        current := neighbor

Hill Climbing

two 8-queens boards, one with h=17, one with h=1

Variants of Hill-Climbing

Simulated Annealing

Simulated Annealing Algorithm

function SIMULATED-ANNEALING(problem, schedule) returns a solution state
    inputs: problem, a problem
            schedule, a mapping from time "temperature"
    current := MAKE-NODE(problem, INITIAL_STATE)
    for t = 1 to infty do
        T := schedule(t) //typically as t gets larger schedule(t) is smaller
        if(T == 0) return current //when Temperature is 0 return state
        next := a randomly selected successor of current
        DeltaE := next.value - current.value //estimated change in energy
        if(DeltaE > 0) current := next 
        else current := next with probability e^(DeltaE/T)

Local Beam Search

Local Search via Genetic Algorithms

8-queen GA example