3 KNOWLEDGE REPRESENTATIONS

topsalmonAI and Robotics

Feb 23, 2014 (3 years and 5 months ago)

115 views

3 KNOWLEDGE REPRESENTATIONS



3.1. Attributes of Knowledge



3.1.1. Types


procedural



knowing how to do something



how to boil a pot of water


declarative



knowing that something is true or false



statement such as “get burned if you put fingers in
a pot of
boiling water”


control



knowing which rules to use to solve problems



choice of pot/stove


3.1.2. Levels of knowledge


shallow



surface level information that can be used to deal with
specific situation



is described by common words and sentences


deep



information that reveal internal and causal structure of a
system which can be applied to different situations



is described by words and sentences of more technical
meanings


Notes:

1.

qualitative terms, no measure regarding depth of knowledge

2.

in some
circumstances, shallow knowledge may suffice

3.

level of knowledge to be used may determine level of
performance


3.1.3. Hierarchy of knowledge


noise

items of no interest


data

values actually stored in a database that are of potential interest


informat
ion

meanings of those values as understood by some users
(processed data)


knowledge

specialized information about the world that allows somebody
to make decision


metaknowledge

knowledge about knowledge


expertise

specialized operative knowledge that is
i
nherently

task
-
specific

and
relatively inflexible


intelligence

the capability to
acquire

and
apply

knowledge


3.1.4. Pragmatic aspects


naming

ways to denote objects by name


describing

ways to specify properties objects have


organizing

ways to categ
orize objects into hierarchy or classes


relating

ways to describe relationships among objects


constraining

ways to limit ranges of values, relationships and organizational
structures for attributes of objects

3.2. What Is Knowledge Representation (K
R)?



3.2.1. A KR is a surrogate



a KR functions as a surrogate inside the reasoner, a stand
-
in
for the things that exist in the world



the only completely accurate representation of an object is the
object itself, all other representations are inaccurate
, they
contain simplifying assumptions and artifacts



consequence of inevitability of imperfect surrogates: in
describing natural objects in the world, we must lie by


* omitting some of the limitless complexity of natural




world


* introducing artif
acts not present in natural world



3.2.2. A KR is a set of ontological commitments



ontology: concerned with what exists in the world



selecting a representation means making a set of ontological
commitments which are, in effect, a strong pair of glasses

that
determine what we can see

3.2.3. A KR is a fragmentary theory of intelligent



reasoning (IR)


representation’s fundamental conception of IR



mathematic logic: IR is some variety of formal calculation,
typically, deduction



psychology: IR is s
een as characteristic human behavior


set of inferences that representation sanctions



logic: sanctions sound inferences, those encompassed by
logical entailment, in which every model for the axiom set is
also a model for the conclusion



rule
-
based: captur
e guesses of the sort that a human expert
makes, guesses that are not necessarily either sound or true in
any model


set of inferences that representation recommends



representation and reasoning are intertwined



different representations recommend differen
t inferences



3.2.4. A KR is a medium for efficient computation



a KR offers a set of ideas about how to organize information
in ways that facilitate making inferences



computational efficiency central to notion of representation


3.2.5. A KR is a me
dium of human expression



medium of expression and communication in which we tell
machine and one another about the world



is the language in which we communicate, hence, we must be
able to speak it without heroic effort


3.2.6. Some guidelines



make a con
scious effort in selecting a KR for tasks at hand



avoid using a KR for unintended purposes



cannot take the singular role of representation to be
conveying knowledge contents



when combining representations, have to determine how two
theories of intelligent
reasoning might work together



evaluation criteria


* quality of basic knowledge structure, storage and



retrieval mechanisms


* quality of KR environment

3.3. Production Rules



3.3.1. General idea



based on the notion of condition
-
action pai
rs


if
condition

then
action



components


* rule base: set of production rules


* global database: contains problem states


* control system: determine which rules to apply and






termination of deduction



8
-
puzzle example


* basic elements o
f a problem definition: states and actions


* the initial state


* set of possible actions (operators)


* state space: set of all states reachable from the initial



state by any sequence of actions


* path in the state space: any sequence of action
s leading



from one state to another


* goal test (state that satisfies goal test will be a goal state)


* path cost: function that assigns a cost to a path


* solution: a path from the initial state to a state that



satisfies the goal test


3
.3.2. Objects and their attributes/values, and clauses




building blocks of condition/action: AV
-
pairs



attributes have:


* name and type


* prompt


* legal values


* confidence factors



AV
-
pair table



clauses


3.3.3. Rules




properties: name, priori
ty, cost, confidence factor



rule status



rule organization: disjunctive premise, multiple conclusions,
grouping and ordering



commutative rules


3.3.4. Control system


chaining



forward (data
-
driven)



backward (problem
-
reduction)



bi
-
directional


strategies



irrevocable:



backtracking



graph search


decomposability



database



goals


3.3.5. Rules as a KR



ontological commitment: view the world in terms of object
-
attribute
-
value triple, and rules of plausible inference that
connect them



inference recommended:

plausible inferences which are
modeled after behavior of human expert (rather than an
abstract formal model)



facilitate plausible inferences by supplying indexes from facts
(goals) to rules


3.4. Semantic Networks



3.4.1. Components



a graphical re
presentation in which


* nodes: objects, events, concepts, or situations


* links: relationships among them



relationships


* IS
-
A: an instance in a set


* AKO: subset in a set


* HAS
-
A: part in an object


* EQ: function applied to tail node yie
lds head node



examples


* from
Principles of AI
, Nils Nilsson, Morgan Kaufman


3.4.2. Representing knowledge




representing connectives


* use of enclosure, a closed dashed line



asserting properties


* use of sorted
-
variable nodes



property inheritanc
e

3.4.3. Reasoning




through matching


* given: fact network and goal network


* find a match between the two



syntactic matching



semantic matching



matching involving variables




3.4.4. Semantic networks as a KR



ontological commitment: view the w
orld in terms of objects
and certain relationships that connect them



inference recommended: matching process (bi
-
directional
propagation through the networks



appropriate set of links to facilitate bi
-
directional propagation



introduced concept such as prop
erty inheritance


3.5. Frames



3.5.1. Structure



name
: identification for frames



parent
: property inheritance via hierarchical structure



slot
/
value

pairs: attributes describing objects



predicate

conditions for slots: monitor update/retrieval of
info
rmation in frame
-
based systems


*
if
-
needed

predicates


*
if
-
added

predicates


*
if
-
removed

predicate


3.5.2. Property inheritance



frames are organized into a hierarchy with each element at a
lower level inheriting the properties of its ancestors



eac
h frame may include all the slots of its ancestors



slot value inheritance

(retrieval): a frame may inherit the
value of an inherited slot without explicitly containing the
slot



slot name inheritance (updating): a frame may inherit the
name of an inherited
slot by explicitly adding it (any attached
predicate will also be inherited)

3.5.3. Exceptions and defaults




objects/events usually have


* regular (default) behavior, and


* exceptional behavior



static situation
: exception handling is provided thr
ough
redefinition of the value of an inherited slot at a lower level in
the hierarchy of inheritance



dynamic situation
: by dynamically changing the frame where
exception occurs


* slot name explicitly inherited


* a different value is assigned



3.5.4.

Attached predicates



purposes:


* maintain integrity of KB


* provide for dynamic information management


* associate rules with frames



usage: predicates used to
restrict access
, offer
controlled
updating
, guarantee
data

integrity
, compute
dynamic dat
a



processing procedures


*
if
-
needed

predicates


*
if
-
added

predicates

3.5.5. Logical operations on frames


can define a set of built
-
in predicates that operate on frames




new_frame(frame_name, parent)



delete_frame(frame_name)



add_slot(frame_name, sl
ot_name)



delete_n_frame: delete all new frames created during
execution



is_a(x, y): check if frame x is an instance of frame y



has_a(x, y): check if frame x has a slot y



has_parent(x, y): check if frame x has frame y as its parent



has_value(frame_name,
slot_name): check if slot has a value



3.5.6. Combining rules with frames




rules that act on frames



frames that trigger rules (through attached predicates)



frames, rules and relational databases

3.5.7. Frames as a KR



based on insights about human
cognition and organization of
knowledge in memory



ontological commitment:


* to view the world in terms of stereotypical descriptions


* to link frames into systems to capture perspective shifts



theory of IR


* reasoning is based on recognition (matchin
g stereotypes



against individual instances)


* inferences sanctioned are based on good matches,



expectations, or defaults, which are unsound


* recommended inference is anticipatory matching



medium for efficient computation


* triggers and pro
cedural attachment


* taxonomic hierarchies



medium of expression


* useful for describing concepts in natural world


* need some way of indicating what properties an object



typically has, without committing to statements about



what is always t
rue


3.6. First Order Predicate Logic


FOP calculus consists of:



first order language (set of well
-
formed formulas,
wff
);



a set of axioms;



a set of inference rules.


Notes:

1.

wff: legitimate expressions in the language

2.

syntax of wffs (construction and

derivation)

3.

semantics of wffs (interpretation)


3.6.1. First order language


Alphabet of Symbols

consists of seven classes of symbols



variables



constants



functions



predicates



connectives



conjunction

(


);
disjunction

(


);
implication

(


);



log
ical

equivalence

(


);
negation

(


)



quantifiers



universal

(


);
existential

(


)



auxiliary symbols (parentheses, commas)

Notes:

1.

last three classes are the same for every alphabet

2.

first four classes vary from alphabet to alphabet

3.

for any alphabet,
only second and third classes may be empty

4.

binding order


wffs



terms:



* a variable is a term



* a constant is a term



* if f is an n
-
ary function and t
1
,...,t
n

are terms, then




f(t
1
,...,t
n
) is a term



ground terms: terms not containing variables



wffs



* if p is an n
-
ary predicate symbol and t
1
,...,t
n

are terms,




then p(t
1
,...,t
n
) is a wff



* if F and G are wff, then so are:





F, F

G, F

G, F

G, F

G



* if F is a wff and x is a variable, then so are:

xF,

xF



atomic formulas
(atoms)



literals

Notes
: The first order language given by an alphabet consists of
the set of all wffs constructed from the symbols of the alphabet.

Syntactical Properties of wffs



the scope of

x (

x ) in

xF (

xF ) is F



bound and free variables



* an

occurrence of a variable in a wff is
bound

iff it is




within the scope of a quantifier employing the variable



* an occurrence of a variable in a wff is
free

iff it is not




bound



closed wffs (sentences): a
closed wff

is one with no free
occurrences
of any variable



ground wffs a wff with no variables is referred to as a
ground
wff



Propositions




a subset of wffs where variables are not used



useful in many simplified domains and applications

3.6.2. Semantics of wffs


Connection between Formal Lang
uage and Structures


Interpretations


Truth Values of wffs



atoms



wffs with connectives



wffs with quantifiers


Some Examples





3.6.3. Logical equivalence


Definition:

if truth values of two wffs are the same under every interetation,
then they are logi
cally equivalent.


Set of Equivalences

3.6.4. Models and validity/inconsistency of wffs


Models



Consistent wffs (satifiable wffs)



Inconsistent wffs (unsatisfiable wffs)



Valid wffs (tautology)



Invalid wffs



Notes:

1.

A wff is valid iff its negatio
n is inconsistent.

2.

A wff is inconsistent iff its negation is valid.

3.

If a wff is valid, then it is consistent, but not vice versa.

4.

If a wff is inconsistent, then it is invalid, but not vice versa.


3.6.5. Logical consequence


Definition

Given wffs F1,..
., Fn, and a wff G, G is said to be a
logical
consequence

of F1, ..., Fn (or, G
logically follows

F1, ..., Fn; or
F1, ..., Fn
logically

imply

G) iff a model of F1, ..., Fn is also a
model of G.




Theorem 1

Given wffs F1, ..., Fn, and a wff G, G is a
logic
al consequence

of F1,..., Fn iff the following wff is valid

(F1


...


Fn)


G




Theorem 2

Given wffs F1,...,Fn, and a wff G, G is a logical consequence of
F1,...,Fn iff the following wff is inconsistent

F1


...


Fn



G


3.6.6. Predicate logic as
KR





ontological commitment


* viewing the world in terms of individual entities and



relations between them





theory of IR


* reasoning is some formal calculation, typically, deduction,



that is based on an abstract formal model


* inferences sanctio
ned are sound inferences, those



encompassed by logical entailment, in which every model



for the axiom set is also a model for the conclusion


* representation itself does not provide recommended



inferences, therefore, the user must select inferences