Knowledge representation methods

Download Report

Transcript Knowledge representation methods

Knowledge representation
methods
‫جلسه سوم‬
KR is AI bottleneck
The most important ingredient in any expert system
is knowledge. The power of expert systems resides
in the specific, high-quality knowledge they contain
about task domains. AI researchers will continue to
explore and add to the current repertoire of
knowledge representation and reasoning methods.
But in knowledge resides the power. Because of the
importance of knowledge in expert systems and
because the current knowledge acquisition method
is slow and tedious, much of the future of expert
systems depends on breaking the knowledge
acquisition bottleneck and in codifying and
representing a large knowledge infrastructure.
Overview of knowledge representation
•
•
•
•
•
•
Production rules
Semantic networks/web-ontologies
Frames
Propositional logic
Predicate logic
Probability (next meeting)
Production rules
• Production rules are in the form of condition-action pairs:
• “IF this condition(or premises or antecedent) occurs, THEN some action
(or result, or conclusion, or consequence) will (or should) occur.”
• Ideally, each production rule implements an autonomous chunk of
expertise that can be developed and modified independently of other
rules
• Production systems are composed of
– production rules
– working memory, and
– a control
• Rules can be used as descriptive tools for problem-solving heuristics,
• replacing a more formal analysis of the problem
– incomplete but useful guides to make search decisions
• Rules can be viewed as simulation of the cognitive behavior of human
experts
Advantages and limitations of rules
Advantages
• Rules are easy to understand
• Inference and explanations are easily derived
• Modifications and maintenance are relatively easy
• Uncertainty is easily combined with rules
• Each rule is usually independent of all others
Limitations
• Complex knowledge requires many, many rules: creating problems in
• using and maintaining the systems
• Builders likes rules: preventing the choices of more appropriate
• representation
• Systems with many rules may have a search limitation in the control
• program: difficulty in evaluating rule-based systems and making
• inferences
semantic network
• A semantic network is a graphic notation for
representing knowledge in patterns
ofinterconnected nodes and arcs. It is one way
for knowledge visualization and presentation.
• What is common to all semantic networks is
a declarative graphic representation that can be
used either to represent knowledge or to support
automated systems for reasoning about
knowledge.
Semantic networks/web
• Nodes represent objects and descriptive information about
those objects
– Objects can be any physical item such as a book, car, desk, a
person, and etc.
– Nodes can also be concepts, events, or actions, Netwon’s law,
election, building house, and etc.
– Attributes of an object can also be used as nodes, e.g. color,
size, class, age, and etc.
• Links show the relationship between various objects and
descriptive factors
– Common links are of “IS-A”, “HAS-A”, “A-KIND-OF”, etc.
• Inheritance is a useful feature of semantic network
– Various characteristics of some nodes can inherit the
characteristics of others
Semantic network example
Object, Attributes, and Values
• Objects, attributes, and values, the O-A-V
triplet
• O-A-V can be used as a common way to
represent knowledge
• The O-A-V triplet can be used to characterize
all the knowledge in a semantic net.
DBPedia ‫• مثال‬
Advantages and limitations
Advantages
• Flexibility in adding new nodes and links
• The visualization is easy to understand
• Inheritance
• Similarity to that of human information storage
• Ability to reason and create definition statements between nonlinked
• nodes
• XML/RDF standards for definition of nodes and relationships
Limitations
• Inheritance has difficulty with exceptions
• The perception of the situation can place relevant facts at
• inappropriate points
• Procedural knowledge is difficult to represent
Frames
• A frame is a data structure that includes all
the knowledge about a particular object (an
application OOP to expert systems)
• A frame groups values that describe one
object
• The knowledge is partitioned into slots
• A slot can describe declarative and procedural
knowledge
A car frame
Propositional logic
• a formal way for representing complex
statements that can be true or false
• Propositional logic is the simplest logic
• propositions is a statement that may be true
or false
• We use letters to show propositions
logical connective
The proposition symbols P1, P2 etc are
sentences
Wumpus world sentences
Pros and cons of propositional logic
 Propositional logic is declarative
 Propositional logic allows partial/disjunctive/negated
information
– (unlike most data structures and databases)
 Propositional logic is compositional:
– meaning of B1,1  P1,2 is derived from meaning of B1,1 and of P1,2
–  Meaning in propositional logic is contextindependent
– (unlike natural language, where meaning depends on context)
–  Propositional logic has very limited expressive
power
– (unlike natural language)
– E.g., cannot say "pits cause breezes in adjacent squares“
• except by writing one sentence for each square
Beyond Propositional logic
• Propositional logic not expressive enough
– In Wumpus world we needed to explicitly write every case of
Breeze & Pit relation
– Facts = propositions
– “All squares next to pits are breezy”
• “Regular” programming languages mix facts (data) and
procedures (algorithms)
– World[2,2]=Pit
– Cannot deduce/compose facts automatically
– Declarative vs. Procedural
First-Order Logic
• Propositional logic has very limited expressive power (unlike natural
language) E.g., cannot say “pits cause breezes in adjacent squares”
except by writing one sentence for each square
• Whereas propositional logic assumes world contains facts, firstorder logic (like natural language) assumes the world contains
– Objects: people, houses, numbers, theories, Ronald McDonald, colors,
baseball games, wars, centuries. . .
– Relations: red, round, bogus, prime, multistoried . . ., brother of, bigger
than, inside, part of, has color, occurred after, owns, comes between,. . .
– Functions: father of, best friend, third inning of, one more than, end of
, , , 
– Quantifiers: , 
– Universal: x : (Man(x) ) Mortal(x) )
– Existential: y : (Father(y, fred) )
– Connectives:,
Syntax of FOL: Basic elements
•
•
•
•
•
•
•
Constants
Predicates
Functions
Variables
Connectives
Equality
Quantifiers
KingJohn, 2, NUS,...
Brother, >,...
Sqrt, LeftLegOf,...
x, y, a, b,...
, , , , 
=
, 
Truth in first-order logic
• Sentences are true with respect to a model and an interpretation
• Model contains objects (domain elements) and relations among
them
• Interpretation specifies referents for
constant symbols
→
objects
predicate symbols
→
relations
function symbols
→
functional relations
• An atomic sentence predicate(term1,...,termn) is true
iff the objects referred to by term1,...,termn
are in the relation referred to by predicate
Syntax of FOL: Basic elements
Wumpus world sentences in FOL