Title: Intro to Computation and AI
1Intro to Computation and AI
- Dr. Jill Fain Lehman
- School of Computer Science
- Lecture 6 December 4, 1997
2Review
- Last lecture looked at AI uses of basic graph
structures and algorithms - Inheritance hierarchies and inferential reasoning
- Constraint satisfaction and propagation
- In addition to relying on basic CS structures and
algorithms, AI has also created its own
formalisms e.g. rule-based systems.
3Rule-based Systems
- Formalism critical in 1980s for moving AI out of
the lab and into practical industry applications. - Basis of Expert Systems Expert System Shells.
- Also basis of 2 long-standing cognitive
architectures ACT and Soar. - 2 parts knowledge structure and processing
mechanism (of course).
4Knowledge Structure
- Rules encode the knowledge of the domain required
to solve problems or tasks in the domain. - Conceptually, a rule is made up of 2 parts
- The if portion (aka left-hand side, conditions
or preconditions) - The then portion (aka right-hand side, actions,
effects). - There are many variations on this theme, e.g.
including a confidence measure with a rule to
help accommodate uncertainty.
5Example MYCIN (Shortliffe)
An expert system for guiding bacterial infection
therapy.
Premise (and (same cntxt gram grampos)
(same contxt morph coccus)
(same cntxt conform
clumps)) Action (conclude cntxt ident
staphylococcus tally 0.7)
If (1) the stain of the organism is
gram-positive, and (2) the morphology of the
organism is coccus, and (3) the growth
conformation of the organism is clumps,l Then
there is suggestive evidence (0.7) that the
identity of the organism is staphylococcus.
6Example R1 (McDermott)
If the most current active context is
distributing massbus devices, there is a
single-port drive that hasnt been assigned to a
massbus, there are no unassigned dual-port
disk drives, the number of devices that
each massbus should support is known, there
is a massbus that has been assigned at least 1
drive that should support additional disk
drives, the type of cable needed to connect
the disk drive to the previous device on
the massbus is known Then assign the disk drive
to the massbus.
7Processing Mechanism
- Conceptually a rule interpreter that matches the
if portion of the rule against a state
description and then changes the state
description based on the then portion. - Exactly what goes in the state and what goes in
the rule and what goes in the interpreter is the
basis of the differences between particular rule
systems.
8Simple Example
- Suppose state had 2 objects blocka and blockb
and blocka was on the table and blockb was on top
of blocka.
State (isa block blocka) (isa block blockb)
(ontop blockb blocka) (ontable
blocka) Goal (ontable blockb) Operator-move-o
ff If (state (isa block ltxgt) (ontop ltxgt
ltygt))(goal (ontable ltxgt)) Then (add
(ontable ltxgt)) (remove (ontop ltxgt ltygt)) What
does the interpreter do???
9Expressiveness of Rule Language
- Need to have variables that can be bound to
particular instances during problem solving. - Usually need logical operations (not
disjunction) in addition to implicit
conjunction). - Need to encode directions to the interpreter
(e.g. add remove). - May need metalanguage (ability to talk about
rules themselves) (this may also be hidden in the
interpreter).
10Behavior of Interpreter
- Enforce consistency of bindings across clauses.
- Must match conditions efficiently
- Large numbers of rules cannot be searched
linearly need some form of indexing - trade-off betw. expressiveness of language/ease
of match - Needs conflict resolution strategy when more than
one rule can fire. - E.g. fire all vs. fire exactly one (based on
rules, objects, or actions?) - May require additional capabilities to, e.g.,
combine certainty factors.
11Some Issues in Using Rule-based Systems
- Knowledge acquisition how to get the expertise
out of experts, how to represent it efficiently,
how to maintain consistency, how to check for
completeness. - Iterative approach, lots of time spent on tools.
- Explanation how to know what the system is
doing, how to assure experts that reasons for
behavior are appropriate. - Alternatives to NL?
- Ethics