Title: Knowledge-Based Systems
1Knowledge-Based Systems
2Course Overview
- Introduction
- Knowledge Representation
- Semantic Nets, Frames, Logic
- Reasoning and Inference
- Predicate Logic, Inference Methods, Resolution
- Reasoning with Uncertainty
- Probability, Bayesian Decision Making
- Pattern Matching
- Variables, Functions, Expressions, Constraints
- Expert System Design
- ES Life Cycle
- Expert System Implementation
- Salience, Rete Algorithm
- Expert System Examples
- Conclusions and Outlook
3Overview Knowledge Representation
- Motivation
- Objectives
- Chapter Introduction
- Review of relevant concepts
- Overview new topics
- Terminology
- Knowledge and its Meaning
- Epistemology
- Types of Knowledge
- Knowledge Pyramid
- Knowledge Representation Methods
- Production Rules
- Semantic Nets
- Schemata and Frames
- Logic
- Semantic Web and KR
- Ontologies
- OWL
- RDF
- Important Concepts and Terms
- Chapter Summary
4Motivation
- KBS are useless without the ability to represent
knowledge - different knowledge representation schemes may be
appropriate - depending on tasks and circumstances
- knowledge representation schemes and reasoning
methods must be coordinated
5Objectives
- know the basic principles and concepts for
knowledge representation - knowledge - information - data
- meaning
- be familiar with the most frequently used
knowledge representation methods - logic, rules, semantic nets, schemata
- differences between methods, advantages,
disadvantages, performance, typical scenarios - understand the relationship between knowledge
representation and reasoning - syntax, semantics
- derivation, entailment
- apply knowledge representation methods
- usage of the methods for simple problems
6Knowledge Engineering
- The process of building an expert system is
- called knowledge Engineering
- Iterative and incremental
7Knowledge Engineering Phases
8Phase 1 Assessment Phase
- Problem practicality
- Expert System Creation Justification
- Determine General Project Idea
- Determine needed resources
9Phase 2 knowledge acquisition
- Knowledge Acquisition study of knowledge ,
acquisition, organization - Knowledge Acquisition ? Knowledge base creation
- Identification of knowledge resource (human or
nonhuman) - Design methods for knowledge extraction from
resources according to resource type - Extract knowledge from resources according to
designed methods - Knowledge integration
10Phase 3 Design
- Representation techniques
- Save knowledge in knowledge base
- Knowledge Processing and inferences Techniques
- Prototype
11Test
- Feedback to previous Phases
- Objective System general structure and extracted
knowledge validation and verification - Use Expert guidance
12Knowledge and its Meaning
- Epistemology(??? ?????? ????)
- ??? ??? ?? ?????? ?????? ? ???? ???? ?? ? ???
????. - Types of Knowledge
- Knowledge Pyramid
13???? ????? ??? ????? ?? ????? ??????
- ????? ??????
- ???? ????? ???? ????? ???? ????
- ?????
- ?????
- ????
- ???
- ???
14Types of Knowledge
- a priori knowledge (theoretical knowledge)
- comes before knowledge perceived through senses
- considered to be universally true
- a posteriori knowledge (empirical 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
15Types of Knowledge
- Tacit knowledge (unconscious knowledge)
- knowledge not easily expressed by language
- ?????? ???? ???? ???? gt ?????? ? ?????? ???
?????? ? ?????? gt ?????? ?? ? ?????? ?? ?????
????? ? ????? ?? ????? - Neural Network
- Certain Knowledge
- Uncertain knowledge
16Knowledge in Expert Systems
Conventional Programming
Knowledge-Based Systems
Algorithms Data Structures Programs
Knowledge Inference Expert System
17Knowledge Pyramid
Meta-Knowledge
Knowledge
Information
Data
Noise
18Knowledge Representation Methods
- Suppose Access to Problem knowledge
- Problem Knowledge gt L
- Knowledge Intelligible for machines? L
- Convert L to L
- Inefficiency Of Conventional Language
- Need New language
19Knowledge Representation Methods L Properties
- Support knowledge representation (procedural/
declarative, certain/ uncertain) - Easy
20Knowledge Representation Methods L
- Production Rules
- Semantic Nets
- Scripts and Frames
- Logic
- Conceptual graphs
- Object-Attribute-Value Triple
- Comparison based on superficial independence ,
simplicity and intelligibly
21Production Rules
- frequently used to formulate the knowledge in
expert systems - Knowledge of Problem is formulated in the form of
rules - C1, c2, c3, ? X
- Each rule identify the relationship between a
sequence of observations and a result
22Production Rules
- Observations
- Attribute - value pair
- Result of a rule
- Procedure
- Example
- Weather- cold, cloudy-yes ? Rainy
- Holiday- yes, Rainy-yes ?stay at home
23Production Rules
- Rules have Superficial independence but can be
dependent semantically - Superficial independence
- Easy management
24Production Rules
- 1. If the balls color is
- red Then I like the ball
- 2. If I like the ball
- Then I will buy the
- ball
- Question Balls Color?
- Answer Red
25Example
- 1. If the balls color is
- red Then I like the ball
- 2. If I like the ball
- Then I will buy the
- ball
26Rules Type
- Relationship Rules
- IF the battery is dead Then the car will not
start - Recommendation Rules
- IF the car will not start THEN take a cab
- Directive Rules
- IF the car will not start AND the fuel system is
ok - THEN check out the electrical system
27Rules Type
- Strategy Rules
- IF the car will not start THEN first check out
the - fuel system THEN check out the electrical system
- Heuristic Rules
- IF the car will not start AND the car is a 1957
- Ford THEN check the float
28Rules Type
- Pattern Matching Rules
- IF ?X is Employee AND ?X Agegt65
- THEN ?X can retire
- Meta Rules
- IF the car will not start AND the electrical
System - is operating normally
- THEN use rules concerning the fuel system
29Productions
- One formal notation for defining productions is
the BNF( Backus-Naur form) - This notation is a Metalanguage for defining the
syntax of a language - Syntax define form
- Semantic refer to meaning
- A metalanguage is language for describing
languages
30Productions
- Many Type of languages
- Natural languages, logic languages, mathematical
languages, and computer languages - BNF notation for a simple language rule that a
sentence consists of a noun and a verb followed
by punctuation is the following production rule - ltgt , are symbols of metalanguage
- means is defined as and is BNF equivalent of
? - Term within ltgt are nonterminal symbols
- Terminal cannot be replaced by anything else and
so is a constant
31Productions
- The following rules complete the nonterminals by
specifying their possible terminals - Bar means or in the metalanguage
32Productions
- String (set of terminals)
- Valid Sentence( string can be derived from the
start symbol) - Grammar Complete set of production rules that
define a language??
33Productions
- Parse Tree or Derivation Tree
- Graphic representation of a sentence decomposed
into all the terminals and nonterminals used to
derive the sentence
34Productions
Compiler create a parse tree when it tries to
determine whether statements in a program Conform
to the valid syntax of a language
35Production System
- Knowledge base (Production Rules)
- Working Memory
- Interpreter (Inference Engine)
- Three steps called the recognize-act cycle
- 1. Match the variables of the antecedent of a
rule in knowledge base with WM - 2. If more than one rule is available decide
which rule to fire (a strategy for conflict
resolution) - 3. Add new item to WM or delete old item from WM
and go to step 1
36Conflict Resolution strategies
- Refractoriness
- Same rule could not be fired more than once when
instantiated with the same set of data - Solution discard or delete the instantiations
from WM which have been used once ? avoid loop - Recency
- Most recent element of the working memory be used
up for instantiating one of the rules - Specificity
- Rule with more number of antecedent clauses be
fired than rules handling fewer antecedent
clauses
37Conflict Resolution strategies
- Specificity
- Rule with more number of antecedent clauses be
fired than rules handling fewer antecedent
clauses - Example
- PR1 Bird(X) ?Fly(X)
- PR2 Bird(X),Not emu(X)? Fly(x)
- Suppose WM contains the Data Bird(X) and Not
emu. - Both rule are firable. However the second rule
should be fired.
38Conflict Resolution strategies
- MYCYN use another approach for resolving
conflicts via metarules - Metarules can be either domain-specific or
domain-free - Domain-Specific metarule applicable for
identifying the rule to fire only in a specific
domains - Domain-free rules very general kind
39Conflict Resolution strategies
- Domain-Specific metarule
- If 1) the infection is pelvic abscess
- 2)and there are rules which mention in their
premise entero-bactoriae and - 3) there are rules which mention in their
premise gram-positive rods - Then there exists suggestive evidence (0.4) that
the former should be applied before the later
40Conflict Resolution strategies
- Domain-free rule
- If 1) there are rules which do not mention the
current goal in their premise and - 2) there are rules which mention the current
goal in their premise - Then it is definite (1.0) that former should be
applied before the later
41The conflict resolution with two rules PRi and
PRj has been demonstrated in this architecture.
42An Illustrative Production System
- water-jug problem
- Given 2 water jugs, 4 liters and 3 liters.
Neither has - Any measuring marks on it. There is a pump that
- can be used to fill the jugs. How can you get
- exactly 2 liters of water into 4-liter jugs?
43An Illustrative Production System
- U denote content of 4L jug
- V denote content of 3L jug
- Content of two jug will be represented by (U,V)
- Start up element in WM is (0,0)
44An Illustrative Praoduction SystemPR
45An Illustrative Production System
- keep track of the reasoning process ? draw a
state-space for the problem. - leaves generated after firing of the rules,
should be stored in WM. - first consider all possibilities of the solution
(i.e., without resolving the conflict). - Later we would fire only one rule even though
more than one are fireable.
46State Space without conflict resolution
47Conflict Resolution Strategy
- Avoid doubling back, whenever possible. In other
words, never attempt to generate old entries. - Rete Match Algorithm?
48Type of Production Systems
- two special types of production systems
- i) commutative system (??????? ????)
- ii) decomposable system(????? ????)
49Commutative Production System
- A production system is called commutative if for
a given set of rules R and a working memory WM
the following conditions are satisfied - i) Freedom in orderliness of rule firing
Arbitrary order of firing of the applicable rules
selected from set S will not make a difference in
the content of WM. - In other words, the WM that results due to an
application of a sequence of rules from S is
invariant under the permutation of the sequence.
50Commutative Production System
- ii) Invariance of the pre-condition of attaining
goal If the pre-condition of a goal is satisfied
by WM before firing of a rule, then it should
remain satisfiable after firing of the rule. - iii) Independence of rules The firability
condition of an yet unfired rule Ri with respect
to WM remains unaltered, even after firing of the
rule Rj for any j.
51Decomposable Production System
- A production system is called decomposable if the
goal G and the working memory can be partitioned
into Gi and WMi, such that - G ANDi (Gi ),
- WM ? WMi
- ?i
- rules are applied onto each WMi independently or
concurrently to yield Gi. - The termination of search occurs when all the
goals Gi for all i have been identified.
52Forward versus BackwardProduction Systems
- Most of the common classical reasoning problems
of AI can be solved by any of the following two
techniques - i) forward reasoning or forward chaining
(Top-Down) - ii) backward reasoning backward chaining
(Bottom-UP)
53Forward versus BackwardProduction Systems
- In a forward reasoning problem such as 4-puzzle
games or the water-jug problem, where the goal
state is known, the problem solver has to
identify the states by which the goal can be
reached. - These class of problems are generally solved by
expanding states from the known starting states
with the help of a domain-specific knowledge
base. - The generation of states from their predecessor
states may be continued until the goal is
reached.
54Forward versus BackwardProduction Systems
- On the other hand, consider the problem of system
diagnosis or driving a car from an unknown place
to home. - Here, the problems can be easily solved by
employing backward reasoning, since the
neighboring states of the goal node are known
better than the neighboring states of the
starting states. - For example, in diagnosis problems, the
measurement points are known better than the
cause of defects. - for the driving problem, the roads close to home
are known better than the roads close to the
unknown starting location of driving. - It is thus clear that, whatever be the class of
problems, system states from starting state to
goal or vice versa are to be identified, which
requires expanding one state to one or more
states.
55Forward versus BackwardProduction Systems
- If there exists no knowledge to identify the
right offspring state from a given state, then
many possible offspring states are generated from
a known state. This enhances the search-space for
the goal. - When the distance (in arc length) between the
starting state and goal state is long,
determining the intermediate states and the
optimal path (minimum arc length path) between
the starting and the goal state becomes a complex
problem.
56Forward versus BackwardProduction Systems
ES
Rule Base
2
1
3
Forward Inference Engine
Response
Observations
1
57Forward Reasoning Inference Mechanism
- 1. Perceive Inputs
- 2. Interpret Inputs based on observations
- 3. Apply action in the environment
- Point ?
- No explicit input problem
- Use WM for observation management
- Relation of inference engine and environment
by using WM - WM is a World model (Inference mechanism0
-
58Forward Reasoning Algorithm
- Based on WM search KB for rules that their
condition are available in WM (loop until find
something) - 1. If more than one rule are available select one
of them (Conflict resolution) - 2. Execute (fire) the selected rule (transfer its
consequence to WM) - 3. Go to step 1
- Point Time between rule selection and
execution!!!
59Forward Reasoning Algorithm
- Example
- X ? A-1, B-2, C-3
- Y? C - gt2
- Z? Y, D-1
- X? D-1, M-4
- WM A-1, B-2, C-3, M-4, D-1
60Forward versus BackwardProduction Systems
ES
Rule Base
2
1
4
Backward Inference Engine
Response
Problem
Observations
3
3
61Inference Mechanism
- 1. Problem trigger inference engine
- 2. Looking for observations which are needed for
solving the problem - 3. Apply action in the environment
- Point ? Identification of the problem (correct
problem) -
62Forward Backward Comparison
- Forward
- Observe the entire environment at any instance of
time - Observation management (by using working memory)
- Backward
- No need to observe
- Simple observation management mechanism
63Forward versus BackwardProduction Systems
- The following example illustrates the principle
of forward and backward reasoning with reference
to the well-known farmers fox-goat-cabbage
problem.
64farmers fox-goat-cabbage problem
- Example The problem may be stated as follows. A
farmer wants to transfer his three belongings, a
wolf, a goat and a cabbage, by a boat from the
left bank of a river to its right bank. The boat
can carry at most two items including the farmer.
If unattended, the wolf may eat up the goat and
the goat may eat up the cabbage. How should the
farmer plan to transfer the items?
65farmers fox-goat-cabbage problem
- The illegal states in the problem are (W,G
F,C) , (G,C F,W), (F, W G, C) and ( F, C
W, G) where F, G, , W and C denote the
farmer, the goat, the river, the wolf and the
cabbage respectively.
66part of the knowledge base
- PR 1 (F, G, W, C Nil ) ? ( W, C F, G)
- PR 2 (W, C F, G) ? ( F, W, C G)
- PR 3 (F, W, C G) ? (C F, W, G)
- PR 4 (C F, W, G) ? ( F, G, C W)
- PR5 (F, G, C W) ? (G F, W, C)
- PR 6 ( G F, W, C) ? ( F, G W, C)
- PR 7 ( F, G, W, C) ? ( Nil F,G, W, C)
- PR 8 ( F, W, C G) ? ( W F, G, C)
- PR 9 ( W F, G, C) ? ( F, G, W C)
- PR 10 ( F, G, W C) ? ( G F, W, C)
- PR 11 ( G F, W, C) ? ( F, G W,C)
- PR 12 ( F, G W, C) ?( Nil F, G, W, C)
67Forward Reasoning
- Starting state ( F, G, W, C Nil)
- Goal state (Nil F, G, W, C)
- one may expand the state-space, starting with
(F,G,W,C Nil) by the supplied knowledge base,
as follows
68(No Transcript)
69Backward Reasoning
- The backward reasoning scheme can also be invoked
for the problem. The reasoning starts with the
goal and identifies a rule whose right-hand side
contains the goal. It then generates the left
side of the rule in a backward manner. - The resulting antecedents of the rules are called
sub-goals. - The sub-goals are again searched among the
consequent part of the rules and on a successful
match the antecedent parts of the rule are
generated as the new sub-goals. - The process is thus continued until the starting
node is obtained.
70(No Transcript)
71A caution about backward reasoning
- Backward reasoning1 in many circumstances does
not support the logical semantics of problem
solving. - It may even infer wrong conclusions, when a goal
or sub-goal (any intermediate state leading to
the goal ) has multiple causes for occurrence,
and by backward reasoning we miss the right cause
and select a wrong cause as its predecessor in
the state-space graph.
72Example
- Example 3.4 Consider the following knowledge
base, the starting state and the goal state for a
hypothetical problem. The , in the left-hand
side of the production rules PR 1 through PR 4
denotes joint occurrence of them. - PR 1 p, q ? s
- PR 2 s, t ? u
- PR 3 p, q, r ? w
- PR 4 w ? v
- PR 5 v, t ? u
- Starting state p and q
- Goal state u.
- Other facts t.
73- The state-space graph for the hypothetical
problem indicates that the goal can be correctly
inferred by forward reasoning. - However, backward reasoning may infer a wrong
conclusion - p and q and r, if PR 5, PR 4 and PR 3 are used
in order starting with the goal. - Note that r is an extraneous premise, derived by
backward reasoning. But in practice the goal is
caused due to p, q and t only. - Hence, backward reasoning may sometimes yield
wrong inferences.
74Bi-directional Reasoning
- Instead of employing either forward or backward
reasoning, both of them may be used together in
automated problem solving. - This is required especially in situations when
expanding from either direction leads to a large
state-space.
75Bi-directional Reasoning
76Advantages of Production Rules
- expressiveness
- can relevant aspects of the domain knowledge be
stated through rules? - computational efficiency
- easy to understand?
- can humans interpret the rules
- easy to generate?
- how difficult is it for humans to construct rules
that reflect the domain knowledge
77Advantages of Production Rules
- straightforward implementation in computers
possible
78Problems 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
79Semantic Network
Much human information is organized in terms of
concepts that are linked to each other. Nouns are
organized in terms of kind and part
relations. E.g. a spaniel is a kind of dog which
is a kind of animal. E.g. a claw is part of a
foot which is part of a leg which is part of a
dog. Verbs are organized in terms of ways of
doing, e.g. digging is one way of removing.
80Semantic Nets
- graphical representation for propositional
information - originally developed by M. R. Quillian as a model
for human memory - Knowledge Representation using graph composed of
nodes and edges - nodes represent objects, concepts, or situations
- labels indicate the name
- nodes can be instances (individual objects) or
classes (generic nodes) - links represent relationships
- the label indicates the type of the relationship
- without relationships, knowledge is an unrelated
collection of facts
81(No Transcript)
82(No Transcript)
83(No Transcript)
84(No Transcript)
85(No Transcript)
86Types 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)
87Objects and Attributes
- AKO (a-kind-of)
- relates one class (subclass) to another class
(superclass) - 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
88Semantic Nets
- Points
- Bird has wings
- Move with fly
- canary is-a bird
- direction is important
- Graph has three attributes
- Has, Is-A, Travel
89Semantic Networks
- Semantic Networks can extend by
- Same Concepts
- Specialize
- Generalize
90Semantic Networks
91(No Transcript)
92Inheritance
- Is an important attribute in Semantic Networks
- Means that Concept or attribute inherit from a
node - Represent by Is-A
- Example Bird has all attributes of animals
- Inheritance decrease knowledge base, prevent
repetition
93Semantix Net Example
Abraracourcix
Astérix
is-boss-of
is-boss-of
Cétautomatix
is-a
is-a
is-friend-of
buys-from
is-a
Obélix
Gaul
is-a
fights-with
is-a
AKO
Dog
Panoramix
takes-care-of
is-a
lives-with
Human
is-a
sells-to
barks-at
Idéfix
Ordralfabetix
http//www.asterix.tm.fr
94Semantix Net Example
95(No Transcript)
96(No Transcript)
97(No Transcript)
98(No Transcript)
99(No Transcript)
100(No Transcript)
101(No Transcript)
102(No Transcript)
103(No Transcript)
104(No Transcript)
105(No Transcript)
106(No Transcript)
107(No Transcript)
108(No Transcript)
109(No Transcript)
110Problems Semantic Nets
- expressiveness
- no internal structure of nodes
- relationships between multiple nodes
- no easy way to represent heuristic information
- best suited for binary relationships
- efficiency
- may result in large sets of nodes and links
- usability
- lack of standards for link types
- naming of nodes
- classes, instances
111Semantic network
- Unsuitable
- Declarative Knowledge
- Procedural Knowledge
- Superficial Knowledge Structure
112(No Transcript)
113Semantic Network
- Superficial Knowledge Structure
- Knowledge structured in the form of relationship
and semantic network nodes - Deep Knowledge Structure
- causal relationships between a percept or action
and its outcome - Explain why events occurred
-
114Semantic Networks
- Medicine Expert System
- Superficial Knowledge
- First rule
- IF a person has a fever then take an asprin
- Biochemical Bases of human body? Why asprin
decreases fever - If a person has a pink monkey then take a
refrigerator
115Semantic Networks
- Superficial aspect of the knowledge of expert
system ? depends on combination of sentences not
their meanings - You can replace every two words with X,Y in the
Following Rule - If a person has a x then take a y
- X and Y arent variables but identify any Two
Words
116Semantic Networks
- Medicos have causal knowledge
- Various careers and have many experiences
- If a method doesnt work Medico can reason and
replace method with another method - Knowledge Of real environments often cant
represent by semantic networks - We need more complicated Structures
117Semantic Networks
- Knowledge Structure and Data Structure
- Instead of data an ordered set of knowledge
considered
118There are other kinds of links between concepts
representing other kinds of links, e.g. STUDENT
is linked to COURSES because students TAKE
courses. Exercise draw a semantic network for
UNIVERSITY, including part, kind, and other
relations
119Object-Attribute-Value
- Semantic Net
- One problem No standard definition of link names
- IS-A (IS-A and AKO)
- IS-A and Instance-of
- ART Expert system IS-A (AKO) and Instance-of
120Object-Attribute-Value
- Another common link is HAS-A
- HAS-A( class to subclass opposite AKO)
- IS-A relate a value to an attribute whereas a
HAS-A relates an object to an attribute
121Object-Attribute-Value
- Three items of object-attribute-value( OAV) occur
frequently ? build simple semantic net using them - The semantic net for such as system consists of
nodes for objects, attributes and values
connected by HAS-A and IS-A links
122Schemata
- suitable for the representation of more complex
knowledge - causal relationships between a percept or action
and its outcome - deeper knowledge than semantic networks
- nodes can have an internal structure
- for humans often tacit knowledge
- related to the notion of records in computer
science
123Concept Schema
- abstraction that captures general/typical
properties of objects - has the most important properties that one
usually associates with an object of that type - may be dependent on task, context, background and
capabilities of the user, - similar to stereotypes
- makes reasoning simpler by concentrating on the
essential aspects - may still require relationship-specific inference
methods
124Schema
- Schemata Has internal structures for nodes
- unlike semantic networks (labels says every
thing) - Semantic networks ? data structures that search
is based on the data saved in the nodes - Schemata is same as a data structure that nodes
contains records
125Schema Examples
- the most frequently used instances of schemata
are - frames Minsky 1975
- scripts Schank 1977
- frames consist of a group of slots and fillers to
define a stereotypical objects - scripts are time-ordered sequences of frames
126????
- ?? ????? ????? ??? ?? ???? ??? ???? ????? ???.
- ????? ?? ??? ???? ????? ?? ?????? ?? ?? ???
(IS-A) - ????? ???? ???? ??? ?????? ???? ?? ???. ?????
???? ??????. - ????? ???? ?? ???? ??? ???? gt ????? ?? ????
- ???? ???? ????????? ????? ??? ???????? ??? ??
???? ??? ????? ?? ??? ???.
127????
- ????? ????? ??? ???? ??? ???? ?????? ???? ?? UML
???. - ??? ???? ??? ???? ?? ??? ?????? ??? gt ???? ????
???? ????? ?? ??? gt ???? ???? ????? lisp ??
???? ?? ?????? ???? ??? ???? ?? ?? ??????. - ????? ??? procedure ?? ???? ??? ???? gt ????
128????
???? ?? ?????? ? ???? ??
129????
- ???? ?? ????? ?????? ?? ?????? ?????? ?? ????? ??
??? ??? ????? ?? ???. ?? ??? ?????? ??? ?? ??
?????? ?? ?????? ?? ?? ??? - ????? ????? ???? ?????? ????? gt ??? ???
- ?????? ????? ?????? ????? ????? gt ???
- ??? ????? 1 ? ????? ???? x gt ??? ???
130????
- ?? ?? ????? ???? ????? ?????? ( ???? ??????--gt
????? ?? ?? ???? ????? ??? ?????) ???? ???? ????
???? ????? (???? ???? ?? --gt ????? ?? ?? ????
????? ?? ?????) ?? ??? ???? ????. - ?? ??? ?????? ??? ?? ???? ?????? ? ???? ?? ??
??????? ?? ????? ??? ?????? ? ????? ?????? ??????
? ?? ??? ???? ?? ???. - ??? ?? ?? ?????? ?? ?????? ?? ????? ????? ????
?????.
131????
- ?? ???? ??? ?????
- ?????
- ???
- ?? ??? ??? ????? 1 ??? ??? ?????? ???? ?? ?? ????
?? ???? ??? ?? ??? ???? - ??? ??? ???? (concept )
- ??? ??? ????? (instance )
132????
- ??? ??? ???? ????
- ???
- ?? ?????? ?????? ?? ????? ?? ( ?? ?? ???? ??
????? ?? ???? ?? ???? ?? ?????? ?? ???? ??? ????
??? ??? ???? ?? ???)? - ??? ? ??? ?????? ???.
- ?????? ????? ??? ?????? ?? ???? ????? ??? ??????
????? ????.
133????
- ????? ????
- ??? ????
- ??????? string(30)
- ????? ??? ?????
- ????? ????? ????
134????
- ??? ????? ????
- ???
- ???? ?? ....(??? ????)?
- ?? ???? ?? ????? ?? ??? ???? ?? ??? ???? ???? ??
????? ?? ??? ????? ?? ??? ????? ?? ???.(slot )
135????
- ???? 01
- ????
- X
- 11/11/2004
- 250
- ??????? ??? ??? ??? ????? ????? ?? ??? (?? ????
??????? ?? slot ?? ( ????? ? ???????))
136????
- ????? ????? ?? ????? ?? ???? if-needed ?
if-changed ???? ?? ?????.
137?????? ??? ???
138Frame
- represents related knowledge about a subject
- provides default values for most slots
- frames are organized hierarchically
- allows the use of inheritance
- knowledge is usually organized according to cause
and effect relationships - slots can contain all kinds of items
- rules, facts, images, video, comments, debugging
info, questions, hypotheses, other frames - slots can also have procedural attachments
- procedures that are invoked in specific
situations involving a particular slot - on creation, modification, removal of the slot
value
139Simple Frame Example
140Overview 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
Rogers 1999
141Slots
- 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
142Usage 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
143(No Transcript)
144Restaurant Frame Example
- generic template for restaurants
- different types
- default values
- script for a typical sequence of activities at a
restaurant
Rogers 1999
145Generic 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-Opera
tion range a Time-of-Day
default open evenings except
Mondays Payment-Form range
(Cash, CreditCard, Check, Washing-Dishes-Script) E
vent-Sequence default
Eat-at-Restaurant Script Alternatives
range all restaurants with same
Foodstyle if-needed (Find all
Restaurants with the same Foodstyle)
Rogers 1999
146Restaurant Script
EAT-AT-RESTAURANT Script Props
(Restaurant, Money, Food, Menu, Tables,
Chairs) Roles
(Hungry-Persons, Wait-Persons, Chef-Persons) Point
-of-View Hungry-Persons Time-of-Occur
rence (Times-of-Operation of
Restaurant) Place-of-Occurrence (Location of
Restaurant) Event-Sequence first
Enter-Restaurant Script then if
(Wait-To-Be-Seated-Sign or Reservations)
then Get-Maitre-d's-Attention
Script then Please-Be-Seated
Script then Order-Food-Script
then Eat-Food-Script unless (Long-Wait)
when Exit-Restaurant-Angry Script then
if (Food-Quality was better than Palatable)
then Compliments-To-The-Chef
Script then Pay-For-It-Script
finally Leave-Restaurant Script
Rogers 1999
147Frame Advantages
- fairly intuitive for many applications
- similar to human knowledge organization
- suitable for causal knowledge
- easier to understand than logic or rules
- very flexible
148Frame 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
149Logic
- here emphasis on knowledge representation
purposes - logic and reasoning is discussed in the next
chapter
150Representation, Reasoning and Logic
- two parts to knowledge representation language
- syntax
- describes the possible configurations that can
constitute sentences - semantics
- determines the facts in the world to which the
sentences refer - tells us what the agent believes
Rogers 1999
151Reasoning
- process of constructing new configurations
(sentences) from old ones - proper reasoning ensures that the new
configurations represent facts that actually
follow from the facts that the old configurations
represent - this relationship is called entailment and can be
expressed asKB alpha - knowledge base KB entails the sentence alpha
Rogers 1999
152Inference Methods
- an inference procedure can do one of two things
- given a knowledge base KB, it can derive new
sentences ? that are (supposedly) entailed by KB
KB - ? gt KB ? - given a knowledge base KB and another sentence
alpha, it can report whether or not alpha is
entailed by KB KB ? ? gt KB ? - an inference procedure that generates only
entailed sentences is called sound or
truth-preserving - the record of operation of a sound inference
procedure is called a proof - an inference procedure is complete if it can find
a proof for any sentence that is entailed
Rogers 1999
153KR Languages and Programming Languages
- how is a knowledge representation language
different from a programming language (e.g. Java,
C)? - programming languages can be used to express
facts and states - what about "there is a pit in 2,2 or 3,1 (but
we don't know for sure)" or "there is a wumpus in
some square" - programming languages are not expressive enough
for situations with incomplete information - we only know some possibilities which exist
Rogers 1999
154KR Languages and Natural Language
- how is a knowledge representation language
different from natural language - e.g. English, Spanish, German,
- natural languages are expressive, but have
evolved to meet the needs of communication,
rather than representation - the meaning of a sentence depends on the sentence
itself and on the context in which the sentence
was spoken - e.g. Look!
- sharing of knowledge is done without explicit
representation of the knowledge itself - ambiguous (e.g. small dogs and cats)
Rogers 1999
155Good Knowledge Representation Languages
- combines the best of natural and formal
languages - expressive
- concise
- unambiguous
- independent of context
- what you say today will still be interpretable
tomorrow - efficient
- the knowledge can be represented in a format that
is suitable for computers - practical inference procedures exist for the
chosen format - effective
- there is an inference procedure which can act on
it to make new sentences
Rogers 1999
156Example Representation Methods
Guinness 1995
157Ontologies
- principles
- definition of terms
- lexicon, glossary
- relationships between terms
- taxonomy, thesaurus
- purpose
- establishing a common vocabulary for a domain
- graphical representation
- UML, topic maps,
- examples
- IEEE SUO, SUMO, Cyc, WordNet
158Terminology
- ontology
- provides semantics for concepts
- words are used as descriptors for concepts
- lexicon
- provides semantics for all words in a language by
defining words through descriptions of their
meanings - thesaurus
- establishes relationships between words
- synonyms, homonyms, antonyms, etc.
- often combined with a taxonomy
- taxonomy
- hierarchical arrangement of concepts
- often used as a backbone for an ontology
159What is the Semantic Web?
- Based on the World Wide Web
- Characterized by resources, not text and images
- Meant for software agents, not human viewers
- Defined by structured documents that reference
each other, forming potentially very large
networks - Used to simulate knowledge in computer systems
- Semantic Web documents can describe just about
anything humans can communicate about
160Ontologies and the Semantic Web
- Ontologies are large vocabularies
- Defined within Semantic Web documents (OWL)
- Define languages for other documents (RDF)
- Resources can be instances of ontology classes
- Upper Ontologies define basic, abstract concepts
- Lower Ontologies define domain-specific concepts
- Meta-ontologies define ontologies themselves
161Ontology Terms
- precision
- a term identifies exactly one concept
- expressiveness
- the representation language allows the
formulation of very flexible statements - descriptors for concepts
- ideally, there should be a one-to-one mapping
between a term and the associated concept (and
vice versa) high precision, and high
expressiveness - this is not the case for natural languages
- parasitic interpretation of terms often implies
meaning that is not necessarily specified in the
ontology
162IEEE Standard Upper Ontology
- project to develop a standard for ontology
specification and registration - based on contributions of three SUO candidate
projects - IFF
- OpenCyc/CycL
- SUMO
- Standard Upper Ontology Working Group (SUO WG),
Cumulative Resolutions, 2003, http//suo.ieee.org/
SUO/resolutions.html
163OpenCyc
- derived from the development of Cyc
- a very large-scale knowledge based system
- Cycorp, The Syntax of CycL, 2002,
http//www.cyc.com/cycdoc/ref/cycl-syntax.html
164SUMO
- stands for Suggested Upper Merged Ontology
- Niles, Ian, and Adam Pease, Towards a Standard
Upper Ontology, 2001 - Standard Upper Ontology Working Group (SUO WG),
Cumulative Resolutions, 2003, http//suo.ieee.org/
SUO/resolutions.html
165WordNet
- online lexical reference system
- design is inspired by current psycholinguistic
theories of human lexical memory - English nouns, verbs, adjectives and adverbs
- organized into synonym sets, each representing
one underlying lexical concept - related efforts for other languages
166Lojban
- artificial, logical, human language derived from
a language called Loglan - one-to-one correspondence between concepts and
words - high precision
- high expressiveness
- audio-visually isomorphic nature
- only one way to write a spoken sentence
- only one way to read a written sentence
- Logical Language Group, Official Baseline
Statement, 2005 - http//www.lojban.org/llg/baseline.html
167What is Lojban?
- A constructed/artificial language
- Developed from Loglan
- Dr. James Cooke Brown
- Introduced between 1955-1960
- Maintained by The Logical Language Group
- Also known as la lojbangirz.
- Branched Lojban off from Loglan in 1987
Brandon Wirick, 2005
168Main Features of Lojban
- Usable by Humans and Computers
- Culturally Neutral
- Based on Logic
- Unambiguous but Flexible
- Phonetic Spelling
- Easy to Learn
- Large Vocabulary
- No Exceptions
- Fosters Clear Thought
- Variety of Uses
- Demonstrated with Prose and Poetry
Brandon Wirick, 2005
169Lojban at a Glance
Example sentence in English Wild dogs
bite. Translation into Lojban loi cicyge'u cu
batci cilce (cic) - x1 is wild/untamed gerku
(ger, ge'u) - x1 is a dog/canine of species/breed
x2 batci (bat) - x1 bites/pinches x2 on/at
specific locus x3 with x4 cilce gerku ? (cic)
(ge'u) ? cicyge'u
Brandon Wirick, 2005
170How Would Lojban and the Semantic Web Work
Together?
- Currently, most upper ontologies use English
- Not really English, but arbitrary class names
- Classes meanings cannot be directly inferred
from their names, nor vice-versa - Translating English prose into Semantic Web
documents would be difficult - Class choices depend on context within prose
- English prose is highly idiomatic
- Lojban does not have these problems
Brandon Wirick, 2005
171English v. Lojban
Brandon Wirick, 2005
172OWL to the Rescue
- XML-based. RDF on steroids.
- Designed for inferencing.
- Closer to the domain.
- Dont need a PhD to understand it.
- Information sharing.
- RDF-compatible because it is RDF.
- Growing number of published OWL ontologies.
- URIs make it easy to merge equivalent nodes.
- Different levels
- OWL lite
- OWL DL (description logics)
- OWL full (predicate logic)
Frank Vasquez, 2005
173Description Logic
- Classes
- Things, categories, concepts.
- Inheritance hierarchies via subclasses.
- Properties
- Relationships, predicates, statements.
- Can have subproperties.
- Individuals
- Instances of a class.
- Real subjects and objects of a predicate.
Frank Vasquez, 2005
174Visualizing the Data Model
- Venn Diagrams and Semantic Networks.
Images from University of Manchester
Frank Vasquez, 2005
175RDF Ontologies
- Dublin Core
- FOAF
- RDF vCard
- RDF Calendar
- SIMILE Location
- SIMILE Job
- SIMILE Apartment
Frank Vasquez, 2005
176Fixing Modeling Conflicts
1. mapAL Match(MA, ML)
Frank Vasquez, 2005
177Post-Test
178Evaluation
179Important Concepts and Terms
- attribute
- common-sense knowledge
- concept
- data
- derivation
- entailment
- epistemology
- expert system (ES)
- expert system shell
- facet
- frame
- graph
- If-Then rules
- inference
- inference mechanism
- information
- knowledge
- knowledge base
- knowledge-based system
- knowledge representation
- link
- logic
- meta-knowledge
- node
- noise
- object
- production rules
- reasoning
- relationship
- rule
- schema
- script
- semantic net
- slot
180Summary Knowledge Representation
- knowledge representation is very important for
knowledge-based system - popular knowledge representation schemes are
- rules, semantic nets, schemata (frames, scripts),
logic - the selected knowledge representation scheme
should have appropriate inference methods to
allow reasoning - a balance must be found between
- effective representation, efficiency,
understandability
181(No Transcript)
182(No Transcript)
183(No Transcript)