First-Order Logic and Plans Reading: C. 11 (Plans)

Slides:



Advertisements
Similar presentations
Artificial Intelligence 8. The Resolution Method
Advertisements

Some Prolog Prolog is a logic programming language
First-Order Logic.
Language for planning problems
CSE391 – 2005 NLP 1 Planning The Planning problem Planning with State-space search.
Inference Rules Universal Instantiation Existential Generalization
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
Planning Module THREE: Planning, Production Systems,Expert Systems, Uncertainty Dr M M Awais.
CLASSICAL PLANNING What is planning ?  Planning is an AI approach to control  It is deliberation about actions  Key ideas  We have a model of the.
Standard Logical Equivalences
Inference in first-order logic Chapter 9. Outline Reducing first-order inference to propositional inference Unification Generalized Modus Ponens Forward.
UIUC CS 497: Section EA Lecture #2 Reasoning in Artificial Intelligence Professor: Eyal Amir Spring Semester 2004.
We have seen that we can use Generalized Modus Ponens (GMP) combined with search to see if a fact is entailed from a Knowledge Base. Unfortunately, there.
Methods of Proof Chapter 7, second half.. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound)
For Friday No reading Homework: –Chapter 9, exercise 4 (This is VERY short – do it while you’re running your tests) Make sure you keep variables and constants.
Logic Use mathematical deduction to derive new knowledge.
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Methods of Proof Chapter 7, Part II. Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules: Legitimate (sound) generation.
Propositional Logic Reading: C , C Logic: Outline Propositional Logic Inference in Propositional Logic First-order logic.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Outline Recap Knowledge Representation I Textbook: Chapters 6, 7, 9 and 10.
Proof methods Proof methods divide into (roughly) two kinds: –Application of inference rules Legitimate (sound) generation of new sentences from old Proof.
Logic in general Logics are formal languages for representing information such that conclusions can be drawn Syntax defines the sentences in the language.
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Artificial Intelligence Chapter 11: Planning
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
Inference and Resolution for Problem Solving
Methods of Proof Chapter 7, second half.
Knoweldge Representation & Reasoning
Inference in First-Order Logic
Planning Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 11.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
Proof Systems KB |- Q iff there is a sequence of wffs D1,..., Dn such that Dn is Q and for each Di in the sequence: a) either Di is in KB or b) Di can.
CHAPTERS 7, 8 Oliver Schulte Logical Inference: Through Proof to Truth.
Solvers for the Problem of Boolean Satisfiability (SAT) Will Klieber Aug 31, 2011 TexPoint fonts used in EMF. Read the TexPoint manual before you.
Logical Agents Logic Propositional Logic Summary
1 Knowledge Representation. 2 Definitions Knowledge Base Knowledge Base A set of representations of facts about the world. A set of representations of.
Logical Agents Chapter 7. Outline Knowledge-based agents Wumpus world Logic in general - models and entailment Propositional (Boolean) logic Equivalence,
Propositional Logic: Methods of Proof (Part II) This lecture topic: Propositional Logic (two lectures) Chapter (previous lecture, Part I) Chapter.
An Introduction to Artificial Intelligence – CE Chapter 7- Logical Agents Ramin Halavati
S P Vimal, Department of CSIS, BITS, Pilani
CPSC 322, Lecture 23Slide 1 Logic: TD as search, Datalog (variables) Computer Science cpsc322, Lecture 23 (Textbook Chpt 5.2 & some basic concepts from.
CS Introduction to AI Tutorial 8 Resolution Tutorial 8 Resolution.
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 Chapter 7. 2 A simple knowledge-based agent The agent must be able to: –Represent states, actions, etc. –Incorporate new percepts –Update.
LDK R Logics for Data and Knowledge Representation Propositional Logic: Reasoning First version by Alessandro Agostini and Fausto Giunchiglia Second version.
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
Kansas State University Department of Computing and Information Sciences CIS 730: Introduction to Artificial Intelligence Lecture 15 of 41 Friday 24 September.
AI Lecture 17 Planning Noémie Elhadad (substituting for Prof. McKeown)
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
Inference in First Order Logic. Outline Reducing first order inference to propositional inference Unification Generalized Modus Ponens Forward and backward.
First-Order Logic Reading: C. 8 and C. 9 Pente specifications handed back at end of class.
Dr. Shazzad Hosain Department of EECS North South Universtiy Lecture 04 – Part B Propositional Logic.
Planning I: Total Order Planners Sections
1 Propositional Logic Limits The expressive power of propositional logic is limited. The assumption is that everything can be expressed by simple facts.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Proof Methods for Propositional Logic CIS 391 – Intro to Artificial Intelligence.
Computing & Information Sciences Kansas State University Wednesday, 04 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 17 of 42 Wednesday, 04 October.
Computing & Information Sciences Kansas State University Friday, 13 Oct 2006CIS 490 / 730: Artificial Intelligence Lecture 21 of 42 Friday, 13 October.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
EA C461 Artificial Intelligence
Inference in first-order logic
EA C461 – Artificial Intelligence Logical Agent
Logical Inference: Through Proof to Truth
Logical Agents Reading: Russell’s Chapter 7
Artificial Intelligence: Agents and Propositional Logic.
CS 416 Artificial Intelligence
Methods of Proof Chapter 7, second half.
Presentation transcript:

First-Order Logic and Plans Reading: C. 11 (Plans)

2 Grades Handed back at end of class. Midterms will only be given to owners All of your grades are online in the Courseworks gradebook. You can check. Class participation grade Represents your effort to date For remainder of semester, I will use class list to call on people, particularly those who are less vocal. This will give everyone a chance. Of course, you must be present to take advantage of your turn.

3 Tournament Start date: Tuesday, Nov.16 th You must sign up by Nov. 11 th, midnight to participate. It’s optional. 2 person games only 1 minute time limitation per move Passing to second round: Each program will play two times against every other program, as first and as second player Top 50% will move on to second round Number of rounds will be determined in part by number of entrants If you decide to enter, you must include a script to run your program with proper parameters You determine search depth that you will play at

4 Extra Credit 5 points for entering and finishing without faults No crashes < 50% timeouts 5 points for moving to round 2 10 points for moving to round 3 (or top 50% of round 2) 10 points for top 4 10 points for #1 finish

5 Example Family trees What does the model look like? Father-of Mother-of Sibling What can we infer? Cousin Ancestors

6 To Make Inferences in FOL Method 1 Unification of variables with literals (in the KB) Generalized Modus Ponens Forward-chaining or Backward-chaining Method 2 Resolution

7 Unification We want to find a substitution  such that x and y match literals Unify ( ,  ) =  if  =  Some examples

8 Unification for example

9 P`1= father-of(Kathy)=Michael P 1 = father-of(x)=y  ={x/Kathy,y/Michael} q=ancestor(x,y) q`=ancestor(Kathy,Michael)

10

11 Example inference using forward chaining (production systems)

12 Properties of forward-chaining Sound and complete for first-order definite clauses Datalog is first-order definite clauses and no functions May not terminate in general if is not entailed This is unavoidable: entailment with definite clauses is semi-decidable Forward chaining is widely used in deductive databases

13

14 Example inference using backward chaining

15 Properties of backward-chaining Depth-first recursive proof search: space is linear in size of proof Incomplete due to infinite loops Fix by checking current goal against every goal on stack Inefficient due to repeated subgoals (both success and failure) Fix using cache of previous results (extra space!) Widely used (without improvements!) for logic programming (e.g., Prolog)

16 Refutation and generalized resolution Inference with generalized modus ponens is not complete for FOL Proof by refutation and generalized resolution is complete But slow and only semi-decidable (cannot know that a sentence is not entailed)

17 Refutation/Resolution Introduce negated sentence Convert to a CNF (disjunction of terms, or “literals”) Apply resolution search to determine satisfiability (SAT) or unsatsifiability (UNSAT) SAT, then not entailed Semi-decidability implies there may be a SAT solution we can never find UNSAT, then entailed

18 Conversion to CNF 1. Eliminate  using ⌐ and V 2. Push ⌐ inward using de Morgan’s laws 3. Standardize variables apart 4. Eliminate  using Skolem functions 5. Move  to front, and drop 6. Distribute Λ over V to get CNF 7. Split into separate clauses (remove Λ) 8. Standardize variables apart (across clauses)

19

20 Example using Resolution

21 Planning An approach to problem solving that combines logic with search Cognitively motivated? Suited for more complex problems

22 Problem solving so far Typical Problem -> language -> representation + algorithm -> solution For example, recall the 8-puzzle Choose a representation Choose a heuristic Choose a search algorithm

23 General Problem solving Ideally, we would like to describe a problem at a high level, let AI take care of the rest Problem -> representation -> solutions generalgeneral language algorithm

24 Required Planning Components Expressive Formal Language: Initial state of world Description of the agent’s goal Description of the possible actions that can be performed Solver generates a sequence of actions which achieve the goal Key idea will be to use structure to extract admissable heuristics automatically

25 STRIPS language (Fikes&Nilsson 71) State is a conjunction of positive ground literals No variables and no functions AT(,Kathy,Gate70), Weight-limit-lifted(CO36) Goal is a conjunction of positive ground literals At(Kathy,Denver)Λ⌐onboard(Kathy,C036) Action schemas Conjunction of positive literals as preconditions Conjunction of positive and negative literals as effects

26 Action Schema Action: Go(p,x,y) Precond: At(P,x) Effect: ⌐At(p,x)At(p,y) delete list add list

27 Comments: STRIPS Closed World assumption Unmentioned literals are false (no need to explicitly list out) w/an open world assumption unmentioned literals are unknown STRIPS assumption Every literal not mentioned in the “effect” of an action schema remains unchanged

28 Travel Example

29 STRIPS Expressiveness Literals are function free: Any action scheme can be propositionalized E.g., 10 planes, 5 airports, then Fly(p,from,to) can be expressed as 250 purely propositional actions Cannot address the ramifications of an action The people, packages, wine, etc. on an airplane also change location when the plane flies Cannot express disjunctive goals At(Kathy,Denver)ΛDay(Friday) V At(Kathy,Denver)ΛDay(Saturday) No conditional effects No way to say “At(Kathy,Denver)” an effect of Fly(Kathy,Co36,Denver) only if ⌐crash(CO36)

30 Planning Algorithms Forward vs. Backward search Partial-order vs. Total-order Partial: search in plan space Can work on several subgoals independently, solve and then combine subplans Total: search in state space Search linear sequence of actions directly connected to the start or the goal

31

32 Forward State Space Search State: positive ground literals Initial state: set of initial world literals Search operator: Choose an action A that 1.preconditions are satisfied (perhaps finding a unifier) Construct the new search state Add all positive effects; remove all negative effects Solution: when current state is goal state