Knowledge Representations - PowerPoint PPT Presentation

1 / 62
About This Presentation
Title:

Knowledge Representations

Description:

Not considered to be part of AI per se. Few AI programs exist which do not contain some amount of procedural control code ... – PowerPoint PPT presentation

Number of Views:36
Avg rating:3.0/5.0
Slides: 63
Provided by: shyhka
Category:

less

Transcript and Presenter's Notes

Title: Knowledge Representations


1
Knowledge Representations
  • 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
Resource Description Framework (RDF)
  • Enables the encoding, exchanging and reuse of
    structured metadata through using common
    conventions of semantics, syntax, and structure
  • Recommended by W3C to model meta-data about the
    resources of the web
  • Can be used in a knowledge representation system

18
RDF Data Model
RDF Description
Property Type1
Property Type3
Resource1
Resource2
Resource3
PropertyType2
PropertyType4
Atomic Value
Atomic Value
19
RDF Data Model
  • The author of Document1 is John Smith
  • John Smith is the author of Document1

Document1
Author
John Smith
20
RDF Data Model
Document1
Author_001
Author
Email
Name
Affiliation
smith_at_home.com
John Smith
Home, Inc
21
RDF Syntax
  • lt?xmlnamespace ns http//www.w3.org/RDF/RDF/
    prefix RDF ?gt
  • lt?xmlnamespace ns http//purl.oclc.org/DC/
    prefix DC ?gt
  • ltRDFRDFgt
  • ltRDFDescription RDFHREF http//uri-of-Docum
    ent-1gt
  • ltDCCreatorgtJohn Smithlt/DCCreatorgt
  • lt/RDFDescriptiongt
  • lt/RDFRDFgt

22
RDF Syntax (1)
  • lt?xmlnamespace ns http//www.w3.org/RDF/RDF/
    prefix RDF ?gt
  • lt?xmlnamespace ns http//purl.oclc.org/DC/
    prefix DC ?gt
  • lt?xmlnamespace ns http//www.w3.org/RDF/RDF/
    prefix RDF ?gt
  • lt?xmlnamespace ns http//person.org/BusinessCa
    rd/ prefix CARD ?gt

23
RDF Syntax (2)
  • ltRDFRDFgt
  • ltRDFDescription RDFHREF http//uri-of-Docum
    ent-1gt
  • ltDCCreator RDFHREF
  • Creator_001/gt
  • lt/RDFDescriptiongt
  • ltRDFDescription IDCreator_001gt
  • ltCARDNamegtJohn Smithlt/CardNamegt
  • ltCARDEmailgtsmith_at_home.net
  • lt/CARDEmailgt
  • ltCARDAffiliationgtHome,Inc.
  • lt/CARDAffiliationgt
  • ltRDFDescriptiongt
  • lt/RDFRDFgt

24
Use of RDF
  • Once the web has been sufficiently populated
    with rich metadata, what can we expect? First,
    searching on the web will become easier as search
    engines have more information available, and thus
    searching can be more focused. Doors will also
    be opened for automated software agents to roam
    the web, looking for information for us or
    transacting business on our behalf. The web of
    today, the vast unstructured mass of information,
    may in the future be transformed into something
    more manageable and thus something far more
    useful.

  • -- Ora Lassila

25
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

26
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

27
Propositional Logic Syntax
28
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

29
Truth Tables for Connectives
30
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


31
First-Order Logic Syntax
32
Quantifiers
  • Universal quantifier
  • Existential quantifier

33
Some Properties of Quantified Sentences
34
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

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

36
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?

37
Special Notations for Sets and Lists
38
The Wumpus World
39
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

40
Acting and Reasoning in the Wumpus World (1)
41
Acting and Reasoning in the Wumpus World (2)
42
Acting and Reasoning in the Wumpus World (3)
43
Acting and Reasoning in the Wumpus World (4)
44
Knowledge After the Third Move
45
Propositional Knowledge Base After the Third Move
46
Finding the Wumpus
47
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

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

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

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

51
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

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

53
Knowledge Engineering vs. Programming
54
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

55
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

56
A General Ontology Hierarchy
57
Ontology for Computer Applications
  • Defines the terms used to describe and represent
    an area of knowledge
  • Used by people, databases, and applications that
    need to share domain information (a domain is
    just a specific subject area or area of
    knowledge, like medicine, tool manufacturing,
    real estate, automobile repair, financial
    management, etc.)
  • Includes computer-usable definitions of basic
    concepts in the domain and the relationships
    among them

58
Semantic Web
  • A vision for the future of the Web in which
    information is given explicit meaning, making it
    easier for machines to automatically process and
    integrate information available on the Web
  • Built on XML's ability to define customized
    tagging schemes and RDF's flexible approach to
    representing data

59
Next Element Required for Semantic Web
  • A Web ontology language which can formally
    describe the semantics of classes and properties
    used in web documents
  • In order for machines to perform useful reasoning
    tasks on these documents, the language must go
    beyond the basic semantics of RDF Schema

60
Ontology for Semantic Web Applications
  • Need to specify descriptions for the following
    kinds of concepts
  • Classes (general things) in the many domains of
    interest
  • The relationships that can exist among things
  • The properties (or attributes) those things may
    have

61
Ontology for Semantic Web Applications
  • Usually expressed in a logic-based language, so
    that detailed, accurate, consistent, sound, and
    meaningful distinctions can be made among the
    classes, properties, and relations
  • Some ontology tools can perform automated
    reasoning using the ontologies, and thus provide
    advanced services to intelligent applications
    such as conceptual/semantic search and
    retrieval, software agents, decision support,
    speech and natural language understanding,
    knowledge management, intelligent databases, and
    electronic commerce.

62
DAMLOIL
  • DAML
  • DARPA Agent Markup Language
  • Improvement of RDF for semantic web applications
  • Not a W3C initiative
  • A more expressive schema language
  • OIL
  • Ontology Inference Layer
  • DAML OIL as an ontology language
Write a Comment
User Comments (0)
About PowerShow.com