CIT 856 – Artificial Intelligence

Slides:



Advertisements
Similar presentations
Artificial Intelligence
Advertisements

Artificial Intelligence 8. The Resolution Method
Some Prolog Prolog is a logic programming language
Inference Rules Universal Instantiation Existential Generalization
1 A formula in predicate logic An atom is a formula. If F is a formula then (~F) is a formula. If F and G are Formulae then (F /\ G), (F \/ G), (F → G),
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Introduction to Theorem Proving
Standard Logical Equivalences
1 Logic Logic in general is a subfield of philosophy and its development is credited to ancient Greeks. Symbolic or mathematical logic is used in AI. In.
Artificial Intelligence
First Order Logic Resolution
Inference and Reasoning. Basic Idea Given a set of statements, does a new statement logically follow from this. For example If an animal has wings and.
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.
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.
Resolution
13 Automated Reasoning 13.0 Introduction to Weak Methods in Theorem Proving 13.1 The General Problem Solver and Difference Tables 13.2 Resolution.
Logic CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Logic.
Logic Concepts Lecture Module 11.
F22H1 Logic and Proof Week 7 Clausal Form and Resolution.
Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus Artificial Intelligence Chapter 14. Resolution in the Propositional Calculus.
Using Predicate Logic Chapter 5.
Inference in FOL Copyright, 1996 © Dale Carnegie & Associates, Inc. Chapter 9 Spring 2004.
1 Automated Reasoning Introduction to Weak Methods in Theorem Proving 13.1The General Problem Solver and Difference Tables 13.2Resolution Theorem.
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
Knoweldge Representation & Reasoning
Artificial Intelligence
Proof by Deduction. Deductions and Formal Proofs A deduction is a sequence of logic statements, each of which is known or assumed to be true A formal.
Logical and Rule-Based Reasoning Part I. Logical Models and Reasoning Big Question: Do people think logically?
Knowledge & Reasoning Logical Reasoning: to have a computer automatically perform deduction or prove theorems Knowledge Representations: modern ways of.
Propositional Logic Reasoning correctly computationally Chapter 7 or 8.
I NTRO TO L OGIC Dr Shlomo Hershkop March
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
UBI517 Expert Systems 1 Lecture 2 Knowledge Representation.
Notes for Chapter 12 Logic Programming The AI War Basic Concepts of Logic Programming Prolog Review questions.
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.
UNIVERSITI TENAGA NASIONAL 1 CSNB234 ARTIFICIAL INTELLIGENCE Chapter 3 Propositional Logic & Predicate Logic Chapter 3 Propositional Logic & Predicate.
1 Chapter 7 Propositional and Predicate Logic. 2 Chapter 7 Contents (1) l What is Logic? l Logical Operators l Translating between English and Logic l.
Conjunctive normal form: any formula of the predicate calculus can be transformed into a conjunctive normal form. Def. A formula is said to be in conjunctive.
1 Sections 1.5 & 3.1 Methods of Proof / Proof Strategy.
Pattern-directed inference systems
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.
2.3Logical Implication: Rules of Inference From the notion of a valid argument, we begin a formal study of what we shall mean by an argument and when such.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Logical Representations and Resolution. Boolean Logic Conjunctive normal form 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.:
Automated Reasoning Early AI explored how to automated several reasoning tasks – these were solved by what we might call weak problem solving methods as.
CS6133 Software Specification and Verification
Chapter 2 Logic 2.1 Statements 2.2 The Negation of a Statement 2.3 The Disjunction and Conjunction of Statements 2.4 The Implication 2.5 More on Implications.
Artificial Intelligence 7. Making Deductive Inferences Course V231 Department of Computing Imperial College, London Jeremy Gow.
© Copyright 2008 STI INNSBRUCK Intelligent Systems Propositional Logic.
11 Artificial Intelligence CS 165A Thursday, October 25, 2007  Knowledge and reasoning (Ch 7) Propositional logic 1.
Chapter 7. Propositional and Predicate Logic Fall 2013 Comp3710 Artificial Intelligence Computing Science Thompson Rivers University.
1 Example: The following knowledge is given :The following knowledge is given : 1. Marcus was a man. 2. Marcus was a Pompeian. 3. All Pompeians were Romans.
Logical Agents Chapter 7. Outline Knowledge-based agents Propositional (Boolean) logic Equivalence, validity, satisfiability Inference rules and theorem.
Foundations of Discrete Mathematics Chapter 1 By Dr. Dalia M. Gil, Ph.D.
Discrete Mathematical Structures: Theory and Applications 1 Logic: Learning Objectives  Learn about statements (propositions)  Learn how to use logical.
Logical Agents. Outline Knowledge-based agents Logic in general - models and entailment Propositional (Boolean) logic Equivalence, validity, satisfiability.
Knowledge Representation
Chapter 7. Propositional and Predicate Logic
Knowledge Representation and Reasoning
CS201: Data Structures and Discrete Mathematics I
Logic Use mathematical deduction to derive new knowledge.
CS 416 Artificial Intelligence
Chapter 7. Propositional and Predicate Logic
CSNB234 ARTIFICIAL INTELLIGENCE
Foundations of Discrete Mathematics
CS201: Data Structures and Discrete Mathematics I
Presentation transcript:

CIT 856 – Artificial Intelligence Resolution and NonMonotonic Reasoning Powered by DeSiaMore

Making Deductive Inferences Knowledge That and, or are commutative, distributive Some commonly used propositional equivalence rules Double negation, rules [E1], [E4], [E5], de Morgans law Some commonly used implication rules Unit resolution, and elimination, or introduction, Existential elimination, etc. I tend to supply inference rules in exams Not simple/common ones Different ways of chaining together inference steps Forward/backward chaining, proof by contradiction Powered by DeSiaMore

Making Deductive Inferences Understanding What it means for two sentences to be logically equivalent What it means for a sentence to be false What it means for one sentence to entail another How rewrite rules can be used for proving equivalences Abilities Use truth tables to Show equivalences, tautologies, that a statement is false That one statement implies another Apply inference rules Show what’s above and below the line Translate sentences: Be fluent in rewriting sentences Powered by DeSiaMore

The Resolution Method Knowledge Understanding What conjunctive normal form is What a substitution is, what unification does Overview of the unification algorithm The resolution rule Unit resolution, full resolution, generalised resolution Understanding That resolution is refutation-complete Why we need conjunctive normal form/unification Why the occurs-check is important in unification Powered by DeSiaMore

The Resolution Method Abilities Translate something into conjunctive normal form By using equivalence rules Organising quantifiers, standardising variables, etc. Existential elimination Put a constant in place of an existential variable Not using full skolemisation (we skipped over that) Prepare a set of sentences for use in a resolution proof Needs all sentences as single clauses (just split them) Find a unifying set of substitutions Apply them to unify two sentences Powered by DeSiaMore

Resolution Theorem Proving Knowledge Specifying a problem as axioms and theorem As a search problem: operators, initial states (CNF), the goal test Dealing with equality (demodulation) Heuristic strategies: Unit preference, set of support, input resolution, subsumption Overview of some other topics Higher order proving, interactive, etc. Understanding Why deriving the empty clause means a contradiction Why we negate the theorem statement Why proof by contradiction is valid Know that resolution has been applied to mathematics Powered by DeSiaMore

Resolution Theorem Proving Abilities: Prove a theorem using the resolution method Remember to negate theorem statement Follow proof all the way Draw the proof tree Or organise the resolution steps in a way Which makes me think you know what you’re doing Deduce something from a set of axioms Not necessarily related to proving something Powered by DeSiaMore

Non-monotonic reasoning Classical logic is monotonic in the following sense: whenever a sentence A is a logical consequence of a set of sentences T, then A is also a consequence of an arbitrary superset of T. Non-monotonic reasoning: Additional information may invalidate conclusions. Non-monotonic reasoning is closer to (human) common-sense reasoning. Most rules in common-sense reasoning only hold with exceptions (i.e. university_professors_teach) Important approaches to formalise non-monotonic reasoning: Default-Logics: Non-classical inference rules are use to represent defaults The modal approach: Modal operators are used to explicitly declare if something is believed in or is consistent. Circumscription: Validity can be restricted to specific models. Conditional approaches: A conditional junctor is used to represent defaults in a logical language. Powered by DeSiaMore

Additional Information Powered by DeSiaMore

Inference Process Inference in formal logic is the process of generating new wffs from existing wffs through the application of rules of inference. Powered by DeSiaMore

Inference Process Conclusion: Many English sentences are ambiguous. There is often a choice of ways of representing the knowledge. Even in very simple situations a set of sentences is unlikely to contain all the information necessary to reason about the topic at hand. Powered by DeSiaMore

Inference Process Logical Inferences Modus ponens and modus tolens provide the foundation for making references. Modus ponens: ((p ® q) Ù p) ® q If someone is snorkeling then he is wet "x snorkeling(X) ® wet(X) If we are given that alex is snorkeling snorkeling (alex) we can infer wet(alex) Powered by DeSiaMore

Inference Process Logical Inferences Modus tolens: ((p ® q) Ù q) ®  p If someone is snorkeling then he is wet "x snorkeling(X) ® wet(X) If we are given that alex is not wet  wet(alex) we can infer  snorkeling(alex) Powered by DeSiaMore

Inference Process There are three reasoning methods that can be applied to a set of premises. Deduction Abduction Induction Powered by DeSiaMore

"x, "y, "z larger(x, y) Ù larger(y, z) ® larger(x, z) Inference Process Deduction is reasoning from known (premises) to unknown (logical conclusions). "x, "y, "z larger(x, y) Ù larger(y, z) ® larger(x, z) If our list of axioms contain the axioms larger(house, car) larger(car, cat) Through deductive reasoning the wff larger(house, cat) Can be derived and added to our list of axioms Powered by DeSiaMore

Inference Process In Abduction we begin with a conclusion and procede to derive conditions that would make the conclusion valid. In other words we try to find an explanation for the conclusion It does not guarantee that a true conclusion results. Therefore it s called unsound rule of inference. If given A ® B and B is true Abduction allows us to say A is possibly true. Reasoning under uncertainty. Powered by DeSiaMore

Inference Process Induction Inductive reasoning forms the basis of scientific discovery. If given p(a) is true p(b) is true …….. Then we conclude "x, p(x) is true If we observe alex over a period of time and note that whenever he is wet, it turns out that he has gone snorkeling. We might induce that "x, wet(x) ® snorkeling(x) Like abduction, induction is also an unsound inference method. Powered by DeSiaMore

Inference Process Monotonic vs non-monotonic reasoning Deductive reasoning is a monotonic reasoning that produce as arguments that preserve truth. Axioms are not allowed to change, since once a fact is known to be true, it is always true and can never be modified or retracted. Most real life problems are non-monotonic quarter(fourth) leading(bucks) "Team [leading(Team) Ù quarter(fourth)] ® strategy(Team, conservative) We can deduce strategy(bucks, conservative) What if the state changes to leading(dolphins) Powered by DeSiaMore

Inference Process RESOLUTION attempts to show that the negation of the statement produces a contradiction with the known statements. winter V summer ~winter V cold  deduce  summer V cold In the above example if it is winter the first statement is true if not the second statement is true. From these two we can deduce the third statement to be true Powered by DeSiaMore

Inference Process Conjuctive normal form(Davis, 1960) The steps to convert to conjuctive normal form:   1. Eliminate ® by using the fact that a ® b is equivalent to ~a V b 2. Reduce the scope of ~ ~(A V B) = ~A Ù ~B ~(A Ù B) = ~A V ~B DeMorgan's law ~"x P(x) = $x ~P(x) ~$x P(x) = "x ~P(x) Powered by DeSiaMore

Inference Process 3. Standardize variables so that each quantifier binds a unique variable. "x P(x) V "x Q(x) would be converted to "x P(x) V "y Q(y) 4. Move all quantifiers to the left of the formula without changing their relative order. "x "y P(x) V Q(y)   Powered by DeSiaMore

Inference Process 5. Eliminate existential quantifiers. A formula that contains an existentially quantified variable asserts that there is a value that can be substituted for the variable that makes the formula true.   $y President(y) can be transformed into President(S1) Powered by DeSiaMore

Inference Process 5. If existential quantifiers occur within the scope of a universal quantifier then the value that satisfies the predicate may depend on the values of the universally quantified variables.   "x $y fatherof(y, x) can be transformed into "x fatherof(S2(x), x) These generated functions are called Skolem functions. Powered by DeSiaMore

Inference Process 6. Drop the prefix.   7. Convert the matrix into conjunction of disjuncts. 8. Call each conjunct a separate clause. Powered by DeSiaMore

Inference Process The Unification Algorithm:   The object of the unification procedure is to discover at least one substitution that causes two literals to match. Powered by DeSiaMore

Inference Process Example: 1. Marcus was a man. man(marcus) 2. Marcus was a Pompeian. pompeian(marcus)  3. All Pompeians were Romans. "x pompeian(X) ® roman(X)  4. Caesar is a ruler. ruler(caesar) Powered by DeSiaMore

Inference Process 5. All Romans were either loyal to Caesar or hated him. "x roman(X) ® loyalto(X, casear) v hate(X, casear)  6. Everyone is loyal to someone. "X $ Y loyalto(X, Y)  7. People only try to assassinate rulers they are not loyal to. "X "Y person(X) Ù ruler(Y) Ù tryassassinate(X,Y) ® ~loyalto(X, Y)  8. Marcus tried to assassinate Caesar. tryassassinate(marcus, caesar) Powered by DeSiaMore

Inference Process Proof by resolution:  Given the axioms in clause form: 1. man(Marcus) 2. Pompeian(Marcus) 3. ~Pompeian(x1) V Roman(x1) 4. ruler(Caesar) 5. ~Roman(x2) V loyalto(x2, Caesar) V hate(x2, Caesar) 6. loyalto(x3, f1(x3)) 7. ~person(x4) V ~ruler(y1) V ~tryassassinate(x4, y1) V ~loyalto(x4, y1) 8. tryassassinate(Marcus, Caesar) Powered by DeSiaMore

Inference Process Prove: hate(Marcus, Caesar) Powered by DeSiaMore

Inference Process Prove: loyalto(Marcus, Caesar) Powered by DeSiaMore

Inference Process Prove: loyalto(Marcus, Caesar) - Continue Suppose our knowledge base contained the two additional statements 9. persecute(x, y) ® hate(y, x) ~persecute(x5, y2) V hate(y2, x5) 10. hate(x, y) ® persecute(y, x) ~hate(x6, y3) V persecute(y3, x6) To detect that there is no contradiction we must discover that the only resolvents that can be generated have been generated before. Powered by DeSiaMore

Solution from Question 5 Powered by DeSiaMore

1. Show how to use backward chaining, forward chaining for the following example and construct an Inference Tree Here is an example involving an investment decision: whether to invest in IBM stock. The following varibles are used: A= Have $10,000, B= Younger than 30, C = Education at college level, D= Annual income of at least $40,000, E= Invest in securities, F= Invest in growth stocks, G= Invest in IBM stock Each of these variables can be answered as true or false. The facts: We assume that an investor has $10,000( A is true) and that she is 25 years old ( B is true). She would like advice on investing in IBM stock ( Yes or no for the goal). The rules: Our knowledge base contains five rules: R1: If A and C, Then E. R2: If D and C, Then F. R3: If B and E, Then F. R4: If B Then C R5: If F, Then G Our goal is to determine whether to invest in IBM Stock. Powered by DeSiaMore

Solution: Backward chaining Start: We start by looking for a rule that includes the goal(G) in its conclusion ( THEN part). Because, R5 is the only rule that qualifies, we start with it. Step1: Try to accept or reject G. The ES goes to the assertion base to see whether G is there. Since we have in the assertion base : A is true, B is true, ES proceeds to step 2 Step 2: R5 traces G to F. F is a premise of R5 is the conclusion of R2 and R3. There to check whether F is true, we need to check either of these two rules. Step 3: We try R2 first; if both D and C are true, then F is true. Since D is not a conclusion of any rule, ES tries to find out the whether D is true by asking a question to the investor. Step 4: ES does a backtracking and goes to R3: test B and E. We know that B is true because it is a given fact. To prove E, we go to R1, where E is the conclusion. Step 5: Examine R1. It is necessary to determine whether A and C are true. Step 6: A is true because it is a given fact. To test C, it is necessary to test R4. Step 7: R4 tells us that C is true. Therefore C becomes a fact . Now E is true, which validates F which validates the goal. Powered by DeSiaMore

Solution: Backward Chaining and R2 B C C&D R5 R4 F G or B and B&E R3 A&C E A and R1 B C R4 Powered by DeSiaMore

Backward Chaining: Start with MWANZA Forward Chaining: Start with DSM Example 2: A person wants to fly from DSM to MWANZA and there are no direct flights between the two cities. Therefore you try to find a chain of connecting flights starting from DSM to MWANZA. Illustrate with backward and forward chaining. Backward Chaining: Start with MWANZA Forward Chaining: Start with DSM Powered by DeSiaMore