3/30/00 Agents that Reason Logically by Chris Horn Jiansui Yang Xiaojing Wu.

Slides:



Advertisements
Similar presentations
Russell and Norvig Chapter 7
Advertisements

Agents That Reason Logically Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2004.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Logic.
Knowledge Based Systems: Logic and Deduction Department of Computer Science & Engineering Indian Institute of Technology Kharagpur.
Artificial Intelligence Knowledge-based Agents Russell and Norvig, Ch. 6, 7.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Fall 2005.
CS 561, Sessions Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms.
Class Project Due at end of finals week Essentially anything you want, so long as its AI related and I approve Any programming language you want In pairs.
1 Problem Solving CS 331 Dr M M Awais Representational Methods Formal Methods Propositional Logic Predicate Logic.
CS 460, Sessions Knowledge and reasoning – second part Knowledge representation Logic and representation Propositional (Boolean) logic Normal forms.
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 9 Jim Martin.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Computing & Information Sciences Kansas State University Lecture 11 of 42 CIS 530 / 730 Artificial Intelligence Lecture 11 of 42 William H. Hsu Department.
Knowledge Representation & Reasoning (Part 1) Propositional Logic chapter 6 Dr Souham Meshoul CAP492.
Logical Agents Chapter 7. Why Do We Need Logic? Problem-solving agents were very inflexible: hard code every possible state. Search is almost always exponential.
Knowledge in intelligent systems So far, we’ve used relatively specialized, naïve agents. How can we build agents that incorporate knowledge and a memory?
III KNOWLEDGE AND REASONING
CSCI 5582 Fall 2006 CSCI 5582 Artificial Intelligence Lecture 8 Jim Martin.
Knoweldge Representation & Reasoning
Knowledge Representation & Reasoning (Part 1) Propositional Logic chapter 5 Dr Souham Meshoul CAP492.
Let remember from the previous lesson what is Knowledge representation
Logical Agents Chapter 7 Feb 26, Knowledge and Reasoning Knowledge of action outcome enables problem solving –a reflex agent can only find way from.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2005.
Logical Agents Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 7 Spring 2008.
Rutgers CS440, Fall 2003 Propositional Logic Reading: Ch. 7, AIMA 2 nd Ed. (skip )
Agents that Reason Logically Logical agents have knowledge base, from which they draw conclusions TELL: provide new facts to agent ASK: decide on appropriate.
Inference is a process of building a proof of a sentence, or put it differently inference is an implementation of the entailment relation between sentences.
Logical Agents Chapter 7 (based on slides from Stuart Russell and Hwee Tou Ng)
February 20, 2006AI: Chapter 7: Logical Agents1 Artificial Intelligence Chapter 7: Logical Agents Michael Scherger Department of Computer Science Kent.
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
Logical Agents Logic Propositional Logic Summary
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Class Project Due at end of finals week Essentially anything you want, so long as its AI related and I approve Any programming language you want In pairs.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
지식표현 Agent that reason logically
CSE LOGIC1 Propositional Logic An “adventure game” example Thinking?
CS 4100 Artificial Intelligence Prof. C. Hafner Class Notes Jan 17, 2012.
Logical Agents Chapter 7. Knowledge bases Knowledge base (KB): set of sentences in a formal language Inference: deriving new sentences from the KB. E.g.:
1 Logical Agents CS 171/271 (Chapter 7) Some text and images in these slides were drawn from Russel & Norvig’s published material.
1 Logical Agents Chapter 7. 2 A simple knowledge-based agent The agent must be able to: –Represent states, actions, etc. –Incorporate new percepts –Update.
For Friday Read chapter 8 Homework: –Chapter 7, exercise 1.
Logical Agents Chapter 7. Outline Knowledge-based agents Logic in general Propositional (Boolean) logic Equivalence, validity, satisfiability.
1 Logical Inference Algorithms CS 171/271 (Chapter 7, continued) Some text and images in these slides were drawn from Russel & Norvig’s published material.
1 The Wumpus Game StenchBreeze Stench Gold Breeze StenchBreeze Start  Breeze.
Wumpus World 1 Wumpus and 1 pile of gold in a pit-filled cave Starts in [1,1] facing right - Random cave Percepts: [smell, breeze, gold, bump, scream]
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
Computing & Information Sciences Kansas State University Wednesday, 13 Sep 2006CIS 490 / 730: Artificial Intelligence Lecture 10 of 42 Wednesday, 13 September.
1 UNIT-3 KNOWLEDGE REPRESENTATION. 2 Agents that reason logically(Logical agents) A Knowledge based Agent The Wumpus world environment Representation,
Logical Agents Chapter 7 Part I. 2 Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic.
1 Knowledge Representation Logic and Inference Propositional Logic Vumpus World Knowledge Representation Logic and Inference Propositional Logic Vumpus.
Artificial Intelligence Logical Agents Chapter 7.
Artificial Intelligence Logical Agents Chapter 7.
Logical Agents. Inference : Example 1 How many variables? 3 variables A,B,C How many models? 2 3 = 8 models.
LOGICAL AGENTS CHAPTER 7 AIMA 3. OUTLINE  Knowledge-based agents  Wumpus world  Logic in general - models and entailment  Propositional (Boolean)
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Knowledge and reasoning – second part
Introduction to Knowledge-bases
EA C461 – Artificial Intelligence Logical Agent
Learning and Knowledge Acquisition
Logical Agents Chapter 7 Selected and slightly modified slides from
Logical Agents Chapter 7.
Artificial Intelligence
Artificial Intelligence: Logic agents
Knowledge and reasoning – second part
Logical Agents Chapter 7.
CS 416 Artificial Intelligence
Knowledge Representation I (Propositional Logic)
CMSC 471 Fall 2011 Class #10 Tuesday, October 4 Knowledge-Based Agents
Logical Agents Prof. Dr. Widodo Budiharto 2018
Presentation transcript:

3/30/00 Agents that Reason Logically by Chris Horn Jiansui Yang Xiaojing Wu

3/30/00 Logic Prerequisites: Computer Science 313, 331 and Philosophy 279 or 377.

3/30/00 Presentation Outline 1 A Knowledge-Based Agent 2 Representation, Reasoning, and Logic 3 Propositional Logic 4 Wumpus World Example

3/30/00 Knowledge-Based Agents Hold information about the world in a Knowledge Base (KB) KB is built up of sentences. KB contains background knowledge

3/30/00 Knowledge-Based Agents (2) Three levels we can describe them at: Knowledge Level: What the agent actually knows. Logical Level: A list of the sentences in the KB. Implementation Level: The actual way the information is held in a data structure.

3/30/00 Presentation Outline 1 A Knowledge-Based Agent 2 Representation, Reasoning, and Logic 3 Propositional Logic 4 Wumpus World Example

3/30/00 Representation, Reasoning and Logic Syntax: Describes the symbols in a language and how they can be used together. Semantics: Gives meaning to the syntax. Defines how the symbols in the syntax relate to in the real world.

3/30/00 Representation, Reasoning, and Logic Entailment: If x entails y, then if x is true y is true. Proof Theory: The way in which the entailments work for a set of sentences.

3/30/00 Inference Valid: A sentence that’s true in all situations. Satisfiability: A sentence that is true in at least one situation. Unsatisfiability: A sentence that isn’t satisfiable.

3/30/00 Inference in Computers Computer programs can use valid or unsatisfiable sentences to create new sentences. This is the basis of learning in logically reasoning agents.

3/30/00 Logic Propositional logic: Also called Boolean Logic. Very simple logic. Not very useful for real situations. And, Or, Implies, Equivalent, and Not are the only connectives. First order logic: More complex logic. Useful for real world examples.

3/30/00 Presentation Outline 1 A Knowledge-Based Agent 2 Representation, Reasoning, and Logic 3 Propositional Logic 4 Wumpus World Example

3/30/00 Propositional Logic Syntax Sematics Validity & Inference Rules of Inference Complexity of propositional Inference

3/30/00 Syntax Constant: –true –false Symbols: –P, Q, … Parentheses: –()

3/30/00 Syntax (cond.) Logical connectives:  (and)  (or)  (implication)  (equivalence)  (not)

3/30/00 Sematics All the connectives are defined in a truth table For example:

3/30/00 Semantics In BNF

3/30/00 Validity A sentence is valid if it is true in all the cases. The validity of a sentence can be tested in a truth table.

3/30/00 Inference A sentence (Q) is inferred by a set of sentences {p1, p2,... } if whenever Q is true, then {p1, p2, …} are all true.

3/30/00 Rules of Inference Modus Ponens –if     –then  Add-Elimination –if  1  2 ...  n –  i

3/30/00 Rules of Inference And-Introduction –if  1,  2,  3, …,  n –then  1   2   3 ...   n Or-Introduction –if  i –then  1   2   3 ...   n

3/30/00 Rules of Inference Double Negation Elimination –if    –then  Unit Resolution –if     –then 

3/30/00 Rules of Inference Resolution –if       –then   

3/30/00 Complexity of Propositional inference It was mentioned by Cook in 1971 that the complexity is NP-complete. More precisely, it’s 2 n. Basically, we have to try all the combinations of the truth values of symbols in a sentence.

3/30/00 Inference

3/30/00 Presentation Outline 1 A Knowledge-Based Agent 2 Representation, Reasoning, and Logic 3 Propositional Logic 4 Wumpus World Example

3/30/00 Wumpus World Example The Wumpus World Environment Simple Logic The agent acting in the wumpus world

3/30/00http://cs-alb- pc3.massey.ac.nz/notes/59302/l06.ht ml Wumpus World

3/30/00 Wumpus World In the squares directly adjacent to the Wumpus, the agent will perceive a stench. In the square directly adjacent to a pit, the agent will perceive a breeze. In the square where the gold is, the agent will perceive a glitter. The agent dies a miserable death if it enters a square containing a pit or a live wumpus. The agent can kill the wumpus if it shoots the only arrow into the square it is facing when the Wumpus is in that square.

3/30/00 Wumpus World If the agent enters a square which has no pit or wumpus but has a wumpus next to it, a pit next to it and the gold in it, it will receive the percept[None, Stench, Breeze, Glitter]. The agent’s goal is to find the gold and bring it back. The agent uses logic, the percepts it receives and it’s current KB to learn about the world around it. The agent adds to it’s KB this new information it learns and can now use it.

3/30/00 Simple logic If the agent senses a stench, then it knows the WUMPUS must be in the front or left or right square. If the agent feels a breeze, then it knows the PIT must be in the front or left or right square. If the agent perceives a glitter, then it is in the square with the gold. If the agent receives none, all directly adjacent squares are safe.

3/30/00 Logic in Wumpus World The agent has sentences in it’s KB that correspond to the basic inferences it should be able to make. For example in the KB it will have a sentence that if an agent in 1,1 senses a stench then 1,2 or 2,1 has a wumpus in it. If in 1,1 the agent sense nothing then it will know that 1,2 2,1 and 1,1 all have neither a wumpus nor a pit in them.

3/30/00http://cs-alb- pc3.massey.ac.nz/notes/59302/l06.ht ml Wumpus World

3/30/00 Logic Example in Wumpus World Our agent starts in 1,1 and feels no stench. By the rule Modus Ponens and the built in knowledge in it’s KB, it can conclude that 1,2 and 2,1 do not have a wumpus. Now by the rule And-Elimination we can see that 1,2 doesn’t contain a wumpus and neither does 2,1. If our agent now moves to 2,1 it receives a percept telling it there is a breeze but no percept of a stench. Using Modus Ponens and And- Elimination we can conclude that 2,2 does not contain a wumpus, 1,1 does not contain a wumpus and 3,1 does not contain a wumpus. If our agent now backtracks because it’s unsure of where a pit may be and moves to square 1,2. It senses a stench. By Modus Ponens this means that 1,1 1,3 or 2,2 contain a wumpus.

3/30/00 Logic Example in Wumpus World Now we can use the unit resolution with the last sentence telling us that a wumpus is in 1,1 1,3 or 2,2. We use the resolution with the sentence telling us that 2,2 does not contain a wumpus and we get 1,1 or 1,3 contain a wumpus We repeat the unit resolution rule with the new sentence 1,1 or 1,3 contain a wumpus and the sentence telling us that 1,1 does not contain a wumpus. What we get is that 1,3 contains a wumpus. The agent can now use the built in logic it would have that if it knows where the wumpus is to fire it’s arrow at that square and kill it.

3/30/00 The Knowledge-Based Agent Acting in Wumpus world

3/30/00 Logic Example in Wumpus World S 11 = None  S 12 = Safe  S 21 = Safe S 12 = Breeze  S 13 = Pit  S 22 = Pit S 21 = Stench  S 31 = Wumpus  S 22 = Wumpus S 12 = Breeze  S 21 = Stench  S 22 = Safe S 22 = None  S 23 = Safe  S 32 = Safe S 23 = Breeze  S 13 = Pit  S 24 = Pit  S 33 = Pit S 32 = Glitter  Find Gold. S 32 = Stench  S 21 = Stench  S 22 =  Wumpus  S 31 = Wumpus (if only one Wumpus exists)

3/30/00 Summary Agents that reason logically have knowledge bases filled with information about the world around them in the form of sentences. Agents have both built in and acquired knowledge. Agents use the knowledge base to infer things.

3/30/00 Summary Logical languages have both syntax and symantics along with a proof theory. Propositional logic is very simple but not useful for real world applications.

3/30/00 References Norvig, Peter and Stuart Russell. Artifical Intelligence: A modern approach. Prentice Hall, Inc Roberto Flores-Mendez. Agents that Reason Logically Dr. Martin Johnson. Agents that Reason Logically