Solving
Solving
Fundamentals
Problem Solving
Goal Trees
Rule-Based Expert Systems
The Problem-Reduction method
• Convert difficult goals into one or more easier-
to-achieve subgoals
• Each subgoal may be divided still more finely
into one or more lower-level subgoals
• Recognize goals -> convert them into
appropriate subgoals
• Problem reduction -> goal reduction
Example 1
• Resolve the following indefinite integral
4. Polynomial division
Simple transformation
• a safe transformation – a transformation
which, when applicable, is always or almost
always appropriate
• for a goal, a transformation is appropriate if
it’s the correct next step to bring that goal
nearer to achievement
• SAINT uses 8 simple transformations
The framework
SUCCESS
Apply all simple Done ?
Look in table
transformation
GOAL
Safe transformation
SUB-GOAL
GOAL
Safe transformation
SUB-GOAL
AND NODE
Problem reduction
1 2
Heuristic transformations
• Heuristic method - method that often work;
isn’t guaranty that will always works
• Is not an algorithm – it’s an attempt
Heuristic transformation
A. Transformation from trigonometric form into other trigonometric
form
C
A
GOAL
Safe transformation
AND/OR TREE
OR NODE
B 4
b 1
b
Problem reduction - continue
C
b
Apply heuristic
Find problem
transformation
Questions
• How good the integration program is it?
– 32K memory
– Resolves 54 from 56 of the hardest problem (lacks 2
transformations)
– Depth of the tree – 7 levels
– Average depth – approx. 3
– Branches unused – approx. 1
• What kind of knowledge is involved in this?
– Knowledge about transformations
– How goal tree works
– Knowledge about standard forms
– Knowledge about domain
Questions
• How is the knowledge represented?
– Table expressions
– LISP relations
– Goal tree information is embedded into
procedures
• How much knowledge is required?
– Table of integrals – standard form – 26
– Simple transformations – 8
– Heuristics transformations - 12
Blocks world
• Demo
• Written by Terry Winograd – professor at Stanford
PUT-ON
GET RID OF
MOVE
UNGRASP
Example
B1 B3
B2 B4 PUT-ON B2 B4
PUT ON B1 Table
GOAL TREE
How and Why questions
• Deal with “how” questions:
– Identify the goal involved in the goal tree
– If the goal is an AND node report all immediate
subgoals
– If the goal is an OR node report the immediate
subgoal that was achieved
• Deal with “why” questions:
– Identify the goal involved in the goal tree
– Report the immediate supergoal
• The complexity of the behavior is largely a
consequence not of the complexity of the program, but
the complexity of a problem (the environment)
Ant road
HAS CLAWS
R2 CARNIVORE R4
SHARP TEETH
CHEETAH
FORWARD POINTING EYE
R3
EATS MEAT
SPOTS
SPOTS
HAS CLAWS
CARNIVORE CHEETAH
SHARP TEETH
SPOTS
SPOTS
Millicent is a Millicent is a
protagonist villain
Millicent becomes Hermione's friend
P4
Millicent is a Millicent is a
protagonist villain
P1
Millicent lives
in Gryffindor
Tower
Millicent becomes Hermione's friend
P4
Millicent is a Millicent is a
protagonist villain
P1 P2
P1 P2
P1 P2
P1 P2
remove the A0
Forward chaining
• Assume rule-ordering conflict resolution
• New assertions are added to the bottom of the
list of assertions.
• If a particular rule matches assertions in the list
of assertions in more than one way, the matches
are considered in the order corresponding to the
top-to-bottom order of the matched assertions.
Thus, if a particular rule has an antecedent that
matches both A1 and A2, the match with A1 is
considered first.
• Run forward chaining on the rules and
assertions. For the first two iterations, fill out
the first two rows in the table below, noting
the rules whose antecedents match the data,
the rule that fires, and the new assertions that
are added by the rule. For the remainder,
supply only the fired rules and new assertions.
Matched Fired New Assertions Added to List of Assertions
Readings
• Artificial Intelligence (3rd Edition), Patrick Winston, pp. 53-60