ai-lect5

ai-lect5 - Recall breadth-first search step by step 1...

This preview shows pages 1–14. Sign up to view the full content.

1 Recall: breadth-first search, step by step

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Implementation of search algorithms Function  General-Search(problem, Queuing-Fn)  returns  a solution, or failure nodes   make-queue(make-node(initial-state[problem])) loop do if  nodes is empty  then return  failure node   Remove-Front(nodes) if  Goal-Test[problem] applied to State(node) succeeds  then return  node nodes   Queuing-Fn(nodes, Expand(node, Operators[problem])) end Queuing-Fn( queue elements )  is a queuing function that inserts a set of  elements into the queue and determines the order of node expansion .   Varieties of the queuing function produce varieties of the search algorithm.
3 Recall: breath-first search, step by step

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 Breadth-first search Node queue: initialization # state depth path cost parent # 1 Arad 0 0 --
5 Breadth-first search Node queue: add successors to queue end; empty queue from top # state depth path cost parent # 1 Arad 0 0 -- 2 Zerind 1 1 1 3 Sibiu 1 1 1 4 Timisoara 1 1 1

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 Breadth-first search Node queue: add successors to queue end; empty queue from top # state depth path cost parent # 1 Arad 0 0 -- 2 Zerind 1 1 1 3 Sibiu 1 1 1 4 Timisoara 1 1 1 5 Arad 2 2 2 6 Oradea 2 2 2 (get smart: e.g., avoid repeated states like node #5)
7 Depth-first search

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 Depth-first search Node queue: initialization # state depth path cost parent # 1 Arad 0 0 --
9 Depth-first search Node queue: add successors to queue front; empty queue from top # state depth path cost parent # 2 Zerind 1 1 1 3 Sibiu 1 1 1 4 Timisoara 1 1 1 1 Arad 0 0 --

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
10 Depth-first search Node queue: add successors to queue front; empty queue from top # state depth path cost parent # 5 Arad 2 2 2 6 Oradea 2 2 2 2 Zerind 1 1 1 3 Sibiu 1 1 1 4 Timisoara 1 1 1 1 Arad 0 0 --
11 Last time: search strategies Uninformed:  Use only information available in the problem formulation Breadth-first Uniform-cost Depth-first Depth-limited Iterative deepening Informed:  Use heuristics to guide the search Best first: Greedy search A* search

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
12 Last time: search strategies Uninformed:  Use only information available in the problem formulation Breadth-first Uniform-cost Depth-first Depth-limited Iterative deepening Informed:  Use heuristics to guide the search Best first: Greedy search  --  queue first nodes that maximize heuristic “desirability”  based on estimated path cost from current node to goal; A* search –  queue first nodes that minimize sum of path cost so far and  estimated path cost to goal.
13 This time Iterative improvement Hill climbing Simulated annealing

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 33

ai-lect5 - Recall breadth-first search step by step 1...

This preview shows document pages 1 - 14. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online