Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSE 4705 Artificial Intelligence

Similar presentations


Presentation on theme: "CSE 4705 Artificial Intelligence"— Presentation transcript:

1 CSE 4705 Artificial Intelligence
Jinbo Bi Department of Computer Science & Engineering

2 Informed search strategies

3 Dominance

4 Iterative deepening A* and beyond

5 Iterative deepening A* and beyond

6 Informed search II When A* fails – hill climbing, simulated annealing
Genetic algorithms

7 Outline

8 Local search and optimization

9 Hill climbing

10 Hill climbing on a surface of states

11 Hill climbing search

12 Hill climbing search example
4

13 Hill climbing search example: n-queens

14 Hill climbing search example: 8-queens

15 Hill climbing search space features

16 Hill climbing (variant)
If we only know the function value at a state x, Hill Climbing ( or downhill) If besides the function value, we can compute gradient, Gradient ascent ( or descent)

17 Hill climbing (variant)
If we only know the function value at a state x, and the state space is finite Hill Climbing ( or downhill) If besides the function value, we can compute gradient, and the state space is continuous Gradient ascent ( or descent)

18 Gradient ascent/descent
Requires line search to decide a step size: (1) exact line search, solve a one-dimensional optimization problem (2)inexact line search (Armijo-Goldstein)

19 Gradient ascent/descent example
min f(x,y) = (x-2)2 + (y-3)2 Initial guess is (1,1), find the optimal solution. Compute gradient f’(x,y) = ( 2(x-2), 2(y-3) ) f’(1,1) = (-2, -4) Set x = (1,1) – s * (-2,-4) Do a line search to find s g(s) = (2s-1)2 + (4s-2)2 = 20s2 – 20s + 5 g’(s) = 40s – 20 = 0 s = 0.5 Hence, x = (2, 3) Check if x is the fixed point

20 Gradient ascent/descent example
From wikipedia

21 Gradient ascent/descent example

22 Gradient methods vs. Newton’s method

23 Drawbacks of hill climbing
Local Maxima: peaks that are not the highest point in the space Plateaus: the space has a broad flat region that gives the search algorithm no direction (random walk) Ridges: drop-offs to the sides; steps to the North, East, South and West may go down, but a step to the NW may go up.

24 Example of a local maximum

25 The Shape of an Easy Problem (Convex)

26 The Shape of a Harder Problem

27 The Shape of an even Harder Problem

28 Random restart – a remedy to the drawbacks

29 Local beam search

30 Simulated annealing

31 Simulated annealing (SA)

32 Simulated annealing (SA)

33 Simulated annealing algorithm
Example of simulated annealing Example codes

34 Simulated annealing example
h = 1, t=1, T = T0/2 = 50 Because T ~= 0, so Next = a random move Δ E = E1 – E0 = 1 If Δ E < 0, Current = Next Else compute p = e (- Δ E/T) =0.98 Generate a random number r from a uniform [0,1] Assume r = 0.8 Then, Current = Next Initial state T0 = 100 Annealing schedule is T T/2

35 Simulated annealing example
h = 1, t=1, T = T0/2 = 50 Because T ~= 0, so Next = a random move Δ E = E1 – E0 = 1 If Δ E < 0, Current = Next Else compute p = e (- Δ E/T) =0.98 Generate a random number r from a uniform [0,1] Assume r = 0.8 Then, Current = Next Initial state T0 = 100 Annealing schedule is T T/2

36 Simulated annealing (variant)
Another annealing scheduling

37 Genetic algorithms

38 Genetic algorithms

39 Representation: strings of genes

40 Encoding of a chromosome

41 Example: genetic algorithms for drive train

42 Operations: crossover

43 Operations: mutation

44 The basic genetic algorithm
A short video explains GA in 3 minutes

45 Genetic algorithm: 8-queens

46 Questions?


Download ppt "CSE 4705 Artificial Intelligence"

Similar presentations


Ads by Google