3. Problem Types
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
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
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
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
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
22. Bidirectional search
Idea: Run two simultaneous searches.
One Forward from initial state
One Backward from goal state
Until two fingers met