Knowledge Representation - PowerPoint PPT Presentation

1 / 30
About This Presentation
Title:

Knowledge Representation

Description:

'If car-light is off, first check light bulb, then battery, then ... Further rules of inference: resolution, Horn-clauses (PROLOG) 8. Logic: Examples ... – PowerPoint PPT presentation

Number of Views:60
Avg rating:3.0/5.0
Slides: 31
Provided by: FB487
Category:

less

Transcript and Presenter's Notes

Title: Knowledge Representation


1
Knowledge Representation
  • Classification of knowledge types
  • Methods for knowledge representation
  • Logic
  • Semantic nets
  • Frames, objects
  • Rules

2
KnowledgeTwo different points of view must be
considered
  • Aspects, points of view
  • Types of knowledge (what we know)
  • Types of knowledge representation (how we
    represent it)
  • Example 1 what we know about the weight of
    objects
  • Every object has a weight!
  • Objects can be composed of objects!
  • The total weight is the sum of all partial
    weights!
  • The weight of humans tends to increase
    temporarily during x-mas time
  • Example 2 How to represent the total weight (w)?
  • As a fact? w 120 kg
  • As a procedure? w length width height 2
    kg/cm3
  • Or as a rule? IF x-mas and human THEN w w1,15

3
Types of Knowledge From a Representation Point
of View
  • Knowledge about objects
  • Attributes with values (weight is ...",
    return-on-investment is ...")
  • Knowledge about relations between objects
  • Taxonomic (structure/classification "is of type
    ...", consists of ...")
  • Causal (cause/consequence is result of ...",
    if ... then ...")
  • Knowledge about procedures
  • Steps and sequence of problem solving
  • (If car-light is off, first check light bulb,
    then battery, then ...")
  • Knowledge about using knowledge
  • Meta-knowledge (use correct knowledge at the
    right time")
  • (If car-light doesn't work all the time, then
    check voltage regulator")

declarative
procedural
4
Knowledge Knowledge RepresentationDeclarative
vs. Procedural
  • EXAMPLES
  • Weight of car 700 kg
  • A Car has a weight, a colour, a tank capacity,
    fuel consumption, CruisingRange,
  • A Car consists of an engine and a car body
  • Cruising Range depends onavailable fuel and
    fuelconsumption
  • Total weight sum of all partial weights
  • DECLARATIVE
  • - describes static aspects
  • - FACTS about objects
  • and relations
  • - What is true?!
  • PROCEDURAL
  • - Dynamic Aspects
  • - HOW to generate (new) facts
  • How to use (declarative)
  • Knowledge

REPRESENTATION car weight 700 carparts
(engine, car_body) carCruisingRange
500 carCruisingRange carfuel/carconsumpti
on carweight sum ((carparts)weight)
procedural representation of declarative
knowledge
5
Methods for Knowledge Representation
  • (Propositional-/Predicate-) Logic
  • Semantic nets
  • Attribute-Value-(AV)-tuple/pair
  • Object-Attribute-Value-(OAV)-triple
  • Objects, Frames
  • Rules
  • Constraints

6
Methods for Knowledge Representation Criteria
for Methods-Evaluation
  • Correctness
  • Everything that can be derived must make sense
    (in reality)!
  • Mightiness/Expressiveness
  • Every problem-relevant fact/relation can be
    represented
  • Suitability/Adequacy
  • High correspondence between representation and
    reality
  • Efficiency
  • low costs for derivation of facts (reasoning)
  • Consistency
  • Local confluence (the effect of a derivation
    remains locally restricted, it does not prevent
    other possible derivations)

7
LogicBasic Components
  • Set of facts or propositions which can be either
    TRUE or FALSE
  • General propositions (axioms)
  • Double negation not (not A) A
  • Transitivity of propositions (A ?? B) and (B ??
    C) A ?? C(if (A implies B) and (B implies C)
    then (A implies C))
  • General rules of inference to conclude new
    propositions by using other propositions
  • Modus ponens
  • A is true A implies B consequently B is true,
    too!
  • Further rules of inference resolution,
    Horn-clauses (PROLOG)

8
Logic Examples
  • Simple propositions
  • It's raining" A
  • Propositions about attributes or relations of
    individuals (Predicates, internal structure of
    propositions)
  • The street is wet" wet(X) something can be
    wet, e.g. Xstreet
  • Composed propositions (AND, OR, NOT, IMPLICATION)
  • A ?? wet(street) Its raining" OR The street is
    wet"
  • A ?? wet(street) Its raining" IMPLIES The
    street is wet"
  • Application example What does its raining"
    imply?
  • Modus ponens from A and A ?? wet(street)
    follows wet(street)
  • Quantified (general/special) propositions
  • Quantifiers there exists" ??, "for all" ?
  • ? x ((human(x) ?? (mortal(x)) "all humans are
    mortal"

9
Semantic Nets Intention, Components
  • Founder Quillian et. al. (1968)
  • Intention build an explicit psychological model
    of the human associative memory
  • Components Directed graph with
  • Nodes
  • Individual objects, categories of objects
    (classes), events
  • Edges
  • ANY (semantically arbitrary) relation between TWO
    nodes
  • Binary relation
  • General descriptive model

10
Semantic NetsExample
is-a
CAR
is-a
is-a
VEHICLE
OBJECT
has-part
is-a
WHEEL
has-part
is-a
RIM
has-part
is on
is-a
TYRE
has-a
is-a
can
is-a
FEATURE
WEIGHT
ROLL
11
Semantic NetsExamples for Edges
  • IS-A
  • Generalizing association between objects and
    (sub)classese.g. car IS-A vehicle, BMW IS-A car
    (hopefully -)
  • HAS-A
  • Descriptive association of attribute(-object)s to
    objects/classese.g. car HAS-A color, weight,
    ...
  • HAS-PART
  • Hierarchical decomposition of objects e.g. car
    HAS-PART engine, ...
  • IS ON, CAN, ...
  • Any type of associations e.g. tyre IS ON rim

12
Semantic Nets Flexibility
  • No restrictions for (the semantics of) nodes and
    edges
  • Depends on knowledge domain and individual goals
  • Example Tyre is-on rim"
  • TYRE is-on RIM constructor's
    view"
  • is-a NOUN -a
    linguist'sTYRE Subject
    Object RIM view"
    ISON Preposition is-a VERB

13
Semantic Nets Inheritance
  • IS-A-relation and assumption of transitivity
  • leads to an implicit inheritance hierarchy
  • By using simple procedures
  • all relations of "parent-objects can be
    inherited (applied) to all "child-objects
  • BMW-7.32 is-a "BMW-7.32 has an engine
    and a weight." CAR is-a VEHICLE is-a
    OBJECT ENGINE has-part WEIGHT
    has-a

14
Semantic NetsProblem Individuals
  • But No distinction between individuals
    (instance) and categories of individuals
    (classes)
  • Problem within domains with large numbers of
    exceptions
  • leads to structural redundancy or (many)
    exception-links
  • CAR has-part ENGINE is-a is-a has-par
    t
  • BMW-7.32 AUDI-80 CYLINDERquantity- quantity-
    quantity-cylinder-is cylinder-is is
  • 6 4 4
  • Advantage OOP instance-variable with overwrite

15
Semantic Nets Reasoning Techniques
  • Spreading-activation
  • Search for connections between nodes
  • Matching
  • Search for a suitable structure, which represents
    the question/problem.
  • Can a BMW-7.32 roll?"
    Is there a BMW, which can roll?"
  • BMW-7.32 is-a BMW ? is-a is-ahas
    -part CAR BMW TYRE can can ROLL
    ROLL

16
Semantic Nets Problems and Limits
  • Size of the net (tends to explode)
  • Only declarative
  • Semantic is not unambiguous
  • Representation of exceptions is difficult
  • No distinction between individuals (instance) and
    categories of individuals (classes)

17
FramesIntention, Components
  • Founder Minsky (1975)
  • Intention situation based knowledge
    representation
  • Definitions
  • A FRAME is a DATA STRUCTURE
  • Represents a typical SITUATION, e.g. children's
    birthday party
  • Stores related INFORMATION
  • of DECLARATIVE and/or PROCEDURAL type
  • in SLOTS.
  • FRAMES can be organized HIERARCHALly.
  • FRAMES can be classes, sub-classes and Instances
    (concrete objects).

18
FramesExample (Class)
  • CHAIR
  • specialization of furniture
  • Number of chair legs default4 IF
    (Type of chair legs) rollers THEN 5
  • Type of chair legs (fixed, rollers)
  • Panel weight panel-volume
    specific gravity of the
    panel-material Panel material (glass, wood,
    stone)
  • Panel volume a number

19
FramesExample (Instance)
  • Eric's CHAIR
  • specialization of chair
  • Number of chair legs 5 Type of chair legs
    rollers
  • Panel weight 20 kg Panel material glass
  • Panel volume 0.1 m 3

20
FramesSlots
  • Declarative and/or procedural
  • Similar to frame structure (facets)
  • E.g. default, allowed values, ...
  • Attached-procedures
  • if-needed
  • if-added
  • if-removed
  • Single value or multi value
  • Slot types with fixed semantics and implicit
    functionality
  • Specialization-of (implements inheritance
    property)

21
Objects (Object Oriented Programming)Characterist
ics
  • More general concept (than frames)
  • Origin Software Engineering
  • Primary focus on re-use not knowledge
    representation
  • Characteristics
  • Encapsulation
  • Classes vs. Instances
  • Inheritance
  • Message passing
  • Polymorphisms
  • But Frames can be considered as a special case"

22
ObjectsEncapsulation
  • Objects
  • (heterogeneous) Data structure methods
    (procedures)
  • Data access/data manipulation
  • NO direct access from the outside
  • ONLY through class or instance methods

Methods
Data
23
ObjectsClasses/Instances/Inheritance
  • Class object type (abstract object)
  • comprising common data and methods
  • of instances (concrete objects)
  • or sub-classes (specialized cases) constituting a
    class hierarchy
  • Along the class hierarchy (top-down)-inheritance
    of
  • Data structure (instance variables)
  • Data (prototype values)
  • Methods
  • Inheritance procedures
  • Re-definition, specialization
  • Single/multi inheritance

24
ObjectsMessage Passing/Polymorphism
  • Communication (information exchange) between
    objects ONLY by sending messages
  • e.g. SendMessage(EricsChair, setValue,
    number_rollers, 5)
  • Focus on WHAT instead of HOW
  • Same massages may trigger different actions (at
    receiving object)
  • Action depends on IMPLEMENTATION of the methods

graphic object
PRINT
SHOW
textobject
25
KappaPC object-oriented tool-set (used in
tutorials)with pre-defined classes for knowledge
representation
  • ObjectBrowser
  • graphical tool for modeling (and manipulation) of
    all objects of a Kappa-application (classes and
    instances with hierarchical structure)

26
KappaPC-Tool Object BrowserModeling Objects'
structure
  • class Auto (Car)
  • sub-class Sportwagen (sports car)
  • Instance RalfsAuto (RalfsCar)
  • sub-class Limousine
  • Instance HeikosAuto (HeikosCar)

27
KappaPC-Tool Class Editor Declarative Knowledge
Representation (Slots)
Prototype values
28
KappaPC-Tool Class/Slot-EditorInternal Slot
structure (facets)
number of allowed values
Actualslot value
data typeof slot
selection list of allowedvalues
determinesif slot values are to be inherited or
not
Behaviour (methods) for certain (pre-defined)
events (e.g. "If Needed" slot value is
requested, but has not yet a value)
29
KappaPC-Tool Class/Method EditorProcedural
Knowledge Representation (Methods)
If required, slot Aktionsradius of class Auto is
to be calculated from slots Tankinhalt and
Aktionsradius !
Self is just a placeholder for the actual object
(instance of class Auto), executing the method!
30
KappaPC-Tool KAL-InterpreterCommand-line
communication interface
  • communication options
  • a) in short (not OO-like)
  • to set slot valuesltobjectgtltslotgtvalue
  • to retrieve slot valuesltobjectgtltslotgt
  • b) by message passing (OO-like)

if slot value is empty, the inquiry of slot value
triggers the if-needed-event,e.g. it triggers
the execution of method "AktionsradiusBerechnen" (
Question will the slot value be filled
afterwards?)
Write a Comment
User Comments (0)
About PowerShow.com