Knowledge and reasoning 2

Size: px
Start display at page:

Download "Knowledge and reasoning 2"

Transcription

1 Knowledge and reasoning 2 DDC65 Artificial intelligence and Lisp Peter Dalenius petda@ida.liu.se Department of Computer and Information Science Linköping University Knowledge-based agents Inside our agent he real world Knowledge base Percept perceive deduce Action execute 1. How can we represent knowledge? 2. How can we draw conclusions? Logic What is the value? It depends on the interpretation! Is it satisfiable? Can it ever be true? Is it a tautology? Is it always true? P Q P P ruth table Q P Q P Does it entail P Q? Is it correct to draw the conclusion P Q? What is a good argument? In order to prove that it is correct to draw the conclusion S when we know KB, we can do either of the following: Prove KB S(entailment) using either a truth table or reasoning with interpretations Prove KB Susing a sound and complete proof system, e.g. resolution Is it equivalent to P Q? Do these two formulas always have the same value? he Wumpus world Representing the Wumpus world PI here is at least one Wumpus in the cave: PI W 1,1 W 1,2 W 1,3 W 4,4 If there is a breeze in square (x, y) then there is a pit in one of the four adjacent squares: PI B x,y P x,y+1 P x,y-1 P x+1,y P x-1,y his is a template for a number of formulas. here is only one Wumpus: hat s a tricky one to represent 1

2 We need a more expressive logic! What s new in first order logic? Propositional logic (used so far) Each symbol represents a proposition, a single statement that says something about the world. Several things are hard to formulate. irst order predicate logic An extension to propositional logic. Helps us to formulate more complex statements. We can talk about objects (e.g. the different rooms in the cave) denoted by object constants. Example: A, Room1, John he objects can have properties or relations to each other. hese are called predicates. Example: Empty(Room1), ather(john, Mary) We have functions that can return objects. Example: nextroom(room1), fatherof(mary) We have quantifiers to say general things. means for all and means exists. p.247 Sentences in first order logic Sentences in first order logic A term is an expression that refers to an object, either a constant, a variable, or a function application. Example: Room1, x, motherof(john). Note that a term is not a sentence in itself. An atomic sentence states a fact. It is formed from a predicate symbol followed by a list of terms. Example: Mother(Anna, John), Long(tailOf(Cat56)) A complex sentence is formed by connectives, just like in propositional logic. Example: Shining(Sun) Angry(brother(John)) A quantified sentence says something about an entire collection of objects. x P(x) means that P(x) is true for all objects x P(x) means that P(x) is true for some objects p.248 p.249 More examples of formulas Connections between and he sky is blue and the grass is green Blue(Sky) Green(Grass) Color(Sky, Blue) Color(Grass, Green) John is Mary s father fatherof(mary) = John ather(john, Mary) here are nice people x(people(x) Nice(x)) Everyone has a father x y(ather(y,x)) It is ok to use equality. Nobody likes carrots: x Likes(x, Carrots) x Likes(x, Carrots) Everybody likes ice cream: x Likes(x, IceCream) x Likes(x, IceCream) x Likes(x, IceCream) Move inwards, and the quantifier changes. Compare to DeMorgan. p.252 2

3 Interpretations in first order logic Sample interpretation N 5 What do first order sentences/formulas actually mean? An interpretation in first order logic consists of four parts: he domain, i.e. the set of objects we are talking about. A definition of all the constant symbols. A definition of all the predicate symbols (properties and relations). A definition of all the function symbols. he domain is {0, 1, 2, 3, 4}. here is one constant symbol: Smallest has the value 0 here are two function symbols: plus(x, y) is defined as addition mod 5 minus(x, y) is defined as subtraction mod 5 here is one predicate symbol: Greater(x, y) is defined as true whenever x is greater than y Working with N 5 Working with N 5 Is the following formula true in N 5? x y(greater(x,y) x = y) he formula actually says that there exists a greatest number. If we let x = 5, is the following formula true? y(greater(x,y) x = y) We can try all possible values of y and see if the inner formula is true (which it is). Which of the following formulas are true in the interpretation N 5? x y Greater(plus(x, y), x) x y z (plus(x, y) = z) (minus(z, y) = x) x y (minus(x, y) = Smallest) Experiences from first order logic 1. Convert to propositional logic Much easier to express knowledge compared to propositional logic. Much more complex interpretations, which makes it harder to draw conclusions (no truth tables). We need a sound and complete proof system! We already have resolution for propositional logic. Can we use that? Yes, we can use resolution if we transform our first order formulas into propositional formulas. his is called propositionalization. Example: Instead of x Car(x) Blue(x) we write Blue(C1) Blue(C2) Blue(C3) if the domain consists of cars C1, C2 and C3. We will soon see a method for doing this p.274 3

4 2. Matching atomic sentences In propositional logic it s easy to match positive and negative literals. R P P, R R In first order logic, it s not clear how we can match atomic sentences with different inner structure. P(f(a), b) P(x, b), R(x, c) Q(b, c) Unification Atomic sentences with different terms can be matched by unification. his is a form of pattern matching that binds variables to values. he two sentences in the example match if the variable x is bound to the term f(a). his must also be done in the resulting sentence. P(f(a), b) P(x, b), R(x, c)??? {x = f(a)} R(f(a), c) p.275 Resolution in first order logic ransformation Our goal is to transform a first order formula to a propositional formula in CN so we can use resolution. If we know KB, is S a valid conclusion? KB S the same as Is the set of formulas KB { S} unsatisfiable? transformation New set of quantifierfree formulas in CN resoluiion (using unification) 1. Rewrite and according to rules. 2. Move inwards. 3. Standardize variables. 4. Skolemize (drop existential qualifiers). 5. Drop universal quantifiers. 6. Distribute over. If we can prove contradiction, then the answer to our original question is yes! Note that the resulting formula is not equivalent to the original one, but it will be satisfiable if and only if the original one is. p.296 Skolemize with at the beginning Skolemize with inside Assume that the following formula is true x y(greater(x,y) x = y) If there exists and x, we can choose that x and call it a, so the formula can be written y(greater(a,y) a = y) a is called a Skolem constant. Assume that the following formula is true x y(greater(x,y)) x = Smallest When is inside an, we cannot introduce a Skolem constant. he y that x is greater than, might not be the same y for all x. Instead we introduce a Skolem function f, so the formula becomes x(greater(x,f(x))) x = Smallest 4

5 ransformation example x y(p(x,y) x(q(x,y) P(x,y))) rewrite x y( P(x,y) x(q(x,y) P(x,y))) move inwards x y( P(x,y) x (Q(x,y) P(x,y))) x y( P(x,y) x ( Q(x,y) P(x,y))) standardize variables x y( P(x,y) z ( Q(z,y) P(z,y))) Skolemize x( P(x,f(x)) ( Q(g(x),f(x)) P(g(x),f(x)))) drop universal quantifiers P(x,f(x)) ( Q(g(x),f(x)) P(g(x),f(x))) distribute over ( P(x,f(x)) Q(g(x),f(x))) ( P(x,f(x)) P(g(x),f(x))) set of clauses { P(x,f(x)) Q(g(x),f(x)), P(x,f(x)) P(g(x),f(x))} A complete example rom Horses are animals, it follows that he head of a horse is the head of an animal. Demonstrate that this inference is valid by carrying out the following steps: ranslate the premise and the conclusion to the language of first order logic using the predicates HeadOf(h, x), Horse(x) and Animal(x). Negate the conclusion. Convert the premise and the negated conclusion into CN. Use resolution to show that the conclusion follows from the premise (i.e. deduce a contradiction from the negated conclusion). 1. ormulas in first order logic 2. ransform to CN he premise x(horse(x) Animal(x)) he conclusion x y(headof(y,x) Horse(x) Animal(x)) he premise x(horse(x) Animal(x)) x( Horse(x) Animal(x)) Horse(x) Animal(x) { Horse(x) Animal(x)} convert drop set of clauses 2. ransform to CN he negated conclusion x y(headof(y,x) Horse(x) Animal(x)) convert x y( (HeadOf(y,x) Horse(x)) Animal(x)) move inwards x y ( (HeadOf(y,x) Horse(x)) Animal(x)) x y(headof(y,x) Horse(x) Animal(x)) Skolemize y(headof(y,a) Horse(a) Animal(a)) drop HeadOf(y,a) Horse(a) Animal(a) set of clauses {HeadOf(y,a), Horse(a), Animal(a)} 3. Resolution (using unification) Horse(x) Animal(x) HeadOf(y,a) Horse(a) Animal(a) {x = a} Animal(a) 5

6 ormal languages Knowledge engineering Language Propositional logic irst order logic emporal logic Probability theory uzzy logic What exists in the world? (Ontological commitment) facts facts, objects, relations facts, objects, relations, times facts facts with degree of truth 0..1 What an agent believes about facts (Epistemological commitment) true/false/unknown true/false/unknown true/false/unknown degree of belief 0..1 known interval value 1. Identify the task. 2. Assemble the relevant knowledge. 3. Decide on a vocabulary of predicates, functions, and constants. 4. Encode general knowledge about the domain. 5. Encode a description of the specific problem instance. 6. Pose queries to the inference procedure and get answers. 7. Debug the knowledge base. p.244 p.261 Situation calculus Situation calculus Both propositional and first order logic by default assumes a static world that does not change. But an intelligent agent has to be able to reason about the result of actions and how they change the world. We will briefly discuss situation calculus, implemented in first order logic, that gives us that possibility. We will use the Wumpus world as example. A situation encode everything there is to know about the world at a given time. he function Result(a, s) names the new situation after doing action a in situation s. luents are functions and predicates that vary from one situation to the next. Example: Holding(G 1, S 0 ) Eternal functions and predicates indicate what is true in all situations. Example: Gold(G 1 ) p.328 Situations Describing actions he simplest way to describe actions is by possibility axioms and effect axioms. Examples of possibility axioms: At(A,x 1,s) Adjacent(x 1,x 2 ) Poss(Go(x 1,x 2 ),s) Gold(g) At(A,x,s) At(g,x,s) Poss(Grab(g),s) Examples of effect axioms: Poss(Go(x 1,x 2 ),s) At(A,x 2,Result(Go(x 1,x 2 ),s)) Poss(Grab(g),s) Holding(g,Result(Grab(g),s)) 6

7 Example of initial knowledge base Searching for gold At(A,[1,1],S 0 ) agent is at [1,1] At(G 1,[1,2],S 0 ) object G 1 is at [1,2] Gold(G 1 ) object G 1 is the gold Adjacent([1,1],[1,2]) [1,1] is next to [1,2] Adjacent([1,2],[1,1]) [1,2] is next to [1,1] Plus possibility and effect axioms Our first step is Go([1,1],[1,2]) which is possible according to the knowledge base, including possibility and effect axioms. Our next step is Grab(G 1 ) since the gold is in [1,2], but this is not possible! rom the knowledge base and the axioms we cannot deduce that the gold is in [1,2] in the situation S 1 = Result(Go([1,1],[1,2],S 0 ). Intuitively this should be obvious, but it is not stated in our axioms! he frame problem Solving the frame problem he effect axiom says what changes, but they don t say what stays the same (e.g. that the gold is still in [1,2]). his is an example of the frame problem. In the real world, most things stay the same from one situation to another. How can we encode this knowledge? If we have A actions and fluent predicates in our language, we need A frame axioms (where most of them say that a fluent is not affected at all). his seems difficult! p.331 Instead of writing out the effect of each action, we consider how each fluent predicate evolves over time. We use successor-state axioms instead: action is possible (fluent is true in result state action s effect made it true it was true before and action left it alone) Example: Poss(a, s) (At(A,y,Result(a,s)) a = Go(x,y) (At(A,y,s) a Go(y,z))) Problems in situation calculus You should be able to Representational frame problem How can we represent what stays the same? Inferential frame problem How can we find the result of a sequence of n actions in a reasonable time? Ramification problem How can we represent implicit effect, e.g. that the gold moves with the agent when grabbed? Qualification problem What happens if the agent crashes inside the cave? Explain basic concepts (e.g. tautology, satisfiability) ormulate sentences in both propositional and first order logic Decide if a formula is true or false in a given interpretation Use resolution in both propositional and first order logic Briefly discuss advanced concepts (e.g. different kinds of logic) 7

Principles of Intelligent Systems: Situation Calculus

Principles of Intelligent Systems: Situation Calculus Principles of Intelligent Systems: Situation Calculus Lecture 11 These slides are based on Chapters 8 and 10 of Russell and Norvig s Artificial Intelligence: A modern approach (http://aima.eecs.berkeley.edu/slides-pdf/)

More information

Propositional Logic: Logical Agents (Part I)

Propositional Logic: Logical Agents (Part I) Propositional Logic: Logical Agents (Part I) This lecture topic: Propositional Logic (two lectures) Chapter 7.1-7.4 (this lecture, Part I) Chapter 7.5 (next lecture, Part II) Next lecture topic: First-order

More information

Artificial Intelligence Knowledge Representation I

Artificial Intelligence Knowledge Representation I Artificial Intelligence Knowledge Representation I Agents that reason logically knowledge-based approach implement agents that know about their world and reason about possible courses of action needs to

More information

First Order Logic (FOL)

First Order Logic (FOL) First Order Logic (FOL) CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2013 Soleymani Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter

More information

Artificial Intelligence Chapter 7: Logical Agents

Artificial Intelligence Chapter 7: Logical Agents Artificial Intelligence Chapter 7: Logical Agents Michael Scherger Department of Computer Science Kent State University February 20, 2006 AI: Chapter 7: Logical Agents 1 Contents Knowledge Based Agents

More information

Propositional Logic: Logical Agents (Part I)

Propositional Logic: Logical Agents (Part I) Propositional Logic: Logical Agents (Part I) First Lecture Today (Tue 21 Jun) Read Chapters 1 and 2 Second Lecture Today (Tue 21 Jun) Read Chapter 7.1-7.4 Next Lecture (Thu 23 Jun) Read Chapters 7.5 (optional:

More information

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference Outline Logical Agents ECE57 Applied Artificial Intelligence Spring 007 Lecture #6 Logical reasoning Propositional Logic Wumpus World Inference Russell & Norvig, chapter 7 ECE57 Applied Artificial Intelligence

More information

Logical Agents. Santa Clara University

Logical Agents. Santa Clara University Logical Agents Santa Clara University Logical Agents Humans know things Humans use knowledge to make plans Humans do not act completely reflexive, but reason AI: Simple problem-solving agents have knowledge

More information

Propositional and First-Order Logic

Propositional and First-Order Logic Propositional and irst-order Logic 1 Propositional Logic 2 Propositional logic Proposition : A proposition is classified as a declarative sentence which is either true or false. eg: 1) It rained yesterday.

More information

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring

7 LOGICAL AGENTS. OHJ-2556 Artificial Intelligence, Spring OHJ-2556 Artificial Intelligence, Spring 109 7 LOGICAL AGENS We now turn to knowledge-based agents that have a knowledge base KB at their disposal With the help of the KB the agent aims at maintaining knowledge of its partially-observable environment

More information

CS 771 Artificial Intelligence. Propositional Logic

CS 771 Artificial Intelligence. Propositional Logic CS 771 Artificial Intelligence Propositional Logic Why Do We Need Logic? Problem-solving agents were very inflexible hard code every possible state E.g., in the transition of 8-puzzle problem, knowledge

More information

Introduction to Intelligent Systems

Introduction to Intelligent Systems Logical Agents Objectives Inference and entailment Sound and complete inference algorithms Inference by model checking Inference by proof Resolution Forward and backward chaining Reference Russel/Norvig:

More information

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001

Logic. Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001 Logic Introduction to Artificial Intelligence CS/ECE 348 Lecture 11 September 27, 2001 Last Lecture Games Cont. α-β pruning Outline Games with chance, e.g. Backgammon Logical Agents and thewumpus World

More information

J Propositional logic is declarative J Propositional logic is compositional: q meaning of B 1,1 P 1,2 is derived from meaning of B 1,1 and of P 1,2

J Propositional logic is declarative J Propositional logic is compositional: q meaning of B 1,1 P 1,2 is derived from meaning of B 1,1 and of P 1,2 Propositional logic First-Order Logic Russell and Norvig Chapter 8 J Propositional logic is declarative J Propositional logic is compositional: meaning of B 1,1 P 1,2 is derived from meaning of B 1,1 and

More information

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning

COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning COMP9414, Monday 26 March, 2012 Propositional Logic 2 COMP9414: Artificial Intelligence Propositional Logic: Automated Reasoning Overview Proof systems (including soundness and completeness) Normal Forms

More information

Logical Agent & Propositional Logic

Logical Agent & Propositional Logic Logical Agent & Propositional Logic Berlin Chen 2005 References: 1. S. Russell and P. Norvig. Artificial Intelligence: A Modern Approach. Chapter 7 2. S. Russell s teaching materials Introduction The representation

More information

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference

Outline. Logical Agents. Logical Reasoning. Knowledge Representation. Logical reasoning Propositional Logic Wumpus World Inference Outline Logical Agents ECE57 Applied Artificial Intelligence Spring 008 Lecture #6 Logical reasoning Propositional Logic Wumpus World Inference Russell & Norvig, chapter 7 ECE57 Applied Artificial Intelligence

More information

Logical Agents (I) Instructor: Tsung-Che Chiang

Logical Agents (I) Instructor: Tsung-Che Chiang Logical Agents (I) Instructor: Tsung-Che Chiang tcchiang@ieee.org Department of Computer Science and Information Engineering National Taiwan Normal University Artificial Intelligence, Spring, 2010 編譯有誤

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg Contents 1 Agents

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Bernhard Nebel Albert-Ludwigs-Universität Freiburg May 17, 2016

More information

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14

Logical Agents. Knowledge based agents. Knowledge based agents. Knowledge based agents. The Wumpus World. Knowledge Bases 10/20/14 0/0/4 Knowledge based agents Logical Agents Agents need to be able to: Store information about their environment Update and reason about that information Russell and Norvig, chapter 7 Knowledge based agents

More information

First-Order Logic. Propositional logic. First Order logic. First Order Logic. Logics in General. Syntax of FOL. Examples of things we can say:

First-Order Logic. Propositional logic. First Order logic. First Order Logic. Logics in General. Syntax of FOL. Examples of things we can say: Propositional logic First-Order Logic Russell and Norvig Chapter 8 Propositional logic is declarative Propositional logic is compositional: meaning of B 1,1 P 1,2 is derived from meaning of B 1,1 and of

More information

Introduction to Intelligent Systems

Introduction to Intelligent Systems Logical Agents Objectives Inference and entailment Sound and complete inference algorithms Inference by model checking Inference by proof Resolution Forward and backward chaining Reference Russel/Norvig:

More information

Logic & Logic Agents Chapter 7 (& background)

Logic & Logic Agents Chapter 7 (& background) Lecture Notes, Advanced Artificial Intelligence (SCOM7341) Sina Institute, University of Birzeit 2 nd Semester, 2012 Advanced Artificial Intelligence (SCOM7341) Logic & Logic Agents Chapter 7 (& background)

More information

CSC242: Intro to AI. Lecture 11. Tuesday, February 26, 13

CSC242: Intro to AI. Lecture 11. Tuesday, February 26, 13 CSC242: Intro to AI Lecture 11 Propositional Inference Propositional Inference Factored Representation Splits a state into variables (factors, attributes, features, things you know ) that can have values

More information

Kecerdasan Buatan M. Ali Fauzi

Kecerdasan Buatan M. Ali Fauzi Kecerdasan Buatan M. Ali Fauzi Artificial Intelligence M. Ali Fauzi Logical Agents M. Ali Fauzi In which we design agents that can form representations of the would, use a process of inference to derive

More information

Class Assignment Strategies

Class Assignment Strategies Class Assignment Strategies ì Team- A'ack: Team a'ack ì Individualis2c: Search for possible ì Poli2cal: look at others and make decision based on who is winning, who is loosing, and conversa;on ì Emo2on

More information

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5)

Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) B.Y. Choueiry 1 Instructor s notes #12 Title: Logical Agents AIMA: Chapter 7 (Sections 7.4 and 7.5) Introduction to Artificial Intelligence CSCE 476-876, Fall 2018 URL: www.cse.unl.edu/ choueiry/f18-476-876

More information

Artificial Intelligence. Propositional logic

Artificial Intelligence. Propositional logic Artificial Intelligence Propositional logic Propositional Logic: Syntax Syntax of propositional logic defines allowable sentences Atomic sentences consists of a single proposition symbol Each symbol stands

More information

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit:

Price: $25 (incl. T-Shirt, morning tea and lunch) Visit: Three days of interesting talks & workshops from industry experts across Australia Explore new computing topics Network with students & employers in Brisbane Price: $25 (incl. T-Shirt, morning tea and

More information

Propositional Logic: Review

Propositional Logic: Review Propositional Logic: Review Propositional logic Logical constants: true, false Propositional symbols: P, Q, S,... (atomic sentences) Wrapping parentheses: ( ) Sentences are combined by connectives:...and...or

More information

Knowledge Representation Logic and Inference Propositional Logic First-order logic Vumpus World

Knowledge Representation Logic and Inference Propositional Logic First-order logic Vumpus World Knowledge Representation Logic and Inference Propositional Logic First-order logic Vumpus World 1 Assume that We design an intelligent agent (travel agent, driving agent, ) What is an intelligent agent?

More information

Logical Agent & Propositional Logic

Logical Agent & Propositional Logic Logical Agent & Propositional Logic Berlin Chen Department of Computer Science & Information Engineering National Taiwan Normal University References: 1. S. Russell and P. Norvig. Artificial Intelligence:

More information

Intelligent Agents. Pınar Yolum Utrecht University

Intelligent Agents. Pınar Yolum Utrecht University Intelligent Agents Pınar Yolum p.yolum@uu.nl Utrecht University Logical Agents (Based mostly on the course slides from http://aima.cs.berkeley.edu/) Outline Knowledge-based agents Wumpus world Logic in

More information

CSCI 5582 Artificial Intelligence. Today 9/28. Knowledge Representation. Lecture 9

CSCI 5582 Artificial Intelligence. Today 9/28. Knowledge Representation. Lecture 9 CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin Today 9/28 Review propositional logic Reasoning with Models Break More reasoning Knowledge Representation A knowledge representation is a formal scheme

More information

First-order logic. First-order logic. Logics in general. Outline. Syntax of FOL: Basic elements. Pros and cons of propositional logic

First-order logic. First-order logic. Logics in general. Outline. Syntax of FOL: Basic elements. Pros and cons of propositional logic First-order logic Whereas propositional logic assumes world contains facts, first-order logic (like natural language) assumes the world contains First-order logic Chapter 8 Objects: people, houses, numbers,

More information

CS 4700: Foundations of Artificial Intelligence

CS 4700: Foundations of Artificial Intelligence CS 4700: Foundations of Artificial Intelligence Bart Selman selman@cs.cornell.edu Module: Knowledge, Reasoning, and Planning Part 2 Logical Agents R&N: Chapter 7 1 Illustrative example: Wumpus World (Somewhat

More information

First-order logic. Chapter 8. Chapter 8 1

First-order logic. Chapter 8. Chapter 8 1 First-order logic Chapter 8 Chapter 8 1 (Slides borrowed from Stuart Russel: http://aima.eecs.berkeley.edu/slides-tex/) Chapter 8 2 First-order logic Whereas propositional logic assumes world contains

More information

Lecture 8: (Predicate) First Order Logic

Lecture 8: (Predicate) First Order Logic Lecture 8: (Predicate) First Order Logic CS 580 (001) - Spring 2018 Amarda Shehu Department of Computer Science George Mason University, Fairfax, VA, USA April 04, 2018 Amarda Shehu (580) 1 1 Outline of

More information

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS

EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS Lecture 10, 5/9/2005 University of Washington, Department of Electrical Engineering Spring 2005 Instructor: Professor Jeff A. Bilmes Logical Agents Chapter 7

More information

7.5.2 Proof by Resolution

7.5.2 Proof by Resolution 137 7.5.2 Proof by Resolution The inference rules covered so far are sound Combined with any complete search algorithm they also constitute a complete inference algorithm However, removing any one inference

More information

AI Programming CS S-09 Knowledge Representation

AI Programming CS S-09 Knowledge Representation AI Programming CS662-2013S-09 Knowledge Representation David Galles Department of Computer Science University of San Francisco 09-0: Overview So far, we ve talked about search, which is a means of considering

More information

Description Logics. Foundations of Propositional Logic. franconi. Enrico Franconi

Description Logics. Foundations of Propositional Logic.   franconi. Enrico Franconi (1/27) Description Logics Foundations of Propositional Logic Enrico Franconi franconi@cs.man.ac.uk http://www.cs.man.ac.uk/ franconi Department of Computer Science, University of Manchester (2/27) Knowledge

More information

CS 380: ARTIFICIAL INTELLIGENCE FIRST ORDER LOGIC. Santiago Ontañón

CS 380: ARTIFICIAL INTELLIGENCE FIRST ORDER LOGIC. Santiago Ontañón CS 380: ARTIFICIAL INTELLIGENCE FIRST ORDER LOGIC Santiago Ontañón so367@drexel.edu Pros and cons of propositional logic Propositional logic is declarative: pieces of syntax correspond to facts Propositional

More information

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR

Overview. Knowledge-Based Agents. Introduction. COMP219: Artificial Intelligence. Lecture 19: Logic for KR COMP219: Artificial Intelligence Lecture 19: Logic for KR Last time Expert Systems and Ontologies oday Logic as a knowledge representation scheme Propositional Logic Syntax Semantics Proof theory Natural

More information

Logical Agents. Chapter 7

Logical Agents. Chapter 7 Logical Agents Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 7. Propositional Logic Rational Thinking, Logic, Resolution Joschka Boedecker and Wolfram Burgard and Frank Hutter and Bernhard Nebel Albert-Ludwigs-Universität Freiburg

More information

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World

Agenda. Artificial Intelligence. Reasoning in the Wumpus World. The Wumpus World Agenda Artificial Intelligence 10. Propositional Reasoning, Part I: Principles How to Think About What is True or False 1 Introduction Álvaro Torralba Wolfgang Wahlster 2 Propositional Logic 3 Resolution

More information

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel

7. Propositional Logic. Wolfram Burgard and Bernhard Nebel Foundations of AI 7. Propositional Logic Rational Thinking, Logic, Resolution Wolfram Burgard and Bernhard Nebel Contents Agents that think rationally The wumpus world Propositional logic: syntax and semantics

More information

Introduction to Artificial Intelligence. Logical Agents

Introduction to Artificial Intelligence. Logical Agents Introduction to Artificial Intelligence Logical Agents (Logic, Deduction, Knowledge Representation) Bernhard Beckert UNIVERSITÄT KOBLENZ-LANDAU Winter Term 2004/2005 B. Beckert: KI für IM p.1 Outline Knowledge-based

More information

Guest Speaker. CS 416 Artificial Intelligence. First-order logic. Diagnostic Rules. Causal Rules. Causal Rules. Page 1

Guest Speaker. CS 416 Artificial Intelligence. First-order logic. Diagnostic Rules. Causal Rules. Causal Rules. Page 1 Page 1 Guest Speaker CS 416 Artificial Intelligence Lecture 13 First-Order Logic Chapter 8 Topics in Optimal Control, Minimax Control, and Game Theory March 28 th, 2 p.m. OLS 005 Onesimo Hernandez-Lerma

More information

Section Summary. Section 1.5 9/9/2014

Section Summary. Section 1.5 9/9/2014 Section 1.5 Section Summary Nested Quantifiers Order of Quantifiers Translating from Nested Quantifiers into English Translating Mathematical Statements into Statements involving Nested Quantifiers Translated

More information

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim

INF5390 Kunstig intelligens. Logical Agents. Roar Fjellheim INF5390 Kunstig intelligens Logical Agents Roar Fjellheim Outline Knowledge-based agents The Wumpus world Knowledge representation Logical reasoning Propositional logic Wumpus agent Summary AIMA Chapter

More information

Logical Agents. Chapter 7

Logical Agents. Chapter 7 Logical Agents Chapter 7 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem

More information

Section Summary. Predicates Variables Quantifiers. Negating Quantifiers. Translating English to Logic Logic Programming (optional)

Section Summary. Predicates Variables Quantifiers. Negating Quantifiers. Translating English to Logic Logic Programming (optional) Predicate Logic 1 Section Summary Predicates Variables Quantifiers Universal Quantifier Existential Quantifier Negating Quantifiers De Morgan s Laws for Quantifiers Translating English to Logic Logic Programming

More information

COMP3702/7702 Artificial Intelligence Week 5: Search in Continuous Space with an Application in Motion Planning " Hanna Kurniawati"

COMP3702/7702 Artificial Intelligence Week 5: Search in Continuous Space with an Application in Motion Planning  Hanna Kurniawati COMP3702/7702 Artificial Intelligence Week 5: Search in Continuous Space with an Application in Motion Planning " Hanna Kurniawati" Last week" Main components of PRM" Collision check for a configuration"

More information

Proof Methods for Propositional Logic

Proof Methods for Propositional Logic Proof Methods for Propositional Logic Logical equivalence Two sentences are logically equivalent iff they are true in the same models: α ß iff α β and β α Russell and Norvig Chapter 7 CS440 Fall 2015 1

More information

CS:4420 Artificial Intelligence

CS:4420 Artificial Intelligence CS:4420 rtificial Intelligence Spring 2018 Logical gents Cesare Tinelli The University of Iowa Copyright 2004 18, Cesare Tinelli and Stuart Russell a a These notes were originally developed by Stuart Russell

More information

Logic and Reasoning. Foundations of Computing Science. Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

Logic and Reasoning. Foundations of Computing Science. Pallab Dasgupta Professor, Dept. of Computer Sc & Engg INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR Logic and Reasoning Foundations of Computing Science Pallab Dasgupta Professor, Dept. of Computer Sc & Engg 2 Knowledge and Reasoning Representation, Reasoning and Logic Propositional Logic First-Order

More information

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier

Section Summary. Predicate logic Quantifiers. Negating Quantifiers. Translating English to Logic. Universal Quantifier Existential Quantifier Section 1.4 Section Summary Predicate logic Quantifiers Universal Quantifier Existential Quantifier Negating Quantifiers De Morgan s Laws for Quantifiers Translating English to Logic Propositional Logic

More information

Propositional Logic: Methods of Proof (Part II)

Propositional Logic: Methods of Proof (Part II) Propositional Logic: Methods of Proof (Part II) You will be expected to know Basic definitions Inference, derive, sound, complete Conjunctive Normal Form (CNF) Convert a Boolean formula to CNF Do a short

More information

CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents

CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents CS 331: Artificial Intelligence Propositional Logic I 1 Knowledge-based Agents Can represent knowledge And reason with this knowledge How is this different from the knowledge used by problem-specific agents?

More information

Knowledge-based Agents. CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents. Outline. Knowledge-based Agents

Knowledge-based Agents. CS 331: Artificial Intelligence Propositional Logic I. Knowledge-based Agents. Outline. Knowledge-based Agents Knowledge-based Agents CS 331: Artificial Intelligence Propositional Logic I Can represent knowledge And reason with this knowledge How is this different from the knowledge used by problem-specific agents?

More information

First Order Logic. Philipp Koehn. 8 October 2015

First Order Logic. Philipp Koehn. 8 October 2015 First Order Logic Philipp Koehn 8 October 2015 Wittgenstein: Tractatus Logico-Philosophicus 1 1. The world is everything that is the case. 2. What is the case (a fact) is the existence of states of affairs.

More information

Logical Agents. Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 7

Logical Agents. Course material: Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 7 Logical Agents CE417: Introduction to Artificial Intelligence Sharif University of Technology Soleymani In which we design agents that can form representations of a complex world, use a process of inference

More information

Knowledge based Agents

Knowledge based Agents Knowledge based Agents Shobhanjana Kalita Dept. of Computer Science & Engineering Tezpur University Slides prepared from Artificial Intelligence A Modern approach by Russell & Norvig Knowledge Based Agents

More information

Chapter 16. Logic Programming. Topics. Logic Programming. Logic Programming Paradigm

Chapter 16. Logic Programming. Topics. Logic Programming. Logic Programming Paradigm Topics Chapter 16 Logic Programming Introduction Predicate Propositions Clausal Form Horn 2 Logic Programming Paradigm AKA Declarative Paradigm The programmer Declares the goal of the computation (specification

More information

Logical Agents. Administrative. Thursday: Midterm 1, 7p-9p. Next Tuesday: DOW1013: Last name A-M DOW1017: Last name N-Z

Logical Agents. Administrative. Thursday: Midterm 1, 7p-9p. Next Tuesday: DOW1013: Last name A-M DOW1017: Last name N-Z Logical Agents Mary Herchenhahn, mary-h.com EECS 492 February 2 nd, 2010 Administrative Thursday: Midterm 1, 7p-9p DOW1013: Last name A-M DOW1017: Last name N-Z Next Tuesday: PS2 due PS3 distributed---

More information

Knowledge engineering, Situation Calculus

Knowledge engineering, Situation Calculus Part I Knowledge engineering, Situation Calculus 1 Knowledge engineering 1.1 Ontology Ontological engineering Definition 1. Ontological engineering: process for the representation of abstract concepts

More information

Logic. Stephen G. Ware CSCI 4525 / 5525

Logic. Stephen G. Ware CSCI 4525 / 5525 Logic Stephen G. Ware CSCI 4525 / 5525 Logic How can we represent knowledge about the world in a general, reusable way? How can we use existing knowledge to gain new knowledge? Problem Solving Approaches

More information

Logical Agents. Seung-Hoon Na Chonbuk National University. 1 Department of Computer Science

Logical Agents. Seung-Hoon Na Chonbuk National University. 1 Department of Computer Science Logical Agents Seung-Hoon Na 1 1 Department of Computer Science Chonbuk National University 2017.10.10 eung-hoon Na (Chonbuk National University) Logical Agents 2017.10.10 1 / 18 Wumpus world: The current

More information

Introduc)on to Ar)ficial Intelligence

Introduc)on to Ar)ficial Intelligence Introduc)on to Ar)ficial Intelligence Lecture 9 Logical reasoning CS/CNS/EE 154 Andreas Krause First order logic (FOL)! Proposi)onal logic is about simple facts! There is a breeze at loca)on [1,2]! First

More information

Agents that reason logically

Agents that reason logically Artificial Intelligence Sanguk Noh Logical Agents Agents that reason logically A Knowledge-Based Agent. function KB-Agent (percept) returns an action Tell(KB, Make-Percept-Sentence(percept,t)) action Ask(KB,

More information

Logic & Logic Agents Chapter 7 (& Some background)

Logic & Logic Agents Chapter 7 (& Some background) Lecture Notes on Logic & Logic Agents University of Birzeit, Palestine 2013 Artificial Intelligence Logic & Logic Agents Chapter 7 (& Some background) Dr. Mustafa Jarrar Sina Institute, University of Birzeit

More information

KR: First Order Logic - Intro

KR: First Order Logic - Intro KR: First Order Logic - Intro First order logic (first order predicate calculus, predicate calculus) is a higherlevel logic than propositional logic The basic components of FOL are 1. Objects 2. Relations

More information

First Order Logic (FOL)

First Order Logic (FOL) First Order Logic (FOL) CE417: Introduction to Artificial Intelligence Sharif University of Technology Spring 2015 Soleymani Artificial Intelligence: A Modern Approach, 3 rd Edition, Chapter 8 Why FOL?

More information

Logical Agents. Outline

Logical Agents. Outline Logical Agents *(Chapter 7 (Russel & Norvig, 2004)) Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability

More information

Lecture 7: Logic and Planning

Lecture 7: Logic and Planning Lecture 7: Logic and Planning Planning and representing knowledge Logic in general Propositional (Boolean) logic and its application to planning COMP-424, Lecture 8 - January 30, 2013 1 What is planning?

More information

Propositional and First-Order Logic

Propositional and First-Order Logic Propositional and First-Order Logic Chapter 7.4 7.8, 8.1 8.3, 8.5 Some material adopted from notes by Andreas Geyer-Schulz and Chuck Dyer Logic roadmap overview Propositional logic (review) Problems with

More information

COMP9414: Artificial Intelligence First-Order Logic

COMP9414: Artificial Intelligence First-Order Logic COMP9414, Wednesday 13 April, 2005 First-Order Logic 2 COMP9414: Artificial Intelligence First-Order Logic Overview Syntax of First-Order Logic Semantics of First-Order Logic Conjunctive Normal Form Wayne

More information

CS 380: ARTIFICIAL INTELLIGENCE INFERENCE IN PROPOSITIONAL LOGIC

CS 380: ARTIFICIAL INTELLIGENCE INFERENCE IN PROPOSITIONAL LOGIC CS 380: ARTIFICIAL INTELLIGENCE INFERENCE IN PROPOSITIONAL LOGIC 11/11/2013 Santiago Ontañón santi@cs.drexel.edu https://www.cs.drexel.edu/~santi/teaching/2013/cs380/intro.html Summary of last day: Logic:

More information

First-Order Logic. Doug Downey Northwestern EECS 348 Intro to AI Based on slides by Stuart Russell

First-Order Logic. Doug Downey Northwestern EECS 348 Intro to AI Based on slides by Stuart Russell First-Order Logic Doug Downey Northwestern EECS 348 Intro to AI Based on slides by Stuart Russell Pros and Cons of Propositional Logic Declarative: pieces of syntax correspond to facts Allows partial/disjunctive/negated

More information

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system):

Knowledge base (KB) = set of sentences in a formal language Declarative approach to building an agent (or other system): Logic Knowledge-based agents Inference engine Knowledge base Domain-independent algorithms Domain-specific content Knowledge base (KB) = set of sentences in a formal language Declarative approach to building

More information

CS 520: Introduction to Artificial Intelligence. Review

CS 520: Introduction to Artificial Intelligence. Review CS 520: Introduction to Artificial Intelligence Prof. Louis Steinberg : First-order Logic Proof Algorithms 1 Review Representing a Domain in FOL A domain is a portion of the world about which we wish to

More information

CS 188: Artificial Intelligence Spring 2007

CS 188: Artificial Intelligence Spring 2007 CS 188: Artificial Intelligence Spring 2007 Lecture 8: Logical Agents - I 2/8/2007 Srini Narayanan ICSI and UC Berkeley Many slides over the course adapted from Dan Klein, Stuart Russell or Andrew Moore

More information

6.825 Techniques in Artificial Intelligence. Logic Miscellanea. Completeness and Incompleteness Equality Paramodulation

6.825 Techniques in Artificial Intelligence. Logic Miscellanea. Completeness and Incompleteness Equality Paramodulation 6.825 Techniques in Artificial Intelligence Logic Miscellanea Completeness and Incompleteness Equality Paramodulation Lecture 9 1 Logic is a huge subject. It includes esoteric mathematical and philosophical

More information

Logic Programming (PLP 11) Predicate Calculus, Horn Clauses, Clocksin-Mellish Procedure

Logic Programming (PLP 11) Predicate Calculus, Horn Clauses, Clocksin-Mellish Procedure Logic Programming (PLP 11) Predicate Calculus, Horn Clauses, Clocksin-Mellish Procedure Carlos Varela Rennselaer Polytechnic Institute November 7, 2016 C. Varela 1 An Early (1971) Conversation USER: Cats

More information

Propositional Logic Not Enough

Propositional Logic Not Enough Section 1.4 Propositional Logic Not Enough If we have: All men are mortal. Socrates is a man. Does it follow that Socrates is mortal? Can t be represented in propositional logic. Need a language that talks

More information

Logic: Propositional Logic (Part I)

Logic: Propositional Logic (Part I) Logic: Propositional Logic (Part I) Alessandro Artale Free University of Bozen-Bolzano Faculty of Computer Science http://www.inf.unibz.it/ artale Descrete Mathematics and Logic BSc course Thanks to Prof.

More information

Lecture Overview [ ] Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 6. Motivation. Logical Agents

Lecture Overview [ ] Introduction to Artificial Intelligence COMP 3501 / COMP Lecture 6. Motivation. Logical Agents Lecture Overview [7.1-7.4] COMP 3501 / COMP 4704-4 Lecture 6 Prof. JGH 318 Logical Agents Wumpus World Propositional Logic Inference Theorem Proving via model checking Motivation Existing techniques help

More information

Propositional Logic: Methods of Proof. Chapter 7, Part II

Propositional Logic: Methods of Proof. Chapter 7, Part II Propositional Logic: Methods of Proof Chapter 7, Part II Inference in Formal Symbol Systems: Ontology, Representation, ti Inference Formal Symbol Systems Symbols correspond to things/ideas in the world

More information

Proving logical equivalencies (1.3)

Proving logical equivalencies (1.3) EECS 203 Spring 2016 Lecture 2 Page 1 of 6 Proving logical equivalencies (1.3) One thing we d like to do is prove that two logical statements are the same, or prove that they aren t. Vocabulary time In

More information

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask

Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Set 6: Knowledge Representation: The Propositional Calculus Chapter 7 R&N ICS 271 Fall 2017 Kalev Kask Outline Representing knowledge using logic Agent that reason logically A knowledge based agent Representing

More information

Deliberative Agents Knowledge Representation I. Deliberative Agents

Deliberative Agents Knowledge Representation I. Deliberative Agents Deliberative Agents Knowledge Representation I Vasant Honavar Bioinformatics and Computational Biology Program Center for Computational Intelligence, Learning, & Discovery honavar@cs.iastate.edu www.cs.iastate.edu/~honavar/

More information

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers

! Predicates! Variables! Quantifiers. ! Universal Quantifier! Existential Quantifier. ! Negating Quantifiers. ! De Morgan s Laws for Quantifiers Sec$on Summary (K. Rosen notes for Ch. 1.4, 1.5 corrected and extended by A.Borgida)! Predicates! Variables! Quantifiers! Universal Quantifier! Existential Quantifier! Negating Quantifiers! De Morgan s

More information

Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World

Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World Inf2D 06: Logical Agents: Knowledge Bases and the Wumpus World School of Informatics, University of Edinburgh 26/01/18 Slide Credits: Jacques Fleuriot, Michael Rovatsos, Michael Herrmann Outline Knowledge-based

More information

Logical Agents. September 14, 2004

Logical Agents. September 14, 2004 Logical Agents September 14, 2004 The aim of AI is to develop intelligent agents that can reason about actions and their effects and about the environment, create plans to achieve a goal, execute the plans,

More information

Logic. (Propositional Logic)

Logic. (Propositional Logic) Logic (Propositional Logic) 1 REPRESENTING KNOWLEDGE: LOGIC Logic is the branch of mathematics / philosophy concerned with knowledge and reasoning Aristotle distinguished between three types of arguments:

More information

CS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón

CS 380: ARTIFICIAL INTELLIGENCE PREDICATE LOGICS. Santiago Ontañón CS 380: RTIFICIL INTELLIGENCE PREDICTE LOGICS Santiago Ontañón so367@drexeledu Summary of last day: Logical gents: The can reason from the knowledge they have They can make deductions from their perceptions,

More information

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom.

Knowledge representation DATA INFORMATION KNOWLEDGE WISDOM. Figure Relation ship between data, information knowledge and wisdom. Knowledge representation Introduction Knowledge is the progression that starts with data which s limited utility. Data when processed become information, information when interpreted or evaluated becomes

More information