KEMBAR78
problem space and problem definition in ai | PPTX
PROBLEMS,
PROBLEM SPACES
AND SEARCH
1
CONTENTS
2
• Defining the problem as a State Space Search
• Production Systems
• Control Strategies
• Breadth First Search
• Depth First Search
• Heuristic Search
• Problem Characteristics
• Is the Problem Decomposable?
• Can Solution Steps be ignored or undone?
• Production system characteristics
• Issues in the design of search programs
To Build a System to Solve a Particular Problem,
The Following Four Things are Needed
1. Define the problem precisely- specify both initial
and final situations(state)
2. Analyze the problem
3. Isolate and represent the task knowledge that is
necessary to solve the problem
4. Choose the best problem solving technique and
apply it
3
STATE SPACE SEARCH
PROBLEM = SEARCHING FOR A GOAL STATE
It is a process in which successive configurations or states of an
instance are considered , with the goal of finding a goal state with a
desired property
. State space- a set of states that a problem can be in.
- The group consisting of all the attainable states of a
problem
ex: Customers in a line would have state space {0,1,2….}
4
SEARCH PROBLEM
S: the full set of states
S0 :the initial state
A:SS set of operators
G : the set of final states.
G is subset of S
Search problem:
Find a sequence of actions which
transforms the agent from the
initial state to goal state.
5
REPRESENTING SEARCH PROBLEMS
Using directed graph
- The states are represented as nodes
- The allowed actions are represented as arcs.
6
PROBLEM FORMULATION
• A single state problem formulation is defined by four items
Initial state, successor function, goal test and path cost
• Problem formulation means choosing a relevant set of states
to consider, and a feasible set of operators for moving from
one state to another
• Search is the process of imagining sequences of operators
applied to the initial state and checking which sequence
reaches a goal state.
7
EXAMPLES.
Problem: On holiday in Singapur; currently in Mysur. Flight
leaves tomorrow from Bangalore. Find a short route to drive
to Bangalore.
Formulate problem:
states: various cities
actions: drive between cities
solution: sequence of cities
Path Cost: distance travelled
8
VACUUM WORLD STATE SPACE
9
States: Dirt and Robot Location
Actions: Left, right, clean
Goal test: No dirt at all locations
Path cost: 1 per action
THE 8 - PUZZLE
10
THE 8 - PUZZLE
States: Locations of tiles
Actions: Move blank left, right, up, down
Goal test: Given
Path cost: 1 per move
11
STATE SPACE SEARCH:
PLAYING CHESS
• Each position can be described by an 8 by 8 array.
• Initial position is the game opening position.
• Goal position is any position in which the opponent does not
have a legal move and his or her king is under attack.
• Legal moves can be described by a set of rules:
-Left sides can be described by a set of rules
-Right sides describe the new resulting state
12
Playing chess contd…
• State space is a set of legal positions.
• Starting at the initial state.
• Using the set of rules to move from one state to another.
• Attempting to end up in a goal state.
13
PLAYING CHESS CONTD..
14
One Legal Chess move
PLAYING CHESS CONTD..
• Writing the rules like above leads to very large number
• These rule poses serious practical difficulties
- No person could ever supply a complete set of rules. It
would take too long and could certainly not be done
without mistakes
- No program could easily handle all those rules.
15
PLAYING CHESS CONTD..
ANOTHER WAY TO DESCRIBE THE CHESS MOVES
White pawn at
Square(file e, rank 2) Move a pawn from
AND Square(file e, rank 2)
Square(file e, rank 3) is empty  to
AND Square(file e, rank 4)
Square(file e, rank 4) is empty
16
THE WATER JUG PROBLEM
17
Given two jugs, a 4-gallon and 3-gallon, neither has any measuring maskers on it. There is a pump that
can be used to fill the jugs with water. How can you get exactly 2 gallons of water into the 4-gallon jug?
1 Gallon = 3.785 Liter
THE WATER JUG PROBLEM
The state space for this problem can be described as the set of
ordered pairs of integers (x,y) such that x = 0, 1,2, 3 or 4 and
y = 0,1,2 or 3; x represents the number of gallons of water in
the 4-gallon jug and y represents the quantity of water in 3-
gallon jug
The start state is (0,0)
The goal state is (2,n)
18
PRODUCTION RULES FOR WATER
JUG PROBLEM
The operators to be used to solve the problem can be described as follows:
19
PRODUCTION RULES
20
TO SOLVE THE WATER JUG
PROBLEM
• Required a control structure that loops through a simple
cycle in which some rule whose left side matches the
current state is chosen
• the appropriate change to the state is made as described
in the corresponding right side
• the resulting state is checked to see if it corresponds to
goal state.
21
One solution to the water jug problem
Shortest such sequence will have a impact on the choice of appropriate
mechanism to guide the search for solution.
22
PRODUCTION SYSTEMS
TO STRUCTURE AI PROGRAMS
A production system consists of:
• A set of rules, each consisting of a left side that determines the applicability
of the rule and a right side that describes the operation to be performed if that rule
is applied.
• One or more knowledge/databases that contain whatever information is
appropriate for the particular task. Some parts of the database may be permanent,
while other parts of it may pertain only to the solution of the current problem.
• A control strategy that specifies the order in which the rules will be
compared to the database and a way of resolving the conflicts that arise when
several rules match at once.
• A rule applier
23
CONTROL STRATEGIES
 How to decide which rule to apply next during the process
of searching for a solution to a problem?
 The two requirements of good control strategy are that
• It should cause motion.
• It should be systematic
24
BFS TREE FOR WATER JUG
PROBLEM
25
(0,0)
(4,0) (0,3)
(4,3) (0,0) (1,3) (4,3) (0,0) (3,0)
BREADTH FIRST SEARCH
26
BREADTH FIRST SEARCH
Algorithm:
1. Create a variable called NODE-LIST and set it to initial state
2. Until a goal state is found or NODE-LIST is empty do
a. Remove the first element from NODE-LIST and call it E. If NODE-
LIST was empty, quit
b. For each way that each rule can match the state described in E do:
i. Apply the rule to generate a new state
ii. If the new state is a goal state, quit and return this state
iii. Otherwise, add the new state to the end of NODE-LIST
27
DEPTH FIRST SEARCH
28
DEPTH FIRST SEARCH
Algorithm:
1. If the initial state is a goal state, quit and return success
2. Otherwise, do the following until success or failure is
signaled:
a. Generate a successor, E, of initial state. If there are no
more successors, signal failure.
b. Call Depth-First Search, with E as the initial state
c. If success is returned, signal success. Otherwise continue
in this loop.
29
BACKTRACKING
• In this search, we pursue a single branch of the tree until it
yields a solution or until a decision to terminate the path is
made.
• It makes sense to terminate a path if it reaches dead-end,
produces a previous state. In such a state backtracking occurs
• Chronological Backtracking: Order in which steps are
undone depends only on the temporal sequence in which
steps were initially made.
• Specifically most recent step is always the first to be undone.
• This is also simple backtracking.
30
ADVANTAGES OF DEPTH-
FIRST SEARCH
• DFS requires less memory since only the nodes on
the current path are stored.
• By chance, DFS may find a solution without
examining much of the search space at all
31
ADVANTAGES OF BFS
• BFS will not get trapped exploring a blind alley.
• If there are multiple solutions, then a minimal
solution will be found.
32
PROBLEM CHARACTERISTICS
Inorder to choose the most appropriate method for a particular
problem, it is necessary to analyze the problem along several key
dimensions:
• Is the problem decomposable into a set of independent smaller or
easier subproblems?
• Can solution steps be ignored or at least undone if they prove
unwise?
• Is the problem’s universe predictable?
• Is a good solution to the problem obvious without comparison to
all other possible solutions?
• Is the desired solution a state of the world or a path to a state?
• Is a large amount of knowledge absolutely required to solve the
problem or is knowledge important only to constrain the search?
• Can a computer that is simply given the problem return the
solution or will the solution of the problem require interaction
between the computer and a person?
33
IS THE PROBLEM
DECOMPOSABLE?
• Whether the problem can be decomposed into
smaller problems?
• Using the technique of problem decomposition,
we can often solve very large problems easily.
34
SYMBOLIC INTEGRATION
DECOMPOSABLE
Sigma(x2
+3x+sin2
xcos2
x)
35
BLOCKS WORLD PROBLEM
NON DECOMPOSABLE
36
Following operators
are available:
CLEAR(x) [ block x
has nothing on it]->
ON(x, Table)
CLEAR(x) and
CLEAR(y) -> ON(x,y)
[ put x on y]
C
A B
A
B
C
Start: ON(C,A)
Goal:
ON(B,C) and
ON(A,B)
ON(B,C)
ON(B,C) and ON(A,B)
ON(B,C)
ON(A,B)
CLEAR(A) ON(A,B)
CLEAR(A) ON(A,B)
CAN SOLUTION STEPS BE
IGNORED OR UNDONE?
Suppose we are trying to prove a math theorem. We can prove a lemma. If we find
the lemma is not of any help, we can still continue.
8-puzzle problem
Chess: A move cannot be taken back.
Important classes of problems:
• Ignorable ( theorem proving)
• Recoverable ( 8-puzzle)
• Irrecoverable ( Chess)
The recoverability of a problem plays an important role in determining the
complexity of the control structure necessary for the problem’s solution.
• Ignorable problems can be solved using a simple control structure that never
backtracks
• Recoverable problems can be solved by a slightly more complicated control
strategy that does sometimes make mistakes
• Irrecoverable problems will need to be solved by systems that expends a great
deal of effort making each decision since decision must be final.
37
IS THE UNIVERSE
PREDICTABLE?
• Certain Outcome ( ex: 8-puzzle)
• Uncertain Outcome ( ex: Bridge)
• For solving certain outcome problems, open loop approach
( without feedback) will work fine.
• For uncertain-outcome problems, planning can at best
generate a sequence of operators that has a good
probability of leading to a solution. We need to allow for a
process of plan revision to take place.
38
IS A GOOD SOLUTION
ABSOLUTE OR RELATIVE?
• Any path problem
• Best path problem
• Any path problems can often be solved in a reasonable
amount of time by using heuristics that suggest good
paths to explore.
• Best path problems are computationally harder.
39
40
41
42
43
IS THE SOLUTION A STATE OR
A PATH?
Finding a consistent interpretation
For the sentence “The bank president ate a dish of pasta salad with
the fork”.
We need to find the interpretation but not the record of the
processing.
Water jug : Here it is not sufficient to report that we have
solved , but the path that we found to the state (2,0). Thus a
statement of a solution to this problem must be a sequence of
operations ( Plan) that produces the final state.
44
IS THE SOLUTION A STATE OR
A PATH?
A path solution problem can be reformulated as a state –
solution problem by describing a state as a partial path to a
solution.
45
WHAT IS THE ROLE OF
KNOWLEDGE?
Two examples:
• Playing Chess: Knowledge is required to constrain the
search for a solution
• Newspaper story understanding: Lot of knowledge is
required even to be able to recognize a solution.
46
WHAT IS THE ROLE OF
KNOWLEDGE?
Consider a problem of scanning daily newspapers
“to decide which are supporting the democrats and which are
supporting the republicans in some upcoming election”.
We need lots of knowledge to answer such questions as:
• The names of the candidates in each party
• The facts that if the major thing you want to see done is have taxes lowered, you
are probably supporting the republicans
• The fact that if the major thing you want to see done is improved education for
minority students, you are probably supporting the democrats.
• etc
47
DOES THE TASK REQUIRE
INTERACTION WITH A PERSON?
The programs require intermediate interaction with people
for additional inputs and to provided reassurance to the user.
There are two types of problems:
• Solitary
• Conversational
Decision on using one of these approaches will be important
in the choice of problem solving method.
48
DOES THE TASK REQUIRE
INTERACTION WITH A PERSON?
Solitary Problem: in which there is no intermediate
communication and no demand for an explanation of the
reasoning process.
Conversational Problem: In which intermediate
communication is to provide either additional assistance to
the computer or additional information to the user.
49
PROBLEM CLASSIFICATION
• There are several broad classes into which the problems
fall.
• These classes can each be associated with generic control
strategy that is appropriate for solving the problems:
• Most diagnostic task : ex: medical diagnostics, diagnosis of
faults in mechanical devices
• Propose and Refine: ex: design and planning
50
PRODUCTION SYSTEM
CHARACTERISTICS
Production Systems are good way to describe the operations that
can be performed in a search for a solution to a problem.
1. Can production systems, like problems, be described by a set
of characteristics that shed some light on how they can easily
be implemented?
2. If so, what relationships are there between problem types and
the types of production systems best suited to solving the
problems?
51
PRODUCTION SYSTEM
CHARACTERISTICS
To answer to the first question is yes. Consider the following
definitions of Classes of Production systems:
• Monotonic Production System
• Non-Monotonic Production system
• Partially commutative Production system:
• Commutative Production system- both monotonic and
partially commutative.
52
MONOTONIC PRODUCTION
SYSTEMS
Production system in which the application of a rule
never prevents the later application of another rule
that could also have been applied at the time the first
rule was applied.
i.e., rules are independent.
53
COMMUTATIVE PRODUCTION
SYSTEM
A partially Commutative production system has a property
that if the application of a particular sequence of rules
transform state x into state y, then any permutation of those
rules that is allowable, also transforms state x into state y.
A Commutative production system is a production system
that is both monotonic and partially commutative.
54
FOUR CATEGORIES OF
PRODUCTION SYSTEM
Monotonic NonMonotonic
Partially
Commutative
Theorem proving Robot Navigation
Not Partially
Commutative
Chemical
Synthesis
Bridge
55
PARTIALLY COMMUTATIVE,
MONOTONIC
These production systems are useful for solving ignorable
problems.
Example: Theorem Proving
They can be implemented without the ability to backtrack to
previous states when it is discovered that an incorrect path
has been followed.
This often results in a considerable increase in efficiency,
particularly because since the database will never have to be
restored, It is not necessary to keep track of where in the
search process every change was made.
They are good for problems where things do not change; new
things get created.
56
NON MONOTONIC, PARTIALLY
COMMUTATIVE
• Useful for problems in which changes occur but
can be reversed and in which order of operations is
not critical.
• Example: Robot Navigation, 8-puzzle, blocks world
• Suppose the robot has the following ops: go North
(N), go East (E), go South (S), go West (W). To reach
its goal, it does not matter whether the robot
executes the N-N-E or N-E-N.
57
NOT PARTIALLY COMMUTATIVE
Problems in which irreversible change occurs
Example: chemical synthesis
The ops can be :Add chemical x to the pot, Change the temperature to t
degrees.
These ops may cause irreversible changes to the potion being brewed.
The order in which they are performed can be very important in
determining the final output.
(X+y) +z is not the same as (z+y) +x
Non partially commutative production systems are less likely to produce
the same node many times in search process.
When dealing with ones that describe irreversible processes, it is
partially important to make correct decisions the first time, although if
the universe is predictable, planning can be used to make that less
important.
58
ISSUES IN THE DESIGN OF
SEARCH PROGRAMS
• The direction in which to conduct the search
( forward versus backward reasoning).
• How to select applicable rules ( Matching)
• How to represent each node of the search process
( knowledge representation problem)
59

problem space and problem definition in ai

  • 1.
  • 2.
    CONTENTS 2 • Defining theproblem as a State Space Search • Production Systems • Control Strategies • Breadth First Search • Depth First Search • Heuristic Search • Problem Characteristics • Is the Problem Decomposable? • Can Solution Steps be ignored or undone? • Production system characteristics • Issues in the design of search programs
  • 3.
    To Build aSystem to Solve a Particular Problem, The Following Four Things are Needed 1. Define the problem precisely- specify both initial and final situations(state) 2. Analyze the problem 3. Isolate and represent the task knowledge that is necessary to solve the problem 4. Choose the best problem solving technique and apply it 3
  • 4.
    STATE SPACE SEARCH PROBLEM= SEARCHING FOR A GOAL STATE It is a process in which successive configurations or states of an instance are considered , with the goal of finding a goal state with a desired property . State space- a set of states that a problem can be in. - The group consisting of all the attainable states of a problem ex: Customers in a line would have state space {0,1,2….} 4
  • 5.
    SEARCH PROBLEM S: thefull set of states S0 :the initial state A:SS set of operators G : the set of final states. G is subset of S Search problem: Find a sequence of actions which transforms the agent from the initial state to goal state. 5
  • 6.
    REPRESENTING SEARCH PROBLEMS Usingdirected graph - The states are represented as nodes - The allowed actions are represented as arcs. 6
  • 7.
    PROBLEM FORMULATION • Asingle state problem formulation is defined by four items Initial state, successor function, goal test and path cost • Problem formulation means choosing a relevant set of states to consider, and a feasible set of operators for moving from one state to another • Search is the process of imagining sequences of operators applied to the initial state and checking which sequence reaches a goal state. 7
  • 8.
    EXAMPLES. Problem: On holidayin Singapur; currently in Mysur. Flight leaves tomorrow from Bangalore. Find a short route to drive to Bangalore. Formulate problem: states: various cities actions: drive between cities solution: sequence of cities Path Cost: distance travelled 8
  • 9.
    VACUUM WORLD STATESPACE 9 States: Dirt and Robot Location Actions: Left, right, clean Goal test: No dirt at all locations Path cost: 1 per action
  • 10.
    THE 8 -PUZZLE 10
  • 11.
    THE 8 -PUZZLE States: Locations of tiles Actions: Move blank left, right, up, down Goal test: Given Path cost: 1 per move 11
  • 12.
    STATE SPACE SEARCH: PLAYINGCHESS • Each position can be described by an 8 by 8 array. • Initial position is the game opening position. • Goal position is any position in which the opponent does not have a legal move and his or her king is under attack. • Legal moves can be described by a set of rules: -Left sides can be described by a set of rules -Right sides describe the new resulting state 12
  • 13.
    Playing chess contd… •State space is a set of legal positions. • Starting at the initial state. • Using the set of rules to move from one state to another. • Attempting to end up in a goal state. 13
  • 14.
  • 15.
    PLAYING CHESS CONTD.. •Writing the rules like above leads to very large number • These rule poses serious practical difficulties - No person could ever supply a complete set of rules. It would take too long and could certainly not be done without mistakes - No program could easily handle all those rules. 15
  • 16.
    PLAYING CHESS CONTD.. ANOTHERWAY TO DESCRIBE THE CHESS MOVES White pawn at Square(file e, rank 2) Move a pawn from AND Square(file e, rank 2) Square(file e, rank 3) is empty  to AND Square(file e, rank 4) Square(file e, rank 4) is empty 16
  • 17.
    THE WATER JUGPROBLEM 17 Given two jugs, a 4-gallon and 3-gallon, neither has any measuring maskers on it. There is a pump that can be used to fill the jugs with water. How can you get exactly 2 gallons of water into the 4-gallon jug? 1 Gallon = 3.785 Liter
  • 18.
    THE WATER JUGPROBLEM The state space for this problem can be described as the set of ordered pairs of integers (x,y) such that x = 0, 1,2, 3 or 4 and y = 0,1,2 or 3; x represents the number of gallons of water in the 4-gallon jug and y represents the quantity of water in 3- gallon jug The start state is (0,0) The goal state is (2,n) 18
  • 19.
    PRODUCTION RULES FORWATER JUG PROBLEM The operators to be used to solve the problem can be described as follows: 19
  • 20.
  • 21.
    TO SOLVE THEWATER JUG PROBLEM • Required a control structure that loops through a simple cycle in which some rule whose left side matches the current state is chosen • the appropriate change to the state is made as described in the corresponding right side • the resulting state is checked to see if it corresponds to goal state. 21
  • 22.
    One solution tothe water jug problem Shortest such sequence will have a impact on the choice of appropriate mechanism to guide the search for solution. 22
  • 23.
    PRODUCTION SYSTEMS TO STRUCTUREAI PROGRAMS A production system consists of: • A set of rules, each consisting of a left side that determines the applicability of the rule and a right side that describes the operation to be performed if that rule is applied. • One or more knowledge/databases that contain whatever information is appropriate for the particular task. Some parts of the database may be permanent, while other parts of it may pertain only to the solution of the current problem. • A control strategy that specifies the order in which the rules will be compared to the database and a way of resolving the conflicts that arise when several rules match at once. • A rule applier 23
  • 24.
    CONTROL STRATEGIES  Howto decide which rule to apply next during the process of searching for a solution to a problem?  The two requirements of good control strategy are that • It should cause motion. • It should be systematic 24
  • 25.
    BFS TREE FORWATER JUG PROBLEM 25 (0,0) (4,0) (0,3) (4,3) (0,0) (1,3) (4,3) (0,0) (3,0)
  • 26.
  • 27.
    BREADTH FIRST SEARCH Algorithm: 1.Create a variable called NODE-LIST and set it to initial state 2. Until a goal state is found or NODE-LIST is empty do a. Remove the first element from NODE-LIST and call it E. If NODE- LIST was empty, quit b. For each way that each rule can match the state described in E do: i. Apply the rule to generate a new state ii. If the new state is a goal state, quit and return this state iii. Otherwise, add the new state to the end of NODE-LIST 27
  • 28.
  • 29.
    DEPTH FIRST SEARCH Algorithm: 1.If the initial state is a goal state, quit and return success 2. Otherwise, do the following until success or failure is signaled: a. Generate a successor, E, of initial state. If there are no more successors, signal failure. b. Call Depth-First Search, with E as the initial state c. If success is returned, signal success. Otherwise continue in this loop. 29
  • 30.
    BACKTRACKING • In thissearch, we pursue a single branch of the tree until it yields a solution or until a decision to terminate the path is made. • It makes sense to terminate a path if it reaches dead-end, produces a previous state. In such a state backtracking occurs • Chronological Backtracking: Order in which steps are undone depends only on the temporal sequence in which steps were initially made. • Specifically most recent step is always the first to be undone. • This is also simple backtracking. 30
  • 31.
    ADVANTAGES OF DEPTH- FIRSTSEARCH • DFS requires less memory since only the nodes on the current path are stored. • By chance, DFS may find a solution without examining much of the search space at all 31
  • 32.
    ADVANTAGES OF BFS •BFS will not get trapped exploring a blind alley. • If there are multiple solutions, then a minimal solution will be found. 32
  • 33.
    PROBLEM CHARACTERISTICS Inorder tochoose the most appropriate method for a particular problem, it is necessary to analyze the problem along several key dimensions: • Is the problem decomposable into a set of independent smaller or easier subproblems? • Can solution steps be ignored or at least undone if they prove unwise? • Is the problem’s universe predictable? • Is a good solution to the problem obvious without comparison to all other possible solutions? • Is the desired solution a state of the world or a path to a state? • Is a large amount of knowledge absolutely required to solve the problem or is knowledge important only to constrain the search? • Can a computer that is simply given the problem return the solution or will the solution of the problem require interaction between the computer and a person? 33
  • 34.
    IS THE PROBLEM DECOMPOSABLE? •Whether the problem can be decomposed into smaller problems? • Using the technique of problem decomposition, we can often solve very large problems easily. 34
  • 35.
  • 36.
    BLOCKS WORLD PROBLEM NONDECOMPOSABLE 36 Following operators are available: CLEAR(x) [ block x has nothing on it]-> ON(x, Table) CLEAR(x) and CLEAR(y) -> ON(x,y) [ put x on y] C A B A B C Start: ON(C,A) Goal: ON(B,C) and ON(A,B) ON(B,C) ON(B,C) and ON(A,B) ON(B,C) ON(A,B) CLEAR(A) ON(A,B) CLEAR(A) ON(A,B)
  • 37.
    CAN SOLUTION STEPSBE IGNORED OR UNDONE? Suppose we are trying to prove a math theorem. We can prove a lemma. If we find the lemma is not of any help, we can still continue. 8-puzzle problem Chess: A move cannot be taken back. Important classes of problems: • Ignorable ( theorem proving) • Recoverable ( 8-puzzle) • Irrecoverable ( Chess) The recoverability of a problem plays an important role in determining the complexity of the control structure necessary for the problem’s solution. • Ignorable problems can be solved using a simple control structure that never backtracks • Recoverable problems can be solved by a slightly more complicated control strategy that does sometimes make mistakes • Irrecoverable problems will need to be solved by systems that expends a great deal of effort making each decision since decision must be final. 37
  • 38.
    IS THE UNIVERSE PREDICTABLE? •Certain Outcome ( ex: 8-puzzle) • Uncertain Outcome ( ex: Bridge) • For solving certain outcome problems, open loop approach ( without feedback) will work fine. • For uncertain-outcome problems, planning can at best generate a sequence of operators that has a good probability of leading to a solution. We need to allow for a process of plan revision to take place. 38
  • 39.
    IS A GOODSOLUTION ABSOLUTE OR RELATIVE? • Any path problem • Best path problem • Any path problems can often be solved in a reasonable amount of time by using heuristics that suggest good paths to explore. • Best path problems are computationally harder. 39
  • 40.
  • 41.
  • 42.
  • 43.
  • 44.
    IS THE SOLUTIONA STATE OR A PATH? Finding a consistent interpretation For the sentence “The bank president ate a dish of pasta salad with the fork”. We need to find the interpretation but not the record of the processing. Water jug : Here it is not sufficient to report that we have solved , but the path that we found to the state (2,0). Thus a statement of a solution to this problem must be a sequence of operations ( Plan) that produces the final state. 44
  • 45.
    IS THE SOLUTIONA STATE OR A PATH? A path solution problem can be reformulated as a state – solution problem by describing a state as a partial path to a solution. 45
  • 46.
    WHAT IS THEROLE OF KNOWLEDGE? Two examples: • Playing Chess: Knowledge is required to constrain the search for a solution • Newspaper story understanding: Lot of knowledge is required even to be able to recognize a solution. 46
  • 47.
    WHAT IS THEROLE OF KNOWLEDGE? Consider a problem of scanning daily newspapers “to decide which are supporting the democrats and which are supporting the republicans in some upcoming election”. We need lots of knowledge to answer such questions as: • The names of the candidates in each party • The facts that if the major thing you want to see done is have taxes lowered, you are probably supporting the republicans • The fact that if the major thing you want to see done is improved education for minority students, you are probably supporting the democrats. • etc 47
  • 48.
    DOES THE TASKREQUIRE INTERACTION WITH A PERSON? The programs require intermediate interaction with people for additional inputs and to provided reassurance to the user. There are two types of problems: • Solitary • Conversational Decision on using one of these approaches will be important in the choice of problem solving method. 48
  • 49.
    DOES THE TASKREQUIRE INTERACTION WITH A PERSON? Solitary Problem: in which there is no intermediate communication and no demand for an explanation of the reasoning process. Conversational Problem: In which intermediate communication is to provide either additional assistance to the computer or additional information to the user. 49
  • 50.
    PROBLEM CLASSIFICATION • Thereare several broad classes into which the problems fall. • These classes can each be associated with generic control strategy that is appropriate for solving the problems: • Most diagnostic task : ex: medical diagnostics, diagnosis of faults in mechanical devices • Propose and Refine: ex: design and planning 50
  • 51.
    PRODUCTION SYSTEM CHARACTERISTICS Production Systemsare good way to describe the operations that can be performed in a search for a solution to a problem. 1. Can production systems, like problems, be described by a set of characteristics that shed some light on how they can easily be implemented? 2. If so, what relationships are there between problem types and the types of production systems best suited to solving the problems? 51
  • 52.
    PRODUCTION SYSTEM CHARACTERISTICS To answerto the first question is yes. Consider the following definitions of Classes of Production systems: • Monotonic Production System • Non-Monotonic Production system • Partially commutative Production system: • Commutative Production system- both monotonic and partially commutative. 52
  • 53.
    MONOTONIC PRODUCTION SYSTEMS Production systemin which the application of a rule never prevents the later application of another rule that could also have been applied at the time the first rule was applied. i.e., rules are independent. 53
  • 54.
    COMMUTATIVE PRODUCTION SYSTEM A partiallyCommutative production system has a property that if the application of a particular sequence of rules transform state x into state y, then any permutation of those rules that is allowable, also transforms state x into state y. A Commutative production system is a production system that is both monotonic and partially commutative. 54
  • 55.
    FOUR CATEGORIES OF PRODUCTIONSYSTEM Monotonic NonMonotonic Partially Commutative Theorem proving Robot Navigation Not Partially Commutative Chemical Synthesis Bridge 55
  • 56.
    PARTIALLY COMMUTATIVE, MONOTONIC These productionsystems are useful for solving ignorable problems. Example: Theorem Proving They can be implemented without the ability to backtrack to previous states when it is discovered that an incorrect path has been followed. This often results in a considerable increase in efficiency, particularly because since the database will never have to be restored, It is not necessary to keep track of where in the search process every change was made. They are good for problems where things do not change; new things get created. 56
  • 57.
    NON MONOTONIC, PARTIALLY COMMUTATIVE •Useful for problems in which changes occur but can be reversed and in which order of operations is not critical. • Example: Robot Navigation, 8-puzzle, blocks world • Suppose the robot has the following ops: go North (N), go East (E), go South (S), go West (W). To reach its goal, it does not matter whether the robot executes the N-N-E or N-E-N. 57
  • 58.
    NOT PARTIALLY COMMUTATIVE Problemsin which irreversible change occurs Example: chemical synthesis The ops can be :Add chemical x to the pot, Change the temperature to t degrees. These ops may cause irreversible changes to the potion being brewed. The order in which they are performed can be very important in determining the final output. (X+y) +z is not the same as (z+y) +x Non partially commutative production systems are less likely to produce the same node many times in search process. When dealing with ones that describe irreversible processes, it is partially important to make correct decisions the first time, although if the universe is predictable, planning can be used to make that less important. 58
  • 59.
    ISSUES IN THEDESIGN OF SEARCH PROGRAMS • The direction in which to conduct the search ( forward versus backward reasoning). • How to select applicable rules ( Matching) • How to represent each node of the search process ( knowledge representation problem) 59