Copyright R. Weber Search in Problem Solving ISYS 370 Dr. R. Weber.
-
Upload
mark-dawson -
Category
Documents
-
view
213 -
download
0
Transcript of Copyright R. Weber Search in Problem Solving ISYS 370 Dr. R. Weber.
Copy
right
R. W
eber
General Search Algorithm
• identify initial state• expand (generate new states)• choose option• test goal function• expand until goal not attained/no more
states to expand
Copy
right
R. W
eber
General Search Algorithm
search-tree := initial-node loop if there are no leaf nodes then return FAIL else choose a leaf node X according to "strategy" if X is a goal node then return X else expand X add the resulting new leaf node(s) to search-tree end loop
Uninformed search strategies
• breadth-first search• uniform cost search• depth-first search• depth-limited
search• iterative deepening
search• bidirectional search
Informed /heuristic strategies
• best-first search
• A*• Heuristic
functions• memory
bounded search• simulated
annealing• Hill-climbing
Copy
right
R. W
eber
Breadth-first search
• all nodes at depth d are expanded before the nodes at depth d+1
• optimal and complete• if there are more than one, it will find the
shallowest• planning puzzles; large memory
requirements
Copy
right
R. W
eber
Depth-first search
• expands the deepest node to the deepest level of a tree• only expands nodes at shallower levels after reaching the
end• it does not guarantee a solution
(neither complete or optimal)• less memory requirements• may be faster than breadth-first, but it may get stuck
exploring long (potentially infinite) paths, when there is a solution path of less steps
Copy
right
R. W
eber
Uniform cost search
• expands the lowest-cost node• to find the best solution it requires that all operators
have positive costs• route-finding
Copy
right
R. W
eber
depth-limited search
• Improves from depth-first• imposes a bound on the maximum depth of a
path• guarantees that a solution is found if it exists
within the length of the chosen depth • Not guaranteed to be the optimal
iterative deepening search• tries to bound the search iteratively (depth 1, 2,
3, till finds a solution)• it is optimal and complete, like breadth-first
search, but has memory requirements of depth-first search.
Copy
right
R. W
eber
bidirectional search
• start searching from the origin and from the goal and stop when searches meet
Copy
right
R. W
eber
Example problems
• toy problems– used to test search algorithms
• real world problems– used to solve real problems
Copy
right
R. W
eber
Applications of route finding
• Routing in computer networks• Automated travel advisory systems• Airline travel planning• Garbage collection/cleaning trucks• Food/document delivery• Does this mean that search is the only
method to perform route planning??
Copy
right
R. W
eber
Traveling Salesperson Problems
• is a category of problems• each city has to be visited once• goal is to find the shortest tour
Copy
right
R. W
eber
• Exams in university• Nurses in hospitals• Experts in call centers• Crews in different organizations• Scheduling NASA satellites• NFL games
Scheduling
Copy
right
R. W
eber
VLSI layout
• Very large scale integration• Design of silicon chip• Define the position and connections of a
million gates in a chip• Tasks: cell layout, channel routing• Goal is to min area & connection length
Copy
right
R. W
eber
Robot navigation
• Generalization of route finding problem• Any route can be chosen in a continuous space• Possible actions and states in a continuous space
are infinite• The more actions a robot can perform the more
dimensions are needed to describe states and actions
• To identify the result of an action, a robot must use vision
Copy
right
R. W
eber
Assembly sequencing
• Many industries use automatic assembly of objects
• Find an order to assemble parts of an object• Find an order to submit parts to a given process
• Design for autoclave layout
Layout Design
Copy
right
R. W
eber
General route finding algorithm 1. identify initial state as origin2. expand to all possible locations3. choose location with smallest cost/fastest
route/favor highways4. test goal function, is it the destiny?5. if yes, return location
else, return to 2
Copy
right
R. W
eber
General puzzles algorithm 1. identify initial state as origin2. expand to all possible locations3. the blank space changes place with tile on its
right4. test goal function, is it the destiny?5. if yes, return configuration
else, return to 2
Copy
right
R. W
eber
Constraint Satisfaction Problem1. Initial is given by values of variables2. Expand to all possible values3. Variables change values4. Do the variables’ values respect constraints?5. if yes, return values
else, return to 2
– Another class of problems– Design and scheduling problems– Algorithms designed specifically for CSP perform
better than general ones
Copy
right
R. W
eber
Search strategies
When do you solve a problem using a search strategy?
When there is an algorithm to solve it when:• it is guaranteed to find a solution• when it finds a solution in a timely manner• when the memory requirements are reasonable• when it can find the best solution or at least one of
the best• sometimes, one can combine searches to improve
the quality of a solution