Download presentation
Presentation is loading. Please wait.
1
Problem Solving Agents
Blind and Informed Searches
2
Problem Solving Agent
3
Problem Types Well defined Non well defined Initial state
Operator(Successor and predecessor Functions) Goal Test Path cost function Non well defined Missing at least on criteria
4
Example 1: TSM In Romania
On holiday in Romania; currently in Arad. Formulate goal: be in Bucharest Formulate problem: states: various cities actions: drive between cities Find solution: sequence of cities, e.g., Arad, Sibiu, Fagaras, Bucharest Goal Test> Are we in Bucharest. Cost Function> Sum of road lengths to the destination
5
TSM In Romania
6
Example 2: 8-Puzzel
7
Example 2: 8-Puzzel states??: integer locations of tiles (ignore intermediate positions) actions??: move blank left, right, up, down (ignore unjamming etc.) transition model??: effect of the actions goal test??: = goal state (given) path cost??: 1 per move [Note: optimal solution of n-Puzzle family is NP-hard]
8
Example Problems Toy problems Real-world problems vacuum cleaner agent
8-puzzle 8-queens Crypt arithmetic missionaries cannibals Real-world problems route finding traveling salesperson VLSI layout robot navigation assembly sequencing
9
Search Know the fundamental search strategies and algorithms
uninformed search breadth-first, depth-first, uniform-cost, iterative deepening, bidirectional informed search best-first (greedy, A*), heuristics, memory-bounded Evaluate the suitability of a search strategy for a problem completeness, optimality, time & space complexity
10
Searching for Solutions
Traversal of some search space from the initial state to a goal state legal sequence of actions as defined by operators The search can be performed on On a search tree derived from expanding the current state using the possible operators Tree-Search algorithm A graph representing the state space Graph-Search algorithm
11
Searching for Solutions
12
Uninformed search strategies
Uninformed strategies use only the information available in the problem definition Breadth-first search Uniform-cost search Depth-first search Depth-limited search Iterative deepening search Bidirectional Search
13
BFS Expand shallowest unexpanded node (shortest path in the frontier)
14
Evaluation b: branching factor d: depth of the shallowest goal node
m: depth of stop l: current depth N: Total number of genretaed Nodes
15
Evaluation Complete?? Yes (if b is finite)
Optimal?? Yes (if cost = 1 per step); not optimal in general Time?? b^d Number of nodes generated: 1 + b + b^2 + … + b^d Space?? b^d Space is the big problem; can easily generate nodes at 100MB/sec so 24hrs = 8640GB.
16
Uniform-cost search Expand first least-cost path (Equivalent to breadth-first if step costs all equal) Implementation: fringe = priority queue ordered by path cost, lowest first
17
Depth First Search
18
DFS Depth first search is another way of traversing graphs, which is closely related to preorder traversal of a tree. Recall that preorder traversal simply visits each node before its children. It is most easy to program as a recursive routine. Complete?? No Optimal?? No Time?? b^d Space?? b*d
19
Depth limited search A version of DFS in which l is defined by an expert There is a chance of converging to local optima Complete?? Yes(if l>d) Optimal?? Yes Time?? b^l Space?? b*l
20
Iterative Deeping Search(IDS)
This search strategy always expands one node to the deepest level of the tree. Only when a dead-end is encountered does the search backup and expand nodes at shallower levels. N=(d+1)1+(d)b+(d-1)b2+...+(3)bd-2+(2)bd-1+bd
21
IDS Evaluation Complete?? Yes Optimal?? Yes Time?? b^d Space?? b.d
22
Bidirectional search Idea: Run two simultaneous searches.
One Forward from initial state One Backward from goal state Until two fingers met
23
Summary
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.