Knowledge Representation - PowerPoint PPT Presentation

1 / 48
About This Presentation
Title:

Knowledge Representation

Description:

... functions, and constants (ontology of the domain) ... Encode general knowledge about the domain. Encode a description of the specific problem instance ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 49
Provided by: shyhka
Category:

less

Transcript and Presenter's Notes

Title: Knowledge Representation


1
Knowledge Representation
  • Shyh-Kang Jeng
  • Department of Electrical Engineering/
  • Graduate Institute of Communication Engineering
  • National Taiwan University

2
References
  • J. P. Bigus and J. Bigus, Constructing
    Intelligent Agents with Java, Wiley Computer
    Publishing, 1998
  • S. Russell and P. Norvig, Artificial
    Intelligence A Modern Approach, Englewood
    Cliffs, NJ Prentice Hall, 1995

3
Goal-Based Agents
Sensors
Environment
State
Environment Model
Options
Decision Maker
Goals
Agent
Effectors
4
Knowledge-Based Agents
Sensors
Environment
Knowledge Base Management System
Knowledge Base
Agent
Effectors
5
General Knowledge-Based Agent (1)
  • class KBAgent
  • KnowledgeBase kb
  • KBMS kbms
  • counter t // indicating time
  • public KBAgent()
  • kb new KnowledgeBase()
  • kbms new KBMS( kb )
  • t 0

6
General Knowledge-Based Agent (2)
  • public Action run(Percept percept)
  • kbms.tell(new
  • PerceptSentence(percept, t))
  • Action action kbms.ask( new
  • ActionQuery(t) )
  • kbms.tell( new
  • ActionSentence(action,t) )
  • t return action

7
Knowledge Base
  • A set of representation of facts about the world
  • Each individual representation is a sentence
  • Sentences are expressed in a knowledge
    representation language
  • Knowledge representation languages are composed
    of symbols
  • Representation and reasoning support the
    operation of a knowledge-based agent, accessed
    through a knowledge base management system (KBMS)

8
Knowledge Representation
  • Natural language
  • Most easily understood for people
  • Not the best for computers because of ambiguity
  • Formal logic was the first representation
    language

9
Procedural Representation
  • Encodes facts and defines sequence as well as the
    control structure of operations for using and
    manipulating those facts
  • Example FORTRAN programs
  • hardcoded logic
  • Not considered to be part of AI per se
  • Few AI programs exist which do not contain some
    amount of procedural control code

10
Declarative Representation
  • Simply states facts, rules, and relationships
  • Separate the knowledge and the manipulation of
    the knowledge
  • Still needs to be processed by some procedural
    code
  • More easily modified
  • Allows for optimization and reuse inferencing
    procedures

11
Relational Representation
  • Knowledge is stored in a table and manipulated
    through relational calculus
  • Information of an item is represented by tuples
    or records
  • Each tuple contains a set of fields or columns
    defining specific attributes and values of the
    item
  • Flexible but not good at representing complex
    relationships between concepts or objects in the
    real world

12
Hierarchical Representation
  • Represents relationships and shared attributes
    between kinds or classes of objects
  • Use categories or types to give structure to the
    world by grouping similar objects together
  • Allows for compact representation
  • Allows reasoning algorithms to process at
    different levels of abstraction or granularity

13
Frames
  • As a collection of attributes which defines the
    state of an object and its relationship to other
    frames
  • Also called slot-and-filler data representations
  • Slots are the data values
  • Fillers are attached procedures which are called
    before, during, or after the slots value is
    changed
  • Often linked to a hierarchy

14
A Frame Example
isa
isa
isa
isa
isa
15
Semantic Nets
  • Defines the meaning of a concept by its
    relationships to other concepts
  • Uses a graph data structure, where nodes hold
    concepts and links show the relationships
  • Both frames and semantic nets can be transformed
    to predicate logic

16
A Semantic Net Example
has-part
Vehicle
Wheels
has-part
isa
has-part
Motor
Doors
Automobile
num-wheels
isa
size
4
Sports Car
Small
num-doors
2
instance
Corvette
17
Knowledge Representation Language
  • Syntax
  • describes the possible configurations that
    constitute sentences
  • Semantics
  • determines the facts in the world to which the
    sentences refer
  • Logic
  • A language with the syntax and semantics defined
    precisely

18
Logics
  • A logic consists of
  • A formal system for describing states of affairs,
    consisting of the syntax and the semantics of the
    language
  • A proof theory
  • The ontological commitments of a logic have to do
    with the nature of reality in the related world
  • The epistemological commitments of a logic have
    to do with states of knowledge an agent can have

19
Propositional Logic Syntax
20
Propositional Logic Semantics
  • Defined by specifying the interpretation of the
    symbols and constants, and specifying the
    meanings of the logical connectives
  • A complex sentence has a meaning derived from the
    meaning of its parts
  • Each connective can be thought of as a function
    and defined by truth tables

21
Truth Tables for Connectives
22
Test for Valid Sentences
  • A valid sentence is true for every possible
    combination of truth values for the propositional
    symbols in the sentence
  • Truth table can be used to test for valid
    sentences
  • This can be used to determine if the conclusion
    (consequent) is true given some premises
    (antecedent). Just test if the following sentence
    is valid


23
First-Order Logic Syntax
24
Quantifiers
  • Universal quantifier
  • Existential quantifier

25
Some Properties of Quantified Sentences
26
First-Order Logic vs.Higher-Order Logic
  • In first-order logic one can quantify over
    objects but not over relations or functions on
    those objects
  • Higher-order logic allows us to quantify over
    relations and functions as well as over objects
  • Example

27
Accessing First-Order Logic KB
  • Assertions
  • Example
  • Queries or goals
  • Example
  • Substitution or binding list
  • Example

28
Sets and Lists
  • Sets
  • Constant EmptySet
  • Predicates Set, Member, Subset
  • Functions Intersection, Union, Adjoint
  • Lists
  • Constant Nil
  • Functions Cons, Append, First, Rest
  • Predicates Find, Member, List?

29
Special Notations for Sets and Lists
30
The Wumpus World
31
Agent in the Wumpus World
  • The agent starts in the lower left corner labeled
    1,1, facing to the right
  • Goal Find the gold, return to 1,1 and climb
    out of the cave as soon as possible
  • Actions Forward, Turn(Right), Turn(Left), Grab,
    Release, Shoot, Climb
  • Percepts Stench, Breeze, Glitter, Bump, Scream

32
Acting and Reasoning in the Wumpus World (1)
33
Acting and Reasoning in the Wumpus World (2)
34
Acting and Reasoning in the Wumpus World (3)
35
Acting and Reasoning in the Wumpus World (4)
36
Knowledge After the Third Move
37
Propositional Knowledge Base After the Third Move
38
Finding the Wumpus
39
Problems with Propositional Agent
  • Too many propositions to handle
  • Example 64 propositions for the rule dont
    forward if the wumpus is in front of you
  • Dealing with change over time
  • Example

40
Reflex Agent
  • Action run(Percept percept)
  • state
  • interprete(percept)
  • rule
  • kbms.ruleMatch(state)
  • action rule.Action()

41
Reflex Agent for the Wumpus World (1)
  • Direct rules
  • Example
  • Mediated rules
  • Example

42
Reflex Agent for the Wumpus World (2)
  • Limitations
  • Unable to know the states
  • Example Not knowing when to climb
  • Unable to avoid infinity loop

43
Model-Based Agent
  • Maintain an internal model of the world
  • Any system that makes decisions on the basis of
    past percepts can be rewritten to use instead a
    set of sentences about the current world state
  • Example My keys are in my pocket
  • Diachronic rules
  • Rules describing the way in which the world
    changes or does not change

44
Knowledge Engineering
  • Knowledge engineering
  • Process of building knowledge base
  • Knowledge engineer
  • Knowledge acquisition
  • Prior to, or interleaved with, the process of
    creating formal representations

45
Knowledge Engineering vs. Programming
46
Knowledge Engineering Methodology
  • Ontological engineering
  • Decide what to talk about
  • Decide on a vocabulary of predicates, functions,
    and constants (ontology of the domain)
  • Encode general knowledge about the domain
  • Encode a description of the specific problem
    instance
  • Pose queries to the inference procedure and get
    answers

47
General Ontology
  • Ontology
  • Particular theory of the nature of being or
    existence
  • General ontology
  • Applicable in more or less any special-purpose
    domain, with the addition of domain-specific
    axioms
  • Examples Categories, measures, composite
    objects, time, space, change, events, processes,
    physical objects, substances, mental objects,
    beliefs

48
A General Ontology Hierarchy
Write a Comment
User Comments (0)
About PowerShow.com