Search Algorithms: Best-First, Greedy, A*, Hill Climbing, Simulated Annealing, Slides of Introduction to Computing

An overview of various search algorithms, including best-first, greedy, a*, hill climbing, simulated annealing, genetic algorithm, and constraint satisfaction. It covers both uninformed and informed strategies, as well as local search algorithms. Examples and exercises.

Typology: Slides

2017/2018

Uploaded on 12/26/2018

mmelsherbiny1
mmelsherbiny1 🇪🇬

5

(2)

25 documents

1 / 160

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Introduction to Artificial Intelligence
Lecture 4 c
Local Search for Optimization Problems
Dr. Kamel A. El Hadad
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
pf4b
pf4c
pf4d
pf4e
pf4f
pf50
pf51
pf52
pf53
pf54
pf55
pf56
pf57
pf58
pf59
pf5a
pf5b
pf5c
pf5d
pf5e
pf5f
pf60
pf61
pf62
pf63
pf64

Partial preview of the text

Download Search Algorithms: Best-First, Greedy, A*, Hill Climbing, Simulated Annealing and more Slides Introduction to Computing in PDF only on Docsity!

Introduction to Artificial Intelligence

Lecture 4 c

Local Search for Optimization Problems

Informed (Heuristic) Search Methods

  1. Traditional informed search strategies (Best First Search): 9 Greedy Best first search 9 A search* 9 Memory-Bounded Search (search algorithms that try to conserve memory)
  • iterative deepening A* (IDA*)
  • Recursive best-first search (RBFS)
  • simplified memory-bounded A* (SMA) 9 Problem Reduction (AND-OR graph and AO)
  1. Local Search Algorithms: 9 Hill Climbing, 9 Simulated Annealing, 9 **Genetic Algorithm
  2. Constraint Satisfaction problems (CSP)**

Exercise: Search Algorithms

The following figure shows a portion of a partially expanded search tree. Each arc between nodes is labeled with the cost of the corresponding operator, and the leaves are labeled with the value of the heuristic function,h. Which node (use the node’s letter) will be expanded next by each of the following search algorithms? (a) Depth-first search (b) Breadth-first search (c) Uniform-cost search (d) Greedy search (e) A* search^5 D 5

A

C 4 5

19

6

3

h=

B

E F G h=10 h=12 h=8 h=

h= H

h=

h=

Depth-first search

Node queue: initialization

state depth path cost parent

1 A 0 0 --

Depth-first search

Node queue: add successors to queue front; empty queue from top

state depth path cost parent

5 E 2 7 2 6 F 2 8 2 7 G 2 8 2 8 H 2 9 2 2 B 1 3 1 3 C 1 19 1 4 D 1 5 1 1 A 0 0 --

Depth-first search

Node queue: add successors to queue front; empty queue from top

state depth path cost parent

5 E 2 7 2 6 F 2 8 2 7 G 2 8 2 8 H 2 9 2 2 B 1 3 1 3 C 1 19 1 4 D 1 5 1 1 A 0 0 --

Breadth-first search

Node queue: initialization

state depth path cost parent

1 A 0 0 --

Breadth-first search

Node queue: add successors to queue end; empty queue from top

state depth path cost parent

1 A 0 0 -- 2 B 1 3 1 3 C 1 19 1 4 D 1 5 1

Breadth-first search

Node queue: add successors to queue end; empty queue from top

state depth path cost parent

1 A 0 0 -- 2 B 1 3 1 3 C 1 19 1 4 D 1 5 1 5 E 2 7 2 6 F 2 8 2 7 G 2 8 2 8 H 2 9 2

Exercise: Search Algorithms

The following figure shows a portion of a partially expanded search tree. Each arc between nodes is labeled with the cost of the corresponding operator, and the leaves are labeled with the value of the heuristic function,h. Which node (use the node’s letter) will be expanded next by each of the following search algorithms? (a) Depth-first search (b) Breadth-first search (c) Uniform-cost search (d) Greedy search (e) A* search^5 D 5

A

C 4 5

19

6

3

h=

B

E F G h=10 h=12 h=8 h=

h= H

h=

h=

Uniform-cost search

Node queue: add successors to queue so that entire queue is sorted by path cost so far; empty queue from top

state depth path cost parent

1 A 0 0 -- 2 B 1 3 1 3 D 1 5 1 4 C 1 19 1

Uniform-cost search

Node queue: add successors to queue so that entire queue is sorted by path cost so far; empty queue from top

state depth path cost parent

1 A 0 0 -- 2 B 1 3 1 3 D 1 5 1 5 E 2 7 2 6 F 2 8 2 7 G 2 8 2 8 H 2 9 2 4 C 1 19 1

UCS Example

Open list: C

UCS Example

Open list: B(2) T(1) O(3) E(2) P(5)