سيستمهاي اطلاعات مديريت

Download Report

Transcript سيستمهاي اطلاعات مديريت

Knowledge
Representation
‫دكترمحسن كاهاني‬
http://www.um.ac.ir/~kahani/
Knowledge and its Meaning
uEpistemology
uTypes of Knowledge
uKnowledge Pyramid
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Epistemology
u the science of knowledge
EPISTEMOLOGY ( Gr. episteme, "knowledge"; logos,
"theory"),
branch of philosophy concerned with the theory of
knowledge. The main problems with which
epistemology is concerned are the definition of
knowledge and related concepts, the sources and criteria
of knowledge, the kinds of knowledge possible and the
degree to which each is certain, and the exact relation
between the one who knows and the object known.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Knowledge Definitions
knowlaedge \'nS-lij\ n [ME knowlege, fr. knowlechen to acknowledge, irreg. fr. knowen ] (14c)
1 obs : cognizance
2a
(1) : the fact or condition of knowing something with familiarity gained through experience or
association
(2) : acquaintance with or understanding of a science, art, or technique
b
(1) : the fact or condition of being aware of something
(2) : the range of one's information or understanding <answered to the best of my 4>
c : the circumstance or condition of apprehending truth or fact through reasoning : cognition
d : the fact or condition of having information or of being learned <a man of unusual 4>
3 archaic : sexual intercourse
4 a : the sum of what is known : the body of truth, information, and principles acquired by mankind
b archaic : a branch of learning syn knowledge, learning, erudition, scholarship mean what is or can be
known by an individual or by mankind. knowledge applies to facts or ideas acquired by study,
investigation, observation, or experience <rich in the knowledge of human nature>. learning applies to
knowledge acquired esp. through formal, often advanced, schooling <a book that demonstrates vast
learning >. erudition strongly implies the acquiring of profound, recondite, or bookish learning <an
erudition unusual even in a scholar>. scholarship implies the possession of learning characteristic of
the advanced scholar in a specialized field of study or investigation <a work of first-rate literary
scholarship >.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
[Merriam-Webster, 1994]
Types of Knowledge
 a priori knowledge
 comes before knowledge perceived through senses
 considered to be universally true
 a posteriori knowledge
 knowledge verifiable through the senses
 may not always be reliable
 procedural knowledge
 knowing how to do something
 declarative knowledge
 knowing that something is true or false
 tacit knowledge
 knowledge not easily expressed by language
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Knowledge in Expert
Systems
Conventional
Programming
Algorithms
+ Data Structures
= Programs
Knowledge-Based
Systems
Knowledge
+ Inference
= Expert System
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Review of Knowledge
Representation Criteria
 Definition of Knowledge Representation:
A formalism for representing in a computer,
facts and other kinds of knowledge about a
subject or specialty such that these facts and
knowledge can be used in reasoning.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Criteria of Adequacy:
Metaphysical Adequacy
 The representation scheme cannot contradict the
actual, real world circumstance, either by ignoring
certain things that actually happen or by allowing
things to happen that do not.
 An expert system is a representation of the real world,
therefore it must reflect the real world.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Epistemic Adequacy
 The K.R. scheme must be able to represent
facts, usually about individuals and their
relations and attributes.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Heuristic Adequacy
 The K.R. scheme must be able to express the
reasoning used to solve a problem. Probably
the most difficult of these criteria to meet.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Computational Tractability
 The K.R. scheme must be able to manipulate
the representation using a computer system.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Expressiveness
 These criteria are "nice", but not necessary.
 Adequacy criteria are necessary
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Lack of Ambiguity
 only one interpretation
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Clarity
 Can humans understand what is being said as
well as the computer?
 Can take this further: we would like the use of
the KR to increase or clarify our knowledge of
the domain.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Uniformity
 Able to handle all types of knowledge we need
to represent in a uniform fashion.
 Difficult to represent every type of knowledge
(heuristic vs fact, etc) in a different manner.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Notational convenience
 does the knowledge fit the representation?
 is the developer comfortable with the
representation scheme?
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Declarativeness
 not procedural, "processing" should not change or
impact the meaning.
 A representation is declarative if:
 the meanings of the statements are independent of the use
made of the statements
 referential transparency also exists. Referential
transparency exists when equivalent expressions can
always be substituted for one another while preserving the
truth value of the statements in which they occur.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Knowledge Representation
Methods
u Production Rules
u Structured Objects
u Semantic Nets
u Frames
u Logic
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Production Rule
Representations
 Consists of <condition,action> pairs
 Agent checks if a condition holds
 If so, the production rule “fires” and the action is carried out
 This is a recognize-act cycle
 Given a new situation (state)
 Multiple production rules will fire at once
 Call this the conflict set
 Agent must choose from this set
 Call this conflict resolution
 Production system is any agent
 Which performs using recognize-act cycles
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Case Studies Production Rules
 sample domains
 e.g. theorem proving, determination of prime numbers, distinction of
objects (e.g. types of fruit, trees vs. telephone poles, churches vs.
houses, animal species)
 suitability of production rules
 basic production rules
 no salience, certainty factors, arithmetic
 rules in ES/KBS
 salience, certainty factors, arithmetic
 e.g. CLIPS, Jess
 enhanced rules
 procedural constructs
 e.g. loops
 objects
 e.g. COOL, Java objects
 fuzzy logic
 e.g. FuzzyCLIPS, FuzzyJ
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Advantages of Production
Rules
 simple and easy to understand
 straightforward implementation
in computers possible
 formal foundations for some
variants
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Problems with Production
Rules
 simple implementations are very
inefficient
 some types of knowledge are not easily
expressed in such rules
 large sets of rules become difficult to
understand and maintain
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Semantic Nets
u graphical representation for propositional information
u originally developed by M. R. Quillian as a model for
human memory
u labeled, directed graph
u nodes represent objects, concepts, or situations
u labels indicate the name
u nodes can be instances (individual objects) or classes
(generic nodes)
u links represent relationships
u the relationships contain the structural information of the
knowledge to be represented
u the label indicates the type of the relationship
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
‫‪Example‬‬
‫سيستمهاي خبره و مهندسي دانش‪-‬دكتر كاهاني‬
Relationships
 without relationships, knowledge is an unrelated
collection of facts
 reasoning about these facts is not very interesting
 inductive reasoning is possible
 relationships express structure in the collection of
facts
 this allows the generation of meaningful new
knowledge
 generation of new facts
 generation of new relationships
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Types of Relationships
 relationships can be arbitrarily defined by the
knowledge engineer
 allows great flexibility
 for reasoning, the inference mechanism must know how
relationships can be used to generate new knowledge
 inference methods may have to be specified for every
relationship
 frequently used relationships
 IS-A
 relates an instance (individual node) to a class (generic
node)
 AKO (a-kind-of)
 relates one class (subclass) to another class (superclass)
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Objects and Attributes
 attributes provide more detailed information on
nodes in a semantic network
 often expressed as properties
 combination of attribute and value
 attributes can be expressed as relationships
 e.g. has-attribute
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Implementation Questions
 simple and efficient representation schemes for
semantic nets
 tables that list all objects and their properties
 tables or linked lists for relationships
 conversion into different representation methods
 predicate logic
 nodes correspond variables or constants
 links correspond to predicates
 propositional logic
 nodes and links have to be translated into propositional
variables and properly combined with logical connectives
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
OAV-Triples
 object-attribute-value triplets
 can be used to characterize the knowledge in a
semantic net
 quickly leads to huge tables
Object
Attribute
Value
Astérix
profession
warrior
Obélix
size
extra large
Idéfix
size
petite
Panoramix
wisdom
infinite
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Problems Semantic Nets
 expressiveness





no internal structure of nodes
relationships between multiple nodes
no easy way to represent heuristic information
extensions are possible, but cumbersome
best suited for binary relationships
 efficiency
 may result in large sets of nodes and links
 search may lead to combinatorial explosion
 especially for queries with negative results
 usability
 lack of standards for link types
 naming of nodes
 classes, instances
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Frame
u represents related knowledge about a subject
u provides default values for most slots
u frames are organized hierarchically
u allows the use of inheritance
u knowledge is usually organized according to cause and effect
relationships
u slots can contain all kinds of items
u rules, facts, images, video, comments, debugging info, questions,
hypotheses, other frames
u slots can also have procedural attachments
u procedures that are invoked in specific situations involving a
particular slot
u on creation, modification, removal of the slot value
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Simple Frame Example
Slot Name
Filler
name
Astérix
height
small
weight
low
profession
warrior
armor
helmet
intelligence
very high
marital status
presumed single
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Overview of Frame Structure
 two basic elements: slots and facets (fillers, values, etc.);
 typically have parent and offspring slots
 used to establish a property inheritance hierarchy
(e.g., specialization-of)
 descriptive slots
 contain declarative information or data (static knowledge)
 procedural attachments
 contain functions which can direct the reasoning process (dynamic
knowledge)
(e.g., "activate a certain rule if a value exceeds a given level")
 data-driven, event-driven ( bottom-up reasoning)
 expectation-drive or top-down reasoning
 pointers to related frames/scripts - can be used to transfer control to
a more appropriate frame
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Slots
 each slot contains one or more facets
 facets may take the following forms:
 values
 default
 used if there is not other value present
 range
 what kind of information can appear in the slot
 if-added
 procedural attachment which specifies an action to be taken when a value
in the slot is added or modified (data-driven, event-driven or bottom-up
reasoning)
 if-needed
 procedural attachment which triggers a procedure which goes out to get
information which the slot doesn't have (expectation-driven; top-down
reasoning)
 other
 may contain frames, rules, semantic networks, or other types of knowledge
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
[Rogers 1999]
Usage of Frames
 filling slots in frames




can inherit the value directly
can get a default value
these two are relatively inexpensive
can derive information through the attached
procedures (or methods) that also take advantage
of current context (slot-specific heuristics)
 filling in slots also confirms that frame or script
is appropriate for this particular situation
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
[Rogers 1999]
Restaurant Frame Example
 generic template for restaurants
 different types
 default values
 script for a typical sequence of activities at a
restaurant
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Generic RESTAURANT Frame
Generic Restaurant Frame
Specialization-of: Business-Establishment
Types:
range:
(Cafeteria, Fast-Food, Seat-Yourself, Wait-To-Be-Seated)
default: Seat-Yourself
if-needed: IF plastic-orange-counter THEN Fast-Food,
IF stack-of-trays THEN Cafeteria,
IF wait-for-waitress-sign or reservations-made THEN Wait-To-Be-Seated,
OTHERWISE Seat-Yourself.
Location:
range:
an ADDRESS
if-needed: (Look at the MENU)
Name:
if-needed: (Look at the MENU)
Food-Style:
range:
(Burgers, Chinese, American, Seafood, French)
default:
American
if-added: (Update Alternatives of Restaurant)
Times-of-Operation:
range:
a Time-of-Day
default:
open evenings except Mondays
Payment-Form:
range:
(Cash, CreditCard, Check, Washing-Dishes-Script)
Event-Sequence:
default:
Eat-at-Restaurant Script
Alternatives:
range:
all restaurants with same Foodstyle
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
if-needed: (Find all Restaurants with the same Foodstyle)
Frame Advantages
 fairly intuitive for many applications
 similar to human knowledge organization
 suitable for causal knowledge
 easier to understand than logic or rules
 very flexible
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Frame Problems
 it is tempting to use frames as definitions of concepts
 not appropriate because there may be valid instances of
a concept that do not fit the stereotype
 exceptions can be used to overcome this
 can get very messy
 inheritance
 not all properties of a class stereotype should be
propagated to subclasses
 alteration of slots can have unintended consequences in
subclasses
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Introduction to Logic
 expresses knowledge in a particular mathematical notation
All birds have wings --> x. Bird(x) -> HasWings(x)
 rules of inference
 guarantee that, given true facts or premises, the new facts or
premises derived by applying the rules are also true
All robins are birds -->  x Robin(x) -> Bird(x)
 given these two facts, application of an inference rule gives:
 x Robin(x) -> HasWings(x)
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Logic and Knowledge
 rules of inference act on the superficial structure or syntax
of the first 2 formulas
 doesn't say anything about the meaning of birds and robins
 could have substituted mammals and elephants etc.
 major advantages of this approach
 deductions are guaranteed to be correct to an extent that
other representation schemes have not yet reached
 easy to automate derivation of new facts
 problems
 computational efficiency
 uncertain, incomplete, imprecise knowledge
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Summary of Logic Languages
 propositional logic
 facts
 true/false/unknown
 first-order logic
 facts, objects, relations
 true/false/unknown
 temporal logic
 facts, objects, relations, times
 true/false/unknown
 probability theory
 facts
 degree of belief [0..1]
 fuzzy logic
 degree of truth
 degree of belief [0..1]
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Syntax of Propositional
Logic
 A BNF (Backus-Naur Form) grammar of sentences in
propositional logic
Sentence -> AtomicSentence | ComplexSentence
AtomicSentence -> True | False | P | Q | R | ...
ComplexSentence -> (Sentence)
| Sentence Connective Sentence
| ~Sentence
Connective -> ^ | V | <=> | =>
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Inference Rules
 more efficient than truth tables
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Modus Ponens
 eliminates =>
(X => Y),
X
______________
Y
 If it rains, then the streets will be wet.
 It is raining.
 Infer the conclusion: The streets will be wet.
(affirms the antecedent)
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Modus tollens
(X => Y), ~Y
_______________
¬X
 If it rains, then the streets will be wet.
 The streets are not wet.
 Infer the conclusion: It is not raining.
 NOTE: Avoid the fallacy of affirming the consequent:
 If it rains, then the streets will be wet.
 The streets are wet.
 cannot conclude that it is raining.
 If Bacon wrote Hamlet, then Bacon was a great writer.
 Bacon was a great writer.
 cannot conclude that Bacon wrote Hamlet. ‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Syllogism
 chain implications to deduce a conclusion)
(X => Y), (Y => Z)
_____________________
(X => Z)
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Resolution
(X v Y), (~Y v Z)
_________________
(X v Z)
 basis for the inference mechanism in the Prolog
language and some theorem provers
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Complexity issues
 truth table enumerates 2n rows of the table for any proof
involving n symbol
 it is complete
 computation time is exponential in n
 checking a set of sentences for satisfiability is NP-complete
 but there are some circumstances where the proof only involves
a small subset of the KB, so can do some of the work in
polynomial time
 if a KB is monotonic (i.e., even if we add new sentences to a
KB, all the sentences entailed by the original KB are still
entailed by the new larger KB), then you can apply an inference
rule locally (i.e., don't have to go checking the entire KB)
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Predicate Logic
 new concepts (in addition to propositional
logic)
 complex objects
 terms
 relations
 predicates
 quantifiers




syntax
semantics
inference rules
usage
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Objects
 distinguishable things in the real world
 people, cars, computers, programs, ...
 frequently includes concepts
 colors, stories, light, money, love, ...
 properties
 describe specific aspects of objects
 green, round, heavy, visible,
 can be used to distinguish between objects
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Relations
 establish connections between objects
 relations can be defined by the designer or user
 neighbor, successor, next to, taller than, younger
than, …
 functions are a special type of relation
 non-ambiguous: only one output for a given
input
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Syntax
 also based on sentences, but more complex
 sentences can contain terms, which represent objects
 constant symbols: A, B, C, Franz,
Square1,3, …
 stand for unique objects ( in a specific context)
 predicate symbols: Adjacent-To, Younger-Than, ...
 describes relations between objects
 function symbols: Father-Of, Square-Position, …
 the given object is related to exactly one other object
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Semantics
 provided by interpretations for the basic constructs
 usually suggested by meaningful names
 constants
 the interpretation identifies the object in the real world
 predicate symbols
 the interpretation specifies the particular relation in a model
 may be explicitly defined through the set of tuples of objects that satisfy the
relation
 function symbols
 identifies the object referred to by a tuple of objects
 may be defined implicitly through other functions, or explicitly through tables
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Terms
 logical expressions that specify objects
 constants and variables are terms
 more complex terms are constructed from function
symbols and simpler terms, enclosed in
parentheses
 basically a complicated name of an object
 semantics is constructed from the basic
components, and the definition of the functions
involved
 either through explicit descriptions (e.g. table), or
via other functions
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Unification
 an operation that tries to find consistent variable
bindings (substitutions) for two terms
 a substitution is the simultaneous replacement of variable
instances by terms, providing a “binding” for the variable
 without unification, the matching between rules would be
restricted to constants
 often used together with the resolution inference rule
 unification itself is a very powerful and possibly complex
operation
 in many practical implementations, restrictions are imposed
 e.g. substitutions may occur only in one direction (“matching”)
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Atomic Sentences
 state facts about objects and their relations
 specified through predicates and terms
 the predicate identifies the relation, the terms
identify the objects that have the relation
 an atomic sentence is true if the relation
between the objects holds
 this can be verified by looking it up in the set of
tuples that define the relation
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Complex Sentences
 logical connectives can be used to build more
complex sentences
 semantics is specified as in propositional logic
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Quantifiers
 can be used to express properties of collections
of objects
 eliminates the need to explicitly enumerate all
objects
 predicate logic uses two quantifiers
 universal quantifier 
 existential quantifier 
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Universal Quantification


states that a predicate P is holds for all objects
x in the universe under discourse
x P(x)
the sentence is true if and only if all the
individual sentences where the variable x is
replaced by the individual objects it can stand
for are true
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Existential Quantification
 states that a predicate P holds for some objects
in the universe
 x P(x)
 the sentence is true if and only if there is at least
one true individual sentence where the variable
x is replaced by the individual objects it can
stand for
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Horn clauses or sentences
 class of sentences for which a polynomial-time
inference procedure exists
 P1  P2  ... Pn => Q
where Pi and Q are non-negated atomic
sentences
 not every knowledge base can be written as a
collection of Horn sentences
 Horn clauses are essentially rules of the form
 If P1  P2  ... Pn then Q
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Comparison Between
Knowledge
Representation
Schemes
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Similarity
 Despite everything, there are many similarities
between the three knowledge representation
schemes.
 All express a binary relationship between two
objects: entity-attribute-triples in production
rules, instance-slot-filler in structured objects, and
relationship between two parameters in predicate
logic.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Similarity
 Production rules and structured objects are considered
more object centered, while logic is considered more
relationship centered, but we can map from one to the
other.
 Predicate logic makes is easier to represent non-binary
relationships, other formalisms require the creation of
a linking entity.
 Frames overcome some of the complexity by grouping
like information together).
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Similarity
 With respect to the first three criteria
(metaphysical, epsitemic, and heuristic) each
representation scheme is adequate.
 With respect to the fourth criteria
(computational tractability), Predicate logic has
some unique qualities (discuss shortly).
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Production Rules
 High notational convenience.
 Programmers are very comfortable working
with production rules.
 More expert systems have used production rules
than other knowledge representation schemes
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Structured Objects
 The biggest problem is default reasoning,
which creates a great deal of trouble.
 the ability to "inherit properties" from object
more highly placed in the hierarchy
 Ironically, the ability to handle default
reasoning was part of the initial attraction of
these representation
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Structured Objects
 When we attempt to implement "exception
processing" we lose the ability to express
universal truths!
 Not much use to have a knowledge base that
cannot express universal truths within its
domain!
 Best problems such as taxonomizing.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Predicate Logic
 Special issues with respect to computational
tractability.
 We limit Logic Representation to Horn Clauses
so that logic more computationally tractable.
 The question is whether or not we lost
"expressiveness" by limiting to Horn clauses.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Predicate Logic
 Limit predicate calculus in two ways:
1. only one literal on the left hand side of the
clause
2. cannot have negated literals
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Predicate Logic - One
Problem:
 Treat negation as failure.
 conclude that a literal is false unless we show it to be
true.
 This a closed world assumption
 when all our predicates are taken together we know the
necessary conditions for the truth of the predicate.
 This seems reasonable, but consider trying to
enumerate the conditions for things like: birds that
don't fly, etc.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Predicate Logic
 With negation as failure
 must know how our knowledge base is going to be
used (what sort of deductions it must make) so that we
present the predicates properly (we may need to order
them in a particular way).
 Difficult to envision every eventuality.
 Loose the declarative nature of logic.
 Can no longer interpret the knowledge "neutrally".
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Predicate Logic - Second
Problem:
 Lose the non-monotonic nature of the reasoning
process.
 In a monotonic system if a certain conclusion can be
drawn from a body of evidence, then adding to the
evidence cannot prevent the conclusion from being
drawn.
 KB |- P then KB + delta |- P for any delta.
 By interpreting negation as failure, we lose the nonmonotonic nature that classical logic allows us.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Predicate Logic
 Structured objects using an inheritance property
appear to avoid this issue, but the problems of default
values in reasoning leads to another set of problems.
 With respect to Predicate Logic, can conclude that its
expressiveness is adequate, but be aware of the
limitations.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Predicate Logic
 There are similar problems with the other knowledge
representation schemes with respect to negation.
 What is meant by the absence of a relationship
between to objects in a semantic network?
 Is there NO relationship or simply lack of knowledge
about the existence of a relationship.
 With the closed-world assumption, the lack of link
means that the relationship does not exist.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Choosing a way to represent
knowledge
 The nature of the search space
 The nature of the data
 The nature of the knowledge
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
The nature of the search
space
 If some basic problem solving approach will
work (i.e. a brute force approach that explicitly
examines all alternatives), then use it!
 If the problem space is relatively small and data
and rules are reliable, exhaustive search via
Prolog or Lisp may be best.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
The nature of the search
space
 Consider ways to factor the search space.
 ”Pruning" branches that are unlikely
 Decomposing the domain into independent
components that can be processes separately
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
The nature of the data
 If the data has some inherent structure to it, you
may be able to fit it to a structured object
representation easily.
 Static knowledge is generally easier to use with
structured objects than dynamic knowledge
(dynamic knowledge changes during the execution
of the program).
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
The nature of the data
 Consider use multiple representation schemes to
represent all of the knowledge.
 Be careful how you organize the knowledge in the
knowledge base.
 ”Declarativeness", is rarely achieved.
 Therefore, when executing the system, the ordering of
knowledge within the knowledge base may affect the
solution, certainly the solution path.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
The nature of the knowledge
 Is the reasoning along the lines of
this and that and this other thing suggest A
 production rules with certainty factors are in
order
 Or is it more categorical
 as with standard logic
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬
Summary
 Despite all the work being done on knowledge
representation, there is relatively little advice on
how to pick a knowledge representation scheme.
 Even when using a shell, do not ignore the
differences between knowledge representation
schemes, otherwise you may end up with an
unusable expert systems.
‫دكتر كاهاني‬-‫سيستمهاي خبره و مهندسي دانش‬