Knowledge Representation
Knowledge Representation
1 Course textbook:
Textbook
Stuart Russell, Peter Norvig.
Artificial Intelligence: A modern approach.
2nd edition, Prentice Hall, 2002
Other books
Brachman, Levesque.
Knowledge Representation and Reasoning.
Morgan Kaufman, 2004
06/26/2023
Knowledge representation
Artificial Intelligence
• The field of Artificial intelligence:
– The design and study of computer systems that behave
intelligently
• AI programs:
– Go beyond numerical computations and manipulations
– Focus on problems that require reasoning (intelligence)
– and often a great deal of knowledge about the world
• Success in solving the problems depends naturally on our
ability to:
– Represent the knowledge about the world
– Reason with the knowledge to obtain meaningful
answers
06/26/2023
Knowledge representation
3
• Knowledge representation (KR) is the study of
– how knowledge and facts about the world can be
represented, and
– what kinds of reasoning can be done with that
knowledge.
Knowledge-based agent
4 Knowledge base
Inference engine
Example: MYCIN
• MYCIN: an expert system for diagnosis of bacterial infections
• Knowledge base represents
– Facts about a specific patient case
– Rules describing relations between entities in the bacterial
infection domain
If 1. The stain of the organism is gram-positive, and
2. The morphology of the organism is coccus, and
3. The growth conformation of the organism is chains
Then the identity of the organism is streptococcus
• Inference engine:
– manipulates the facts and known relations to answer
diagnostic queries (consistent with findings and rules)
06/26/2023
Tentative topics
• Introduction
• AI programming languages - LISP
• Propositional logic and inference
• First order logic and inference
• Extensions of PL and FOL:
– Semantic networks, Frame-based representations
– Inheritance and Defaults
– Ontologies/Semantic Web
– Modeling time
• Planning and acting:
– Situational calculus
– STRIPS
…
06/26/2023
Tentative topics
6 • Modeling Uncertainty
– Extensional models
– Probabilistic models
– Bayesian belief networks
– Markov processes
• Decision-making in the presence of uncertainty
– Decision trees
– Markov decision processes
AI programming languages
Focus on symbolic processing
Special AI Languages:
– LISP (since 1956)
• Symbolics machines – in 80s, special LISP processors –
LISP functions hardwired
– Prolog
– Smalltalk
– Python
• Nowadays:
–C
– Java
06/26/2023
Logic
7 • Many knowledge representation systems rely on some variant
of logic, e.g.:
– Propositional logic
– First order logic
– Temporal logic
• And variety of extensions
Logic defines:
– Syntax: describes how sentences are formed in the
language
– Semantics: describes the meaning of sentences, what is it
the sentence refers to in the real world
Propositional logic
• Simplest type of logic
• Examples:
– Red(car12)
– Brother(Peter, John)
Knowledge representation
Many different ways of representing the same knowledge.
Representation may make inferences easier or more difficult.
Example:
• How to represent: “Car #12 is red.”
Solution 1: ?
06/26/2023
Knowledge representation
9 Many different ways of representing the same knowledge.
Representation may make inferences easier or more difficult.
Example:
• How to represent: “Car #12 is red.”
Solution 1: Red(car12).
– It’s easy to ask “What’s red?”
– But we can’t ask “what is the color of car12?”
Solution 2: ?
Knowledge representation
Many different ways of representing the same knowledge.
Representation may make inferences easier or more difficult.
Example:
• How to represent: “Car #12 is red.”
Solution 1: Red(car12).
– It’s easy to ask “What’s red?”
– But we can’t ask “what is the color of car12?”
Solution 2: Color (car12, red).
– It’s easy to ask “What’s red?”
– It’s easy to ask “What is the color of car12?”
– Can’t ask “What property of car12 has value red?”
Solution 3: ?
06/26/2023
Knowledge representation
10 Many different ways of representing the same knowledge.
Representation may make inferences easier or more difficult.
Example:
• How to represent: “Car #12 is red.”
Solution 1: Red(car12).
– It’s easy to ask “What’s red?”
– But we can’t ask “what is the color of car12?”
Solution 2: Color (car12, red).
– It’s easy to ask “What’s red?”
– It’s easy to ask “What is the color of car12?”
– Can’t ask “What property of car12 has value red?”
Solution 3: Prop(car12, color , red).
– It’s easy to ask all these questions.
Knowledge representation
• Prop(Object, Property, Value)
• Called: object-property-value representation
Knowledge representation
11 • Inheritance
• Properties are inherited from more general concepts
Example:
• Clyde is an Elephant & Elephant is Gray,
Gray
Elephant
Clyde
Knowledge representation
• Inheritance
• Properties are inherited from more general concepts
Example:
• Clyde is an Elephant & Elephant is Gray & Clyde is not grey
Gray Gray
Elephant Elephant
Clyde Clyde
06/26/2023
Ontology
12 If more than one person is building a knowledge base,
they must be able to share the conceptualization.
Commonsense knowledge
• Our ability of answering questions intelligently relies heavily
on general knowledge about the world
• General knowledge about the world and relations that hold in
the world is referred to as commonsense knowledge
• Commonsense knowledge
– a very large corpus of knowledge
– helps us to understand things like:
• A pen can fit in the box
• A box can fit in the pen
• Challenge: representation of commonsense knowledge that
allows us to answer queries and make inferences
– Recent advances: Cyc project
06/26/2023
Cyc project
13 • Cyc is the world's largest and most complete general
knowledge base and commonsense reasoning engine.
– 15000 relations
– 300000 concepts
– 3200000 assertions
– Temporal relations: 37
Topics
• Planning and acting:
– Situational calculus
– STRIPS
• Modeling Uncertainty
– Extensional models
– Probabilistic models
– Bayesian belief networks
– Markov processes
• Decision-making in the presence of uncertainty
– Decision trees
– Markov decision processes