Académique Documents
Professionnel Documents
Culture Documents
n Prerequisites:
g Artificial Intelligence
∙ Search Algorithms
g Logic
∙ Propositional & First Order Logic
g Algorithms & Data Structures
∙ Algorithmic Complexity
g Programming!
∙ C ∨ C++ ∨ Java
∙ http://aima.cs.berkeley.edu/
6
Knowledge and Reasoning
Knowledge and Reasoning:
humans are very good at acquiring new information by
combining raw knowledge, experience with reasoning.
AI-slogan: “Knowledge is power” (or “Data is power”?)
Examples:
Medical diagnosis --- physician diagnosing a patient
infers what disease, based on the knowledge he/she
acquired as a student, textbooks, prior cases
Common sense knowledge / reasoning ---
common everyday assumptions / inferences
e.g., “lecture starts at four” infer pm not am;
when traveling, I assume there is some way to get from the
airport to the hotel.
7
Logical agents:
Agents with some representation of the
complex knowledge about the world / its environment,
and uses inference to derive new information from that
knowledge combined with new inputs (e.g. via perception).
nKey issues:
n 1- Representation of knowledge
n What form? Meaning / semantics?
n 2- Reasoning and inference processes
n Efficiency.
8
Knowledge-base Agents
n Key issues:
g Representation of knowledge → knowledge base
9
Knowledge bases
n Key aspects:
g How to add sentences to the knowledge base
g How to query the knowledge base
Both tasks may involve inference – i.e. how to derive new sentences
from old sentences
10
A simple knowledge-based agent
11
What is KR&R?
n There are many ways to approach the topic of intelligence and
intelligent behavior
g neuroscience, psychology, evolution, philosophy
n KR suggests an approach to understanding intelligent behavior that is
radically different
g Instead of studying humans very carefully (biology, nervous systems,
psychology, sociology, etc.), it argues that what we need to study is what
humans know.
g It is taken as a given that what allows humans to behave intelligently is that they
know a lot of things about a lot of things and are able to apply this knowledge as
appropriate to adapt to their environment and achieve their goals.
Bayes Networks
Description Logics
Propositional Logic
KNOWLEDGE REPRESENTATION & 17
REASONING - Lecture 1
What does Knowledge Representation include ?
• Exception Tolerant and Inconsistency-Tolerant Reasoning, Default
Logics, Conditional Logics, Paraconsistent Logics, Argumentation
• Temporal Reasoning, Spatial reasoning, Causal Reasoning,
Abduction, Explanations, Extrapolation, Model-based diagnosis
• Reasoning about Actions, Situation Calculus, Action Languages,
Dynamic Logic
• Reasoning, Planning, and Decision Making under Uncertainty,
Probabilistic and Possibilistic approaches, Belief Functions and
Imprecise Probabilities
• Representations of Vagueness, Many-valued and Fuzzy Logics,
• Concept Formation, Similarity-based reasoning
• Information Change, Belief Revision, Update
• Information Fusion, Ontologies, Ontology Methodology, and
Ontologies themselves
• Qualitative reasoning and decision theory, Preference modelling,
Reasoning about preference, reasoning about physical systems
KNOWLEDGE REPRESENTATION & 18
REASONING - Lecture 1
What does Knowledge Representation include ?
• Intelligent agents, negotiation, group decision making,
cooperation, interaction, game theory, common knowledge,
cognitive robotics
• Algebraic foundations of knowledge representations, graphical
representations
• Modal logics and reasoning, belief, preference networks,
constraints
• Knowledge representation languages, Description logics, Logic
programming, SAT, constraint programming, inductive logic
programming, complexity analysis
• Natural language processing, learning, discovering and acquiring
knowledge, belief networks, summarization, categorization
• Applications of KR&R, Knowledge-based Scheduling, WWW
querying languages, Information retrieval and web mining,
Website selection and configuration, Electronic commerce and
auctions
• Philosophical foundations and psychological evidence
KNOWLEDGE REPRESENTATION & 19
REASONING - Lecture 1
Types of Knowledge
n Declarative Knowledge
g Description of notions, facts, and rules of the world
n E.g.
g For each lecture there is a specific time and place
g Only one lecture can take place at each time and place
n E.g.
g To construct the exams timetable, assign first the classes of the first year
g To reach Athens faster, take the airplane
23
Conflict Resolution Strategy Components
n Refraction
g A rule can only be used once with the same set of facts in Working
Memory (WM). Whenever WM is modified, all rules can again be used.
This strategy prevents a single rule and list of facts from being used
repeatedly, resulting in an infinite loop of reasoning.
n Recency
g Use rules that match the facts that were added most recently to WM,
providing a kind of “focus of attention” strategy.
n Specificity
g Use the most specific rule: if both R1 and R2 match, and R1’s LHS
logically implies R2’s LHS, use R2.
n Explicit priorities
g E.g., numeric salience attribute for rules
24 24
Propositional Logic
n Syntax
g Propositions, e.g. “it is wet”
g Connectives: and, or, not, implies, iff (equivalent)
25
Predicate Logic
27
Example: FOL Sentence
n For all X
g if (X is a rose)
g then there exists Y
∙ (X has Y) and (Y is a thorn)
28
Example: FOL Sentence
n Multi-valued logics
g More than two truth values
g e.g., true, false & unknown
g Fuzzy logic uses probabilities, truth value in [0,1]
n Modal logics
g Modal operators define mode for propositions
g Epistemic logics (belief)
∙ e.g. ⬜p (necessarily p), ◊p (possibly p), …
g Temporal logics (time)
∙ e.g. ⬜p (always p), ◊p (eventually p), …
31
Logic is a Good Representation
32
Non-Logical Representations?
n Production rules
n Semantic networks
g Conceptual graphs
g Frames
33
Production Rules
n Rule set of <condition,action> pairs
g “if condition then action”
n Match-resolve-act cycle
g Match: Agent checks if each rule’s condition holds
g Resolve:
∙ Multiple production rules may fire at once (conflict set)
∙ Agent must choose rule from set (conflict resolution)
g Act: If so, rule “fires” and the action is carried out
n Working memory:
g rule can write knowledge to working memory
g knowledge may match and fire other rules
34
Production Rules Example
35
Graphical Representation
36
Graphical Representation
39
Conceptual Graphs
40
The Language of Propositional Logic
n Before any system aspiring to intelligence can even begin to reason,
learn, plan, or explain its behavior, it must be able to formulate the
ideas involved.
g You will not be able to learn something about the world around you, for
example, if it is beyond you to even express what that thing is.
n So we need to start with a language, in terms of which knowledge can
be formulated. We will examine in detail one specific language that
can be used for this purpose: the language of propositional logic
g Propositional logic is not the only choice, of course, but is a simple and
convenient one to begin with.
nage nfather
nmother(john,sue)
3
n
nMax nage(john,5)
4 age
n
nwife(sue,max)
nage(max,34)
44 n... 44
Semantic Networks
n The ISA (is-a) or AKO
(a-kind-of) relation is Animal
n
often used to link
instances to classes, isa
n
47 47
Abduction
n Definition (Encyclopedia Britannica): reasoning that derives an
explanatory hypothesis from a given set of facts
g The inference result is a hypothesis that, if true, could explain the
occurrence of the given facts
n Examples
g Dendral, an expert system to construct 3D structure of chemical compounds
∙ Fact: mass spectrometer data of the compound and its chemical formula
∙ KB: chemistry, esp. strength of different types of bounds
∙ Reasoning: form a hypothetical 3D structure that satisfies the chemical
formula, and that would most likely produce the given mass spectrum
48 48
Abduction examples (cont.)
g Medical diagnosis
∙ Facts: symptoms, lab test results, and other observed findings
(called manifestations)
∙ KB: causal associations between diseases and manifestations
∙ Reasoning: one or more diseases whose presence would causally
explain the occurrence of the given manifestations
g Many other reasoning processes (e.g., word sense
disambiguation in natural language process, image
understanding, criminal investigation) can also been seen as
abductive reasoning
49 49
Comparing abduction, deduction,
and induction
Deduction: major premise: All balls in the box are black nA => B
nA
minor premise: These balls are from the box n---------
conclusion: These balls are black nB
50 50
Characteristics of abductive reasoning
51 51
Characteristics of abductive reasoning (cont.)
n Reasoning is often a hypothesize-and-test cycle
g Hypothesize: Postulate possible hypotheses, any of which would explain
the given facts (or at least most of the important facts)
g Test: Test the plausibility of all or some of these hypotheses
g One way to test a hypothesis H is to ask whether something that is
currently unknown–but can be predicted from H–is actually true
∙ If we also know A => D and C => E, then ask if D and E are true
∙ If D is true and E is false, then hypothesis A becomes more plausible
(support for A is increased; support for C is decreased)
52 52
Characteristics of abductive reasoning (cont.)
n Reasoning is non-monotonic
g That is, the plausibility of hypotheses can increase/decrease as new
facts are collected
g In contrast, deductive inference is monotonic: it never change a
sentence’s truth value, once known
g In abductive (and inductive) reasoning, some hypotheses may be
discarded, and new ones formed, when new observations are made
53 53
Sources of uncertainty
n Uncertain inputs
g Missing data
g Noisy data
n Uncertain knowledge
g Multiple causes lead to multiple effects
g Incomplete enumeration of conditions or effects
g Incomplete knowledge of causality in the domain
g Probabilistic/stochastic effects
n Uncertain outputs
g Abduction and induction are inherently uncertain
g Default reasoning, even in deductive fashion, is uncertain
g Incomplete deductive inference may be uncertain
Probabilistic reasoning only gives probabilistic results
(summarizes uncertainty from various sources)
54 54
Decision making with uncertainty
n Rational behavior:
g For each possible action, identify the possible outcomes
g Compute the probability of each outcome
55 55
Bayesian reasoning
n Probability theory
n Bayesian inference
g Use probability theory and information about independence
g Reason diagnostically (from evidence (effects) to conclusions (causes))
or causally (from causes to effects)
n Bayesian networks
g Compact representation of probability distribution over a set of
propositional random variables
g Take advantage of independence relationships
56 56
Other uncertainty representations
n Default reasoning
g Nonmonotonic logic: Allow the retraction of default beliefs if they
prove to be false
n Rule-based methods
g Certainty factors (Mycin): propagate simple models of belief
through causal or diagnostic rules
n Evidential reasoning
g Dempster-Shafer theory: Bel(P) is a measure of the evidence for P;
Bel(¬P) is a measure of the evidence against P; together they
define a belief interval (lower and upper bounds on confidence)
n Fuzzy reasoning
g Fuzzy sets: How well does an object satisfy a vague property?
g Fuzzy logic: “How true” is a logical statement?
57 57
Uncertainty tradeoffs
n Bayesian networks: Nice theoretical properties combined with
efficient reasoning make BNs very popular; limited
expressiveness, knowledge engineering challenges may limit
uses
n Nonmonotonic logic: Represent commonsense reasoning, but
can be computationally very expensive
n Certainty factors: Not semantically well founded
n Dempster-Shafer theory: Has nice formal properties, but can
be computationally expensive, and intervals tend to grow
towards [0,1] (not a very useful conclusion)
n Fuzzy reasoning: Semantics are unclear (fuzzy!), but has
proved very useful for commercial applications
58 58
Knowledge Representation Languages
n An expression is true under a certain interpretation if the
facts of the real world that it represents are valid
n We say that a proposition α is entailed by a set of
propositions s when whenever the set of propositions s is
true then α is true
g entailment is usually notated by s |= α
entails
proposition proposition
representatio semantic semantic
n s s
Real
world fac fac
entails t
KNOWLEDGE REPRESENTATION & t 59
REASONING - Lecture 1
Desired Features of KR languages
n Epistemological Level
g Clarity
g Expressiveness
n Logical Level CONFLICT
g Elegant syntax & semantics !
g Decidability / Tractability
g Sound and complete inference mechanism nElegant: graceful and
stylish in appearance or
manner.
n Implementation Level
g Space & Time efficiency
g Extensibility
Artificial Intelligence
Knowledge Representation
Applications
• Scheduling
• Planning - SAT and ASP
• Configuration - Constraint-based knowledge representation
Resource Allocation
•
• Machine Vision
- Temporal Knowledge
• Databases