Best-First Search: Agendas

Slides:



Advertisements
Similar presentations
Heuristic Searches. Feedback: Tutorial 1 Describing a state. Entire state space vs. incremental development. Elimination of children. Closed and the solution.
Advertisements

Heuristic Search techniques
Announcements Course TA: Danny Kumar
Conceptual Clustering
Ch 4. Heuristic Search 4.0 Introduction(Heuristic)
Traveling Salesperson Problem
Iterative Deepening A* & Constraint Satisfaction Problems Lecture Module 6.
Problem Solving by Searching Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 3 Spring 2007.
Heuristic Search Chapter 3.
Solving Problem by Searching
October 1, 2012Introduction to Artificial Intelligence Lecture 8: Search in State Spaces II 1 A General Backtracking Algorithm Let us say that we can formulate.
ICS-171:Notes 4: 1 Notes 4: Optimal Search ICS 171 Summer 1999.
Branch & Bound Algorithms
CSC 423 ARTIFICIAL INTELLIGENCE
Problem Solving and Search in AI Part I Search and Intelligence Search is one of the most powerful approaches to problem solving in AI Search is a universal.
Algorithm Strategies Nelson Padua-Perez Chau-Wen Tseng Department of Computer Science University of Maryland, College Park.
Review: Search problem formulation
Branch and Bound Searching Strategies
1 Using Search in Problem Solving Part II. 2 Basic Concepts Basic concepts: Initial state Goal/Target state Intermediate states Path from the initial.
Constraint Logic Programming Ryan Kinworthy. Overview Introduction Logic Programming LP as a constraint programming language Constraint Logic Programming.
1 Optimisation Although Constraint Logic Programming is somehow focussed in constraint satisfaction (closer to a “logical” view), constraint optimisation.
Constraint Satisfaction Problems
Using Search in Problem Solving
Uninformed Search Reading: Chapter 3 by today, Chapter by Wednesday, 9/12 Homework #2 will be given out on Wednesday DID YOU TURN IN YOUR SURVEY?
Problem Solving and Search in AI Heuristic Search
CS121 Heuristic Search Planning CSPs Adversarial Search Probabilistic Reasoning Probabilistic Belief Learning.
Chapter 5 Outline Formal definition of CSP CSP Examples
Solving problems by searching
Backtracking.
Brute Force Search Depth-first or Breadth-first search
Heuristic Search Heuristic - a “rule of thumb” used to help guide search often, something learned experientially and recalled when needed Heuristic Function.
Heuristic Search Techniques
Copyright R. Weber Search in Problem Solving Search in Problem Solving INFO 629 Dr. R. Weber.
Informed Search Strategies
CP Summer School Modelling for Constraint Programming Barbara Smith 1.Definitions, Viewpoints, Constraints 2.Implied Constraints, Optimization,
Introduction to search Chapter 3. Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l inference l all learning.
Introduction to search Chapter 3. Why study search? §Search is a basis for all AI l search proposed as the basis of intelligence l all learning algorithms,
Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.
State-Space Searches. 2 State spaces A state space consists of A (possibly infinite) set of states The start state represents the initial problem Each.
A RTIFICIAL I NTELLIGENCE UNIT : 2 Search Techniques.
CP Summer School Modelling for Constraint Programming Barbara Smith 2. Implied Constraints, Optimization, Dominance Rules.
Chapter 3 Heuristic Search Techniques
For Monday Read chapter 4, section 1 No homework..
Review: Tree search Initialize the frontier using the starting state While the frontier is not empty – Choose a frontier node to expand according to search.
Lecture 3: Uninformed Search
Search CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Chapter 3 Algorithms Complexity Analysis Search and Flow Decomposition Algorithms.
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
Basic Problem Solving Search strategy  Problem can be solved by searching for a solution. An attempt is to transform initial state of a problem into some.
Problem Reduction So far we have considered search strategies for OR graph. In OR graph, several arcs indicate a variety of ways in which the original.
Introduction to State Space Search
AND/OR graphs  Some problems are best represented as achieving subgoals, some of which achieved simultaneously and independently (AND)  Up to now, only.
Assumption-based Truth Maintenance Systems: Motivation n Problem solvers need to explore multiple contexts at the same time, instead of a single one (the.
Best-first search is a search algorithm which explores a graph by expanding the most promising node chosen according to a specified rule.
CSC317 1 At the same time: Breadth-first search tree: If node v is discovered after u then edge uv is added to the tree. We say that u is a predecessor.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Dept. Computer Science, Korea Univ. Intelligent Information System Lab A I (Artificial Intelligence) Professor I. J. Chung.
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
CSPs: Search and Arc Consistency Computer Science cpsc322, Lecture 12
Artificial Intelligence Problem solving by searching CSC 361
Problem Reduction -AND-OR Graph -AO* Search CSE 402 K3R23/K3R20.
Searching for Solutions
CIS 488/588 Bruce R. Maxim UM-Dearborn
BEST FIRST SEARCH -OR Graph -A* Search -Agenda Search CSE 402
CSE (c) S. Tanimoto, 2001 Search-Introduction
Constraints and Search
CSE (c) S. Tanimoto, 2002 State-Space Search
CSE (c) S. Tanimoto, 2004 State-Space Search
Unit II Game Playing.
Presentation transcript:

Best-First Search: Agendas An agenda is a list of tasks a system could perform. Associated with each task there are usually two things: a list of reasons why the task is being proposed (often called justifications) and a rating representing the overall weight of evidence suggesting that the task would be useful.

An agenda-driven system operates by cycling through the following sequence of operations: 1.        Choose the most promising task from the agenda. It can be thought of as an explicit statement of what to do next or simply as an indication of the next node to be expanded. 2.        Execute the task by devoting to it the number of resources determined by its importance. The important resources to consider are time and space.

Executing the task will probably generate additional tasks (successor nodes). For each of them, do the following:

a) See if it is already on the agenda a) See if it is already on the agenda. If so, then see if this same reason for doing it is already on its list of justifications. If so, ignore this current evidence. If this justification was not already present, add it to the list. If the task was not on the agenda, insert it.

b) Compute the new task's rating, combining the evidence from all its justifications. Not all justifications need have equal weight.

There are some problem domains for which an agenda mechanism is inappropriate. The agenda mechanism assumes that if there is good reason to do something now, then there will also be the same good reason to do something later unless something better comes along in the interim. But this is not always the case, particularly for systems that are interacting with people.

Person:. I don't want to read any more about China Person: I don't want to read any more about China. Give me something else.  Computer: Ok. What else are you interested in? Person: How about Italy? I think I'd find Italy fascinating.  Computer: What things about Italy are you interested in reading about?  Person: I think I'd like to start with its history. Computer: Why don't you want to read any more about China?

It would have been fine to have tried to find out why the person was no longer interested in China right after he mentioned it. The computer chose instead to try to find a new area of positive interest, also a very reasonable thing to do. But in conversations, the fact that something is reasonable now does not mean that it will continue to be so after the conversation has proceeded for a while.

Problem Reduction So far, we have considered search strategies for OR graphs through which we want to find a single path to a goal. Such structures represent the fact that we will know how to get from a node to a goal state if we can discover how to get from that node to a goal state along any one of the branches leaving it.

And/OR graph

the AND-OR graph (or tree), is useful for representing the solution of problems that can be solved by decomposing them into a set of smaller problems, all of which must then be solved. This decomposition, or reduction, generates arcs that we will call AND arcs. One AND arc may point to any number of successor nodes, all of which must be solved in order for the arc to point to a solution.

In order to find solutions in an AND-OR graph, we need an algorithm similar to A*, but with the ability to handle the AND arcs appropriately. This algorithm should find a path from the starting node of the graph to a set of nodes representing solution states. It may be necessary to get to more than one solution state since each arm of an AND arc must lead to its own solution node.

the A* algorithm is not adequate for searching AND-OR graphs

The top node, A, has been expanded, producing two arcs, one leading to B and one leading to C and D. The numbers at each node represent the value of f ‘ at that node. We will assume, for simplicity, that every operation has a uniform cost, so each arc with a single successor will have a cost of 1 and each AND arc with multiple successors will have a cost of 1 for each of its components.

If we look just at the nodes and choose for expansion the one with the lowest f value, we must select C. But using the information now available, it would be better to explore the path going through B since to use C we must also use D, for a total cost of 9 (D + C + 2) The problem is that the choice of node to expand next must depend not only on the f’ value of that node but also on whether that node is part of the current best path from the initial node.

The most promising single node is G, with an f’ value of 3 The most promising single node is G, with an f’ value of 3. It is even part of the most promising arc G-H, with a total cost of 9. But that arc is not part of the current best path, since to use it we must also use the arc I-J, with a cost of 27. The path from A, through B, to E and F is better, with a total cost of 18. So we should not expand G next; rather we should examine either E or F.

To search an implicit AND-OR graph, it is necessary to do three things at each step: · Traverse the graph, starting at the initial node and following the current best path, and accumulate the set of nodes that are on that path and have not yet been expanded. ·  Pick one of these unexpanded nodes and expand it. Add its successors to the graph and compute f’

Change the f’ estimate of the newly expanded node to reflect the new information provided by its successors. Propagate this change backward through the graph. At each node that is visited while going up the graph, decide which of its successor arcs is the most promising and mark it as part of the current best path. This may cause the current best path to change.

A (5) Before step 1 Before step 3 The operation of the AO* algorithm

In the A* algorithm, the desired path from one node to another was always the one with the lowest cost. But this is not always the case when searching an AND-OR graph.

Constraint Satisfaction Many problems in A.I. can be viewed as problems of constraint satisfaction in which the goal is to discover some problem state that satisfies a given set of constraints.

Examples of this sort of problem include cryptarithmetic puzzles. Many design tasks can also be viewed as constraint-satisfaction problems in which a design must be created within fixed limits on time, cost, and materials.

Constraint-satisfaction problems do not require a new search method all their own; they can be solved using any of the search strategies we have already discussed.

The structure of these problems makes it useful to augment the description of the problem state with a list of constraints that changes as pieces of the problem are solved, and to augment the search mechanism to manipulate that list.

Thus the single process of searching for a solution to the problem is performed by two concurrent searches, one of which operates in the problem space of lists of constraints, the other of which operates in the original problem space but the rule patterns and the heuristic function make reference to the current position in the constraint space.

The general form of the constraint-satisfaction procedure is the following: Until a complete solution is found or until all paths have led to deadends, do: Select an unexpanded node of the search graph. Apply the constraint inference rules to the selected node to generate all possible new constraints. If the set of constraints contains a contradiction, then report that this path is a deadend. If the set of constraints describes a complete solution, then, report success. If neither a contradiction nor a complete solution has been found, then apply the problem space rules to generate new partial solutions that are consistent with the current set of constraints.

Example: cryptarithmetic problem The goal state is a problem state in which all letters have been assigned a digit in such a way that all constraints are satisfied.

The solution process proceeds in cycles The solution process proceeds in cycles. At each cycle, two things are done: l. Apply the constraint inference rules to generate any relevant new constraints. 2. Apply the letter assignment rules to perform all assignments required by the current set of constraints. Then choose another rule to generate an additional assignment, which will, in turn, generate new constraints at the next cycle.

Problem SEND + MORE MONEY Constraints No two letters have the same value. The constraints of arithmetic.

Initial Problem state S = ? Cl = ? E=? C2 = ? N=? C3 = ? D = ? C4 = ? M = ? O = ? R=? Y = ?

At each cycle, there may be several choices of rules to apply. A few useful heuristics can help to select the best rule to apply first. For example, if there is a letter that has only two possible values and another with six possible values, there is a better chance of guessing right on the first than on the second.

This procedure can be implemented as a depth-first search so that a large number of intermediate positions in both the problem and the constraint spaces will not have to be stored. Often several rules are not mutually exclusive so they can all be applied together and viewed as one step.

  Solving a Cryptarithmetic Problem

Initially, the constraint generator runs. It observes that: M = 1, since two single-digit numbers plus a carry cannot total more than 19. S = 8 or 9, since S + M + C3 > 9 (to generate the carry) and M = 1, S + 1 +C3 > 9, so S + C3 >8 and C3 is at most 1. O = 0, since S + M(1) + C3( = <1) must be at least 10 to generate a carry and it can be at most 11. But M is already 1, so O must be 0.

Then the process of solving the real problem begins. The values of M and O are derived immediately from the constraints. To make progress, we must now guess. Suppose E is assigned the value 2. Now the next cycle begins.

The constraint generator observes that: N = 3, since N = E + O + C2 = 2 + 0+ 1=3. C2 must be 1 because, if it were not, N would have to be equal to E. R = 8 or 9, since R + N(3) + C1(1 or 0) = 2 or 12. But three positive integers cannot sum to 2. Thus R + 3 + (1 or 2) = 12 and R = 8 or 9.

The constraint generator chose 2 + D = 10 + Y first The constraint generator chose 2 + D = 10 + Y first. This led to one additional constraint being generated: D>7. Since 2 + D must be at least 10 to cause a carry, D must be at least 8.

Now control is passed to the problem solver. It can record immediately that N is 3. Now it must guess at something. It chooses to guess at the heavily constrained variable D, which must be either 8 or 9.

At the next cycle, D = 8 is seen to lead to a contradiction. So the problem solver backtracks and tries D = 9, which also leads to a contradiction.

This causes the entire process to backtrack to the last choice point, which this time was in the constraint generator. It now knows that 2 + D = Y and Cl =0. The process can continue from there.