Knowledge Representation & Reasoning
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
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 & REASONING - Lecture 1
2
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 & REASONING - Lecture 1
3
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 & REASONING - Lecture 1
4
ΑΙ and KR n
A description of Artificial Intelligence is: g
n
The study and development of systems that demonstrate intelligent behavior
Based on the above, a description of Knowledge Representation & Reasoning is: g
The study of ways to represent and reason with information in order to achieve intelligent behavior
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
KR&R is the part of AI that is concerned with thinking and how thinking contributes to intelligent behavior
5
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).
Key issues: n 1- Representation of knowledge n What form? Meaning / semantics? n 2- Reasoning and inference processes n Efficiency.
n
8
Knowledge-base Agents Key issues: g Representation of knowledge → knowledge base g Reasoning processes → inference/reasoning
n
n
Knowledge base = set of sentences in a formal language representing facts about the world(*)
n
(*) called Knowledge Representation (KR) language
n
9
Knowledge bases n
Key aspects: g
g
How to add sentences to the knowledge base 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
n
KR suggests an approach to understanding intelligent behavior that is radically different g
g
n
neuroscience, psychology, evolution, philosophy
Instead of studying humans very carefully (biology, nervous systems, psychology, sociology, etc.), it argues that what we need to study is what humans know. 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.
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 & REASONING - Lecture 1
12
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
n
Observe that when we say something like “John knows that …,” we fill in the blank with a simple g g
n
“John knows that Mary will come to the party,” “John knows that Spain won the Euro”
Among other things, knowledge is a relation between a knower and a proposition g g
n
Will not attempt to define it formally…
knower : John proposition: the idea expressed by a simple declarative sentence, like “Mary will come to the party.”
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 & REASONING - Lecture 1
13
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 & REASONING - Lecture 1
14
& 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 & REASONING - Lecture 1
15
How can knowledge be represented ? n
Symbolic methods g g g g g g g
n
Declarative Languages (Logic) Imperative Languages (C, C++, Java, etc.) Hybrid Languages (Prolog) Rules Frames Semantic Networks …
Non – symbolic methods g g
Neural Networks Genetic Algorithms
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
16
Symbolic Methods of Knowledge Representation
First Order Logic Semantic Networks
Bayes Networks
Description Logics Propositional Logic KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
17
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 & REASONING - Lecture 1
18
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 & REASONING - Lecture 1
19
Types of Knowledge n
Declarative Knowledge g
n
E.g. g
g
n
Description of notions, facts, and rules of the world
For each lecture there is a specific time and place Only one lecture can take place at each time and place
Descriptional knowledge, non procedural, independent of targets and problem solving
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
20
Types of Knowledge n
Procedural Knowledge g g g
n
E.g. g g
n
Description of procedures required to achieve targets Knowledge of the order in which actions must be performed Heuristic knowledge
To construct the exams timetable, assign first the classes of the first year To reach Athens faster, take the airplane
It depends on the targets and problems
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
21
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 ? g
Both of course
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
Knowledge Representation & Reasoning
22
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
n
Completeness - there are no true sentences in the system that cannot, at least in principle, be proved in the system. 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
n
Recency g
n
Use the most specific rule: if both R1 and R2 match, and R1’s LHS logically implies R2’s LHS, use R2.
Explicit priorities g
24
Use rules that match the facts that were added most recently to WM, providing a kind of “focus of attention” strategy.
Specificity g
n
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.
E.g., numeric salience attribute for rules 24
Propositional Logic
n
Syntax g
Propositions, e.g. “it is wet” Connectives: and, or, not, implies, iff (equivalent)
g
Brackets, T (true) and F (false)
g
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 g
n
Predicates allow us to talk about objects g g
g
n
An atom contains no propositional connectives Have no structure (today_is_wet, john_likes_apples) Properties: is_wet(today) Relations: likes(john, apples) True or false
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
n n
Constants are objects: john, apples Predicates are properties and relations: g
n
n
likes(john, apples)
Functions transform objects: g
n
Used in this course (Lecture 6 on representation in FOL)
likes(john, fruit_of(apple_tree))
Variables represent any object: likes(X, apples) Quantifiers qualify values of variables g g
True for all objects (Universal): ∀X. likes(X, apples) 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 g
if (X is a rose) 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 n
More expressive than first order Functions and predicates are also objects g g g
Described by predicates: binary(addition) Transformed by functions: differentiate(square) 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 g g
n
More than two truth values e.g., true, false & unknown Fuzzy logic uses probabilities, truth value in [0,1]
Modal logics g g
Modal operators define mode for propositions 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 n n
Fairly easy to do the translation when possible Branches of mathematics devoted to it It enables us to do logical reasoning g
n
Tools and techniques come for free
Basis for programming languages g g
Prolog uses logic programs (a subset of FOL) λProlog based on HOL
32
Non-Logical Representations?
n n
Production rules Semantic networks g g
n
Conceptual graphs Frames
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
pairs g
n
“if condition then action”
Match-resolve-act cycle g g
Match: Agent checks if each rule’s condition holds Resolve: ∙ Multiple production rules may fire at once (conflict set) ∙ Agent must choose rule from set (conflict resolution)
g
n
Act: If so, rule “fires” and the action is carried out
Working memory: g g
rule can write knowledge to working memory 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) IF (on bus AND not paid AND have oyster card) THEN action(pay with oyster) AND add(paid) IF (on bus AND paid AND empty seat) THEN sit down
n
conditions and actions must be clearly defined
n
n
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 n
Graphs easy to store in a computer To be of any use must impose a formalism
g g
Jason is 15, Bryan is 40, Arthur is 70, Jim is 74 How old is Julia? 37
Semantic Networks
n
Because the syntax is the same g
n
We can guess that Julia’s age is similar to Bryan’s
Formalism imposes restricted syntax 38
Semantic Networks
n
Graphical representation (a graph) g
n
Equivalent to logical statements (usually FOL) g g
n
Links indicate subset, member, relation, ... Easier to understand than FOL? Specialised SN reasoning algorithms can be faster
Example: natural language understanding g g
Sentences with same meaning have same graphs e.g. Conceptual Dependency Theory (Schank) 39
Conceptual Graphs
n
n
Semantic network where each graph represents a single proposition Concept nodes can be g g
n
Concrete (visualisable) such as restaurant, my dog Spot Abstract (not easily visualisable) such as anger
Edges do not have labels g g
Instead, conceptual relation nodes 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
n
So we need to start with a language, in 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
n
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.
Propositional logic is not the only choice, of course, but is a simple and convenient one to begin with.
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 & REASONING - Lecture 1
41
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
n
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.
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 & REASONING - Lecture 1
42
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 & REASONING - Lecture 1
43
Nodes and Arcs
n
Arcs define binary relationships that hold between objects denoted by the nodes. mother
age
n
Sue
n
john
n
5
n
age
n
father
n
n
mother(john,sue) nage(john,5) nwife(sue,max) nage(max,34) n... n
3 4
n
44
age
n
Max
n
44
Semantic Networks n
n
n
45
The ISA (is-a) or AKO (a-kind-of) relation is often used to link instances to classes, classes to superclasses Some links (e.g. hasPart) are inherited along ISA paths. The semantics of a semantic net can be relatively informal or very formal
Animal
n
isa nhasPart
n
Bird
n
isa
Wing
n
n
Robin nisa
n
isa
n
n
Rusty
Red
n
45
Reification n
n
Non-binary relationships can be represented by “turning the relationship into an object” This is an example of what logicians call “reification” g
n
reify v : consider an abstract concept to be real
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)
m ary n
46
recipient
n
jo hn
giver
n
n
gi ve
n
object
n
bo ok3 2 n
46
Abduction n
Abduction is a reasoning process that tries to form plausible (seeming reasonable or probable) explanations for abnormal observations g g
n n
Uncertainty is an important issue in abductive reasoning Some major formalisms for representing and reasoning about uncertainty g g g g g g
47
Abduction is distinctly different from deduction and induction Abduction is inherently uncertain
Mycin’s certainty factors (an early representative) Probability theory (esp. Bayesian belief networks) Dempster-Shafer theory Fuzzy logic Truth maintenance systems Nonmonotonic reasoning 47
Abduction n
Definition (Encyclopedia Britannica): reasoning that derives an explanatory hypothesis from a given set of facts g
n
Examples g
48
The inference result is a hypothesis that, if true, could explain the occurrence of the given facts 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
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
49
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
Comparing abduction, deduction, and induction Deduction: major premise: minor premise: conclusion:
Abduction: rule: All balls in the box are black observation: These balls are black explanation: These balls are from the box Induction: case: observation: hypothesized rule:
These balls are from the box These balls are black All ball in the box are black
Deduction reasons from causes to effects nAbduction reasons from effects to causes nInduction reasons from specific cases to general rules n
50
A => B nA n--------nB n
All balls in the box are black These balls are from the box These balls are black
A => B n B n------------nPossibly A n
Whenever A then B n------------nPossibly nA => B n
50
Characteristics of abductive reasoning “Conclusions” are hypotheses, not theorems (may be false even if rules and facts are true)
n
g
There may be multiple plausible hypotheses
n g
g
g
51
E.g., misdiagnosis in medicine
Given rules A => B and C => B, and fact B, both A and C are plausible hypotheses Abduction is inherently uncertain Hypotheses can be ranked by their plausibility (if it can be determined)
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 ∙ ∙
52
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 ( for A is increased; for C is decreased)
52
Characteristics of abductive reasoning (cont.) Reasoning is non-monotonic
n
g
g
g
53
That is, the plausibility of hypotheses can increase/decrease as new facts are collected In contrast, deductive inference is monotonic: it never change a sentence’s truth value, once known In abductive (and inductive) reasoning, some hypotheses may be discarded, and new ones formed, when new observations are made
53
Sources of uncertainty n
Uncertain inputs Missing data g Noisy data g
n
Uncertain knowledge 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 g
n
Uncertain outputs Abduction and induction are inherently uncertain g Default reasoning, even in deductive fashion, is uncertain g Incomplete deductive inference may be uncertain g
Probabilistic reasoning only gives probabilistic results (summarizes uncertainty from various sources) 54
54
Decision making with uncertainty n
Rational behavior: 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) g
55
55
Bayesian reasoning n
n
Probability theory Bayesian inference g g
n
Bayesian networks g
g
56
Use probability theory and information about independence Reason diagnostically (from evidence (effects) to conclusions (causes)) or causally (from causes to effects) Compact representation of probability distribution over a set of propositional random variables Take advantage of independence relationships
56
Other uncertainty representations n
Default reasoning g
n
Rule-based methods g
n
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)
Fuzzy reasoning g
g 57
Certainty factors (Mycin): propagate simple models of belief through causal or diagnostic rules
Evidential reasoning g
n
Nonmonotonic logic: Allow the retraction of default beliefs if they prove to be false
Fuzzy sets: How well does an object satisfy a vague property? Fuzzy logic: “How true” is a logical statement? 57
Uncertainty tradeoffs n
n
n
n
n
58
Bayesian networks: Nice theoretical properties combined with efficient reasoning make BNs very popular; limited expressiveness, knowledge engineering challenges may limit uses Nonmonotonic logic: Represent commonsense reasoning, but can be computationally very expensive Certainty factors: Not semantically well founded 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) Fuzzy reasoning: Semantics are unclear (fuzzy!), but has proved very useful for commercial applications
58
Knowledge Representation Languages n
n
An expression is true under a certain interpretation if the facts of the real world that it represents are valid 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 |= α
proposition representatio n Real world
semantic s
fac KNOWLEDGE REPRESENTATION & t REASONING - Lecture 1
entails
proposition semantic s
entails
fac t
59
Desired Features of KR languages n
Epistemological Level g g
n
Logical Level g
g g
n
Clarity Expressiveness Elegant syntax & semantics Decidability / Tractability Sound and complete inference mechanism
CONFLICT ! Elegant: graceful and stylish in appearance or manner. n
Implementation Level g g
Space & Time efficiency Extensibility
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
60
Logic for KR n
Historically logic is the first KR language g g
1959-1965: First Order Logic is the KR language for AI 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 & REASONING - Lecture 1
61
Advantages of Logic for KR n
Like all declarative languages: g g g g
n n
compact task-independent modular representation resusable, flexible, maintainable
Logic has formal well defined semantics Logic is expressive g g g g
incomplete knowledge temporal logics second order logic …
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
62
Disadvantages of Logic for KR n
Inefficiency !!! g
implementation level
n
Difficulty in describing procedural knowledge
n
Expressivity vs. Tractability g g
g
the more expressive the less tractable “Problem solving based on expressive logics is impossible” Why ? ∙ expressiveness
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
In the worst case ! broader problems => harder problems 63
Disadvantages of Logic for KR n
Solutions: g
g
g
g
restricting expressivity ∙ SAT augmenting declarative statements with procedural information ∙ logic programming new more powerful inference techniques ∙ constraint solving heuristics ∙ incomplete reasoning mechanisms (local search)
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
64
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 & REASONING - Lecture 1
65
Course Flow Artificial Intelligence Knowledge Representation
Applications • • •
• • •
Scheduling Planning Configuration Resource Allocation Machine Vision Databases
- SAT and ASP - Constraint-based knowledge representation - Temporal Knowledge
ASP: Answer Set Programming nSAT: Propositional Satisfiability n
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
66
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
g
Reasoning
g
Applications
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
Literals, Clauses Propagation (UP, BinRes, etc.) Complete Search (DPLL) Local Search (GSAT, WalkSat) planning verification circuit design model checking cryptography games and puzzles 67
Actions, Situations, and Events n
n
Situation Calculus Describing Actions in Situation Calculus g
The Frame Problem
n
Time and Event Calculus
n
Reasoning with Default Information g
n
Open and Closed Worlds
Negation as Failure and Stable Models g
Answer Set Programming (ASP)
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
68
Knowledge Representation with Constraints n
Constraint Satisfaction Problems (CSPs) g
Representation
g
Reasoning
g
Applications
KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
Variables, Values, Constraints, Models Global Constraints, Uncertainty Constraint Propagation (AC, PC, etc.) Complete Search (BT, FC, CBJ, MAC) Local Search (Min_Confs, Breakout) scheduling design and cofiguration bin packing and partitioning frequency assignment combinatorial mathematics games and puzzles bioinformatics planning vehicle routing 69
Logic-based Reasoners n
Knowledge Representation Languages based on Logic g g g
g
Propositional logic First order logic Answer set programming Prolog
SAT solvers Theorem Provers ASP solvers
SICStus Prolog ECLiPSe Prolog at ECRC ECLiPSe Prolog at IC-PARC CIAO Prolog XSB Prolog Yap Prolog CHIP KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
70
Constraint-based Reasoners n
Imperative, Functional, Concurrent Languages and Systems ILOG Solver Choko ECLiPSe g
C/C++
g
Java
g
functional languages
g
concurrent languages
Java Constraint Library (JCL) GECODE AbsCon Claire Michel Lemaitre's Lisp library Screamer (Lisp) FaCiLE
Mozart / Oz AKL KNOWLEDGE REPRESENTATION & REASONING - Lecture 1
71