Vous êtes sur la page 1sur 71

Knowledge Representation & Reasoning

KNOWLEDGE REPRESENTATION & 1


REASONING - Lecture 1
Overview
n Aims
g Development of skills in Knowledge
Representation & Reasoning

g Understanding of various different


ways to represent and reason with
knowledge

g Practical Applications of Knowledge


Representation & Reasoning

g Motives for Research

KNOWLEDGE REPRESENTATION & 2


REASONING - Lecture 1
Overview

n Prerequisites:

g Artificial Intelligence
∙ Search Algorithms
g Logic
∙ Propositional & First Order Logic
g Algorithms & Data Structures
∙ Algorithmic Complexity
g Programming!
∙ C ∨ C++ ∨ Java

KNOWLEDGE REPRESENTATION & 3


REASONING - Lecture 1
Overview
n Bibliography:
g General stuff on AI
∙ Artificial Intelligence: A Modern Approach, Russell & Norvig
∙ http://www.cs.berkeley.edu/~russell/aima.html

∙ http://aima.cs.berkeley.edu/

∙ Artificial Intelligence: A New Synthesis, Nilsson


∙ Essentials of Artificial Intelligence: Ginsberg
g Knowledge Representation
∙ Knowledge Representation and Reasoning, Ronald J. Brachman, Ronald J.
Brachman, Hector J. Levesque
g Constraint Programming
∙ Constraint Processing, Rina Dechter
g LOTS OF PAPERS…
∙ More after specific lectures
KNOWLEDGE REPRESENTATION & 4
REASONING - Lecture 1
ΑΙ and KR
n A description of Artificial
Intelligence is:
g The study and development of systems
that demonstrate intelligent behavior

n Based on the above, a description


of Knowledge Representation KR&R is the part of AI that is
& Reasoning is: concerned with thinking and
g The study of ways to represent and how thinking contributes to
reason with information in order to intelligent behavior
achieve intelligent behavior

KNOWLEDGE REPRESENTATION & 5


REASONING - Lecture 1
n A Model-Based Agent

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

g Reasoning processes → inference/reasoning

nKnowledge base = set of sentences in a formal language


representing facts about the world(*)

(*) called Knowledge Representation (KR) language


n

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

Logical agents – inference must obey the fundamental requirement that


when one asks a question to the knowledge base, the answer should
follow from what has been told to the knowledge base previously. (In
other words the inference process should not “make things” up…)

10
A simple knowledge-based agent

n The agent must be able to:


g Represent states, actions, etc.
g Incorporate new percepts
g Update internal representations of the world
g Deduce hidden properties of the world
g Deduce appropriate actions

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.

n KR&R focuses on the knowledge, not on the knower. We ask what


any agent—human, animal, electronic, mechanical—would need to
know to behave intelligently, and what sorts of computational
mechanisms might allow its knowledge to be manipulated.
KNOWLEDGE REPRESENTATION & 12
REASONING - Lecture 1
Knowledge
n What is knowledge? This is a question that has been discussed by philosophers
since the ancient times, and it is still not totally clarified.
g Will not attempt to define it formally…
n Observe that when we say something like “John knows that …,” we fill in the blank
with a simple
g “John knows that Mary will come to the party,”
g “John knows that Spain won the Euro”
n Among other things, knowledge is a relation between a knower and a proposition
g knower : John
g proposition: the idea expressed by a simple declarative sentence, like “Mary will come to
the party.”
n What can we say about propositions? For KR&R, what matters about propositions is
that they are abstract entities that can be true or false, right or wrong.
g When we say, “John knows that p,” we can just as well say, “John knows that it is true
that p.”

KNOWLEDGE REPRESENTATION & 13


REASONING - Lecture 1
Representation
n Roughly, representation is a relationship between two domains,
where the first is meant to “stand for” or take the place of the second.
g Usually, the first domain, the representor, is more concrete, immediate, or
accessible in some way than the second.
∙ For example, a drawing of a hamburger on a sign might stand for a less immediately
visible fast food restaurant;
∙ an elected member of parliament might stand for his or her constituency.
g The type of representor that we will be most concerned with here is the formal
symbol, that is, a character or group of characters taken from some
predetermined alphabet.
∙ The digit “7,” for example, stands for the number 7, as does the group of letters “VII”
g Knowledge representation, then, is the field of study concerned with using
formal symbols to represent a collection of propositions believed by some
agent.

KNOWLEDGE REPRESENTATION & 14


REASONING - Lecture 1
& Reasoning
n What is reasoning? In general, it is the formal manipulation of the
symbols representing a collection of believed propositions to produce
representations of new ones.
g Here that we use the fact that symbols are more accessible than the propositions
they represent: They must be concrete enough that we can manipulate them
(move them around, take them apart, copy them, string them together) in such a
way as to construct representations of new propositions.
∙ We might start with the sentences “John loves Mary” and “Mary is coming to the
party” and after a certain amount of manipulation produce the sentence, “Someone
John loves is coming to the party”
∙ We would call this form of reasoning logical inference because the final sentence
represents a logical conclusion of the propositions represented by the initial ones
n Reasoning is a form of calculation, not unlike arithmetic, but over
symbols standing for propositions rather than numbers
KNOWLEDGE REPRESENTATION & 15
REASONING - Lecture 1
How can knowledge be represented ?
n Symbolic methods
g Declarative Languages (Logic)
g Imperative Languages (C, C++, Java, etc.)
g Hybrid Languages (Prolog)
g Rules
g Frames
g Semantic Networks
g …

n Non – symbolic methods


g Neural Networks
g Genetic Algorithms

KNOWLEDGE REPRESENTATION & 16


REASONING - Lecture 1
Symbolic Methods of Knowledge
Representation

First Order Logic


Semantic Networks

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 Descriptional knowledge, non procedural, independent of


targets and problem solving

KNOWLEDGE REPRESENTATION & 20


REASONING - Lecture 1
Types of Knowledge
n Procedural Knowledge
g Description of procedures required to achieve targets
g Knowledge of the order in which actions must be performed
g Heuristic knowledge

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

n It depends on the targets and problems

KNOWLEDGE REPRESENTATION & 21


REASONING - Lecture 1
Types of Knowledge
n Basic Difference
g declarative knowledge is right or wrong
∙ Lectures are on Wednesdays
g procedural knowledge can be executed
∙ the procedure of constructing the exams timetable

n Which of the two interests us ? Knowledge


g Both of course Representation
&
Reasoning

KNOWLEDGE REPRESENTATION & 22


REASONING - Lecture 1
Properties of logical systems
Important properties of logical systems:
n Consistency - no theorem of the system contradicts another.
n Soundness - the system's rules of proof will never allow a false
inference from a true premise. If a system is sound and its axioms are true then
its theorems are also guaranteed to be true.

n Completeness - there are no true sentences in the system that


cannot, at least in principle, be proved in the system.
n Some logical systems do not have all three properties. Kurt Godel's incompleteness
theorems show that no standard formal system of arithmetic can be consistent and
complete.

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)

g Brackets, T (true) and F (false)


n Semantics (Classical AKA Boolean)
g Define how connectives affect truth
∙ “P and Q” is true if and only if P is true and Q is true
g Use truth tables to work out the truth of statements

25
Predicate Logic

n Propositional logic combines atoms


g An atom contains no propositional connectives
g Have no structure (today_is_wet, john_likes_apples)
n Predicates allow us to talk about objects
g Properties: is_wet(today)
g Relations: likes(john, apples)
g True or false
n In predicate logic each atom is a predicate
g e.g. first order logic, higher-order logic
26
First Order Logic
n More expressive logic than propositional
g Used in this course (Lecture 6 on representation in FOL)
n Constants are objects: john, apples
n Predicates are properties and relations:
g likes(john, apples)
n Functions transform objects:
g likes(john, fruit_of(apple_tree))
n Variables represent any object: likes(X, apples)
n Quantifiers qualify values of variables
g True for all objects (Universal): ∀X. likes(X, apples)
g Exists at least one object (Existential): ∃X. likes(X, apples)

27
Example: FOL Sentence

n “Every rose has a thorn”

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 “On Mondays and Wednesdays I go to John’s house for


dinner”

● Note the change from “and” to “or”


– Translating is problematic
29
Higher Order Logic

n More expressive than first order


n Functions and predicates are also objects
g Described by predicates: binary(addition)
g Transformed by functions: differentiate(square)
g Can quantify over both
n E.g. define red functions as having zero at 17

n Much harder to reason with


30
Beyond True and False

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

n Fairly easy to do the translation when possible


n Branches of mathematics devoted to it
n It enables us to do logical reasoning
g Tools and techniques come for free
n Basis for programming languages
g Prolog uses logic programs (a subset of FOL)
g λProlog based on HOL

32
Non-Logical Representations?

n Production rules
n Semantic networks
g Conceptual graphs
g Frames

n Logic representations have restricitions and can be hard


to work with
g Many AI researchers searched for better representations

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

n IF (at bus stop AND bus arrives) THEN action(get on the


bus)
n IF (on bus AND not paid AND have oyster card) THEN
action(pay with oyster) AND add(paid)
n IF (on bus AND paid AND empty seat) THEN sit down

n conditions and actions must be clearly defined


g can easily be expressed in first order logic!

35
Graphical Representation

n Humans draw diagrams all the time, e.g.


g Causal relationships

g And relationships between ideas

36
Graphical Representation

n Graphs easy to store in a computer


n To be of any use must impose a formalism

g Jason is 15, Bryan is 40, Arthur is 70, Jim is 74


g How old is Julia?
37
Semantic Networks

n Because the syntax is the same


g We can guess that Julia’s age is similar to Bryan’s
n Formalism imposes restricted syntax
38
Semantic Networks

n Graphical representation (a graph)


g Links indicate subset, member, relation, ...
n Equivalent to logical statements (usually FOL)
g Easier to understand than FOL?
g Specialised SN reasoning algorithms can be faster
n Example: natural language understanding
g Sentences with same meaning have same graphs
g e.g. Conceptual Dependency Theory (Schank)

39
Conceptual Graphs

n Semantic network where each graph represents a single


proposition
n Concept nodes can be
g Concrete (visualisable) such as restaurant, my dog Spot
g Abstract (not easily visualisable) such as anger
n Edges do not have labels
g Instead, conceptual relation nodes
g Easy to represent relations between multiple objects

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.

n What does it mean to “have” a language? Once we have a set of words


or a set of symbols of some sort, what more is needed? As far as we
are concerned, there are two main things:
g A KR language is defined by its syntax and its semantics

KNOWLEDGE REPRESENTATION & 41


REASONING - Lecture 1
Syntax of a KR language
n We need to specify which groups of symbols, arranged in
what way, are to be considered properly formed.
g In English, for example, the string of words “the cat my mother loves” is
a well-formed phrase, but “the my loves mother cat” is not.

n The syntax consists of a set of symbols used by the


language and a set of rules according to which the symbols
can be combined to form proper sentences

KNOWLEDGE REPRESENTATION & 42


REASONING - Lecture 1
Semantics of a KR language
n We need to specify what the well-formed expressions are supposed to
mean.
g Some well-formed expressions like “the recently divorced decimal holiday”
might not mean anything. We need to be clear about what idea about the world is
being expressed.
n The semantics determine a mapping between symbols, combinations
of symbols, propositions of the language and concepts of the world to
which they refer

n A proposition in a KR language does not mean anything on its own


g The semantics (i.e. the meaning) of the proposition must be defined by the
language author through an interpretation

KNOWLEDGE REPRESENTATION & 43


REASONING - Lecture 1
Nodes and Arcs

n Arcs define binary relationships that hold between


objects denoted by the nodes.
nmother age
n
n Sue n john n5

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

classes to superclasses nhasPart


nBird
n Some links (e.g. hasPart)
isa
n Wing
n
are inherited along ISA
paths. n Robin
n The semantics of a isa
n nisa

semantic net can be


relatively informal or
very formal n Rusty Red
n
45 45
Reification

n Non-binary relationships can be represented by


“turning the relationship into an object”
n This is an example of what logicians call “reification”
g reify v : consider an abstract concept to be real
n We might want to represent the generic give event as a
relation involving three things: a giver, a recipient and
an object, give(john,mary,book32)
ngiver njo
gi
n
hn
ve
nrecipient nobject nbo
m
n
ok3
ary
46
2 46
Abduction
n Abduction is a reasoning process that tries to form plausible
(seeming reasonable or probable) explanations for abnormal
observations
g Abduction is distinctly different from deduction and induction
g Abduction is inherently uncertain
n Uncertainty is an important issue in abductive reasoning
n Some major formalisms for representing and reasoning about
uncertainty
g Mycin’s certainty factors (an early representative)
g Probability theory (esp. Bayesian belief networks)
g Dempster-Shafer theory
g Fuzzy logic
g Truth maintenance systems
g Nonmonotonic reasoning

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

Abduction: rule: All balls in the box are black nA => B


observation: These balls are black n B
explanation: These balls are from the box n-------------
nPossibly A

Induction: case: These balls are from the box


observation: These balls are black nWhenever
A then B
hypothesized rule: All ball in the box are black n-------------
nPossibly
nDeduction reasons from causes to effects
nA => B
nAbduction reasons from effects to causes

nInduction reasons from specific cases to general rules

50 50
Characteristics of abductive reasoning

n “Conclusions” are hypotheses, not theorems (may be false


even if rules and facts are true)
g E.g., misdiagnosis in medicine

n There may be multiple plausible hypotheses


g Given rules A => B and C => B, and fact B, both A and C are
plausible hypotheses
g Abduction is inherently uncertain
g Hypotheses can be ranked by their plausibility (if it can be
determined)

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

g Compute the utility of each outcome

g Compute the probability-weighted (expected) utility over possible


outcomes for each action
g Select the action with the highest expected utility (principle of
Maximum Expected Utility)

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

KNOWLEDGE REPRESENTATION & 60


REASONING - Lecture 1
Logic for KR
n Historically logic is the first KR language
g 1959-1965: First Order Logic is the KR language for AI
g 1965: Resolution (Robinson) means real hope for universally applicable
proof method
∙ computational & representational problems
g 1970s: Rivals emerge (semantic networks, rules, frames)
∙ unclear semantics & inference
g 1975: Logic Programming (Kowalski)
∙ decrease expressivity to increase efficiency
∙ declarative & procedural knowledge in one language
g 1980…: Non-monotonic reasoning (McCarthy,Reiter)
∙ common sense knowledge

KNOWLEDGE REPRESENTATION & 61


REASONING - Lecture 1
Advantages of Logic for KR
n Like all declarative languages:
g compact
g task-independent
g modular representation
g resusable, flexible, maintainable
n Logic has formal well defined semantics
n Logic is expressive
g incomplete knowledge
g temporal logics
g second order logic
g …

KNOWLEDGE REPRESENTATION & 62


REASONING - Lecture 1
Disadvantages of Logic for KR
n Inefficiency !!!
g implementation level
n Difficulty in describing procedural knowledge

n Expressivity vs. Tractability


g the more expressive the less tractable
g “Problem solving based on expressive logics is impossible”
In the worst case
g Why ?
!
∙ expressiveness
broader problems => harder problems

KNOWLEDGE REPRESENTATION & 63


REASONING - Lecture 1
Disadvantages of Logic for KR
n Solutions:
g restricting expressivity
∙ SAT
g augmenting declarative statements with procedural information
∙ logic programming
g new more powerful inference techniques
∙ constraint solving
g heuristics
∙ incomplete reasoning mechanisms (local search)

KNOWLEDGE REPRESENTATION & 64


REASONING - Lecture 1
What is this course about ?
* Propositional Satisfiability (SAT)
Reasoning Techniques
Modeling Real Problems
* Actions, Situations, Events, Default Information
Stable Models and Answer Set Programs
* Constraint-based KR
The CSP formalism
Reasoning Algorithms
Applications
* Temporal Knowledge & Reasoning
Qualitative and Quantitative
KNOWLEDGE REPRESENTATION & 65
REASONING - Lecture 1
Course Flow

Artificial Intelligence

Knowledge Representation
Applications

• Scheduling
• Planning - SAT and ASP
• Configuration - Constraint-based knowledge representation
Resource Allocation

• Machine Vision
- Temporal Knowledge
• Databases

nASP: Answer Set Programming


nSAT: Propositional Satisfiability

KNOWLEDGE REPRESENTATION & 66


REASONING - Lecture 1
Propositional Satisfiability (SAT)
g Propositional Logic in Conjunctive Normal Form (CNF)
∙ Checking the satisfiability (and finding a model) of PL sentences in
CNF is called SAT

g Representation Literals, Clauses

Propagation (UP, BinRes, etc.)


g Reasoning Complete Search (DPLL)
Local Search (GSAT, WalkSat)

g Applications planning verification circuit design


model checking cryptography
games and puzzles

KNOWLEDGE REPRESENTATION & 67


REASONING - Lecture 1
Actions, Situations, and Events
n Situation Calculus
n Describing Actions in Situation Calculus
g The Frame Problem
n Time and Event Calculus

n Reasoning with Default Information


g Open and Closed Worlds
n Negation as Failure and Stable Models
g Answer Set Programming (ASP)

KNOWLEDGE REPRESENTATION & 68


REASONING - Lecture 1
Knowledge Representation with Constraints
n Constraint Satisfaction Problems (CSPs)

g Representation Variables, Values, Constraints, Models


Global Constraints, Uncertainty

Constraint Propagation (AC, PC, etc.)


g Reasoning Complete Search (BT, FC, CBJ, MAC)
Local Search (Min_Confs, Breakout)

scheduling design and cofiguration


g Applications bin packing and partitioning frequency assignment
combinatorial mathematics games and puzzles
bioinformatics planning vehicle routing

KNOWLEDGE REPRESENTATION & 69


REASONING - Lecture 1
Logic-based Reasoners
n Knowledge Representation
Languages based on Logic
SAT
g Propositional logic
solvers
g First order logic Theorem
g Answer set programming Provers
ASP
g Prolog
solvers
SICStus Prolog
ECLiPSe Prolog at ECRC
ECLiPSe Prolog at IC-PARC
CIAO Prolog
XSB Prolog
Yap Prolog
CHIP
KNOWLEDGE REPRESENTATION & 70
REASONING - Lecture 1
Constraint-based Reasoners

n Imperative, Functional, Concurrent Languages and


Systems ILOG Solver
Choko
ECLiPSe
g C/C++
Java Constraint Library
(JCL)
g Java GECODE
AbsCon
g functional languages Claire
Michel Lemaitre's Lisp library
Screamer (Lisp)
g concurrent languages FaCiLE
Mozart / Oz
AKL
KNOWLEDGE REPRESENTATION & 71
REASONING - Lecture 1

Vous aimerez peut-être aussi