Logical Agents - University of Rochester

Logical Agents - University of Rochester

Proof methods Proof methods divide into (roughly) two kinds: Application of inference rules Legitimate (sound) generation of new sentences from old Proof = a sequence of inference rule applications Can use inference rules as operators in a standard search

algorithm Typically require transformation of sentences into a normal form Model checking truth table enumeration (always exponential in n) improved backtracking, e.g., Davis--Putnam-Logemann-Loveland

(DPLL) heuristic search in model space (sound but incomplete) e.g., min-conflicts-like hill-climbing algorithms Conversion to CNF B1,1 (P1,2 P2,1)

1. Eliminate , replacing with ( )( ). (B1,1 (P1,2 P2,1)) ((P1,2 P2,1) B1,1) 2. Eliminate , replacing with . (B1,1 P1,2 P2,1) ((P1,2 P2,1) B1,1)

3. Move inwards using de Morgan's rules and doublenegation: (B1,1 P1,2 P2,1) ((P1,2 P2,1) B1,1) 4. Apply distributivity law (V over ^) and flatten: (B1,1 P1,2 P2,1) (P1,2 B1,1) (P2,1 B1,1)

Resolution algorithm Proof by contradiction, i.e., show KB unsatisfiable Resolution example KB = (B1,1 (P1,2 P2,1)) B1,1 = P1,2

Forward and backward chaining Horn Form (restricted) KB = conjunction of Horn clauses Horn clause = proposition symbol; or (conjunction of symbols) symbol

E.g., C (B A) (C D B) Modus Ponens (for Horn Form): complete for Horn KBs 1, ,n, 1 n

Can be used with forward chaining or backward chaining. These algorithms are very natural and run in linear time Forward chaining Idea: fire any rule whose premises are satisfied in the

KB, add its conclusion to the KB, until query is found Forward chaining algorithm Forward chaining is sound and complete for

Horn KB Forward chaining example Forward chaining example

Forward chaining example Forward chaining example Forward chaining example

Forward chaining example Forward chaining example Forward chaining example

Proof of completeness FC derives every atomic sentence that is entailed by KB

FC reaches a fixed point where no new atomic sentences are derived Consider the final state as a model m, assigning

true/false to symbols Every clause in the original KB is true in m a1 ak b

Hence m is a model of KB If KB q, q is true in every model of KB, including m Backward chaining Idea: work backwards from the query q:

to prove q by BC, check if q is known already, or prove by BC all premises of some rule concluding q Avoid loops: check if new subgoal is already on the goal stack

Avoid repeated work: check if new subgoal has already been proved true, or has already failed Backward chaining example

Backward chaining example Backward chaining example Backward chaining example

Backward chaining example Backward chaining example Backward chaining example

Backward chaining example Backward chaining example Backward chaining example

Forward vs. backward chaining FC is data-driven, automatic, unconscious processing, e.g., object recognition, routine decisions May do lots of work that is irrelevant to the goal BC is goal-driven, appropriate for problem-solving,

e.g., Where are my keys? How do I get into a PhD program? Complexity of BC can be much less than linear in size of KB Efficient propositional inference

Two families of efficient algorithms for propositional inference: Complete backtracking search algorithms DPLL algorithm (Davis, Putnam, Logemann, Loveland) Incomplete local search algorithms WalkSAT algorithm

The DPLL algorithm Determine if an input propositional logic sentence (in CNF) is satisfiable. Improvements over truth table enumeration: Early termination

A clause is true if any literal is true. A sentence is false if any clause is false. Pure symbol heuristic Pure symbol: always appears with the same "sign" in all clauses. e.g., In the three clauses (A B), (B C), (C A), A and B are pure, C is

impure. Make a pure symbol literal true. Unit clause heuristic Unit clause: only one literal in the clause The only literal in a unit clause must be true.

The DPLL algorithm The WalkSAT algorithm Incomplete, local search algorithm Evaluation function: The min-conflict heuristic of

minimizing the number of unsatisfied clauses Balance between greediness and randomness The WalkSAT algorithm Hard satisfiability problems

Consider random 3-CNF sentences. e.g., (D B C) (B A C) (C B E) (E D B) (B E C) m = number of clauses n = number of symbols Hard problems seem to cluster near m/n = 4.3

(critical point) Hard satisfiability problems Hard satisfiability problems

Median runtime for 100 satisfiable random 3CNF sentences, n = 50 Summary Logical agents apply inference to a knowledge base to derive new information and make decisions Basic concepts of logic:

syntax: formal structure of sentences semantics: truth of sentences wrt models entailment: necessary truth of one sentence given another inference: deriving sentences from other sentences soundness: derivations produce only entailed sentences

completeness: derivations can produce all entailed sentences Resolution is complete for propositional logic Forward, backward chaining are linear-time, complete for Horn clauses Propositional logic lacks expressive power

Recently Viewed Presentations

  • What is Media - sd72.bc.ca

    What is Media - sd72.bc.ca

    Media includes every broadcasting and narrowcasting medium such as newspapers, magazines, TV, radio, billboards, direct mail, telephone, fax, and internet. Media is the plural of medium and can take a plural or singular verb, depending on the sense intended.
  • Key Account Management - global best practice

    Key Account Management - global best practice

    Profitable Growth and the Role of Key Client Management by Professor Malcolm McDonald Emeritus Professor Cranfield School of Management ... PMMS Consulting Group Development Cosset Client Defend Vigorously High Level of Service High Responsiveness Maximum economic and strategic leverage, i.e...
  • Differentiating Instruction - Galloway Township Public Schools

    Differentiating Instruction - Galloway Township Public Schools

    Arial Garamond Times New Roman Wingdings Kristen ITC Stream Slide 1 Differentiating Instruction guided by general principles of differentiation: Teachers can differentiate by: According to students' Table of Contents DI & Technology Overview Video Streaming WebQuests Analyzing Data - Spreadsheets...
  • CBP: Nephrology - Diseases of the kidneys!

    CBP: Nephrology - Diseases of the kidneys!

    IHD, SLED, CVVHDF Patients enrolled had ATN requiring dialysis and either sepsis or one additional nonrenal organ failure Excluded patients with chronic kidney disease CVVHDF dose was 20 cc/kg/hr in the less intensive group and 35 cc/kg/hr in the intensive...
  • Do You Want to Color Victor? Orientation &

    Do You Want to Color Victor? Orientation &

    Communication is the greatest barrier between siblings and between siblings and parents when an older sibling departs for college. It is also the greatest tool to support all relationships in transition (Powell-Lunder, 2013).
  •  mimoza.peco@financa.gov.al PEMPAL 01-03  2016 1  2  -  ,

    [email protected] PEMPAL 01-03 2016 1 2 - ,

    Nga ky produkt Ministria e Financave përdor modulet financial dhe purchasing, Oracle Discoverer, Oracle Application Server, Oracle Database Server Enterprise Edition, Oracle Real Application Cluster - One Node, Oracle Secure Backup.
  • water sports and activities Naval Safety Center Only

    water sports and activities Naval Safety Center Only

    Only Two mishap reports involved a shark attack. Of the 78 mishaps reported, ... A service member received stitches and tetanus shot when they slipped off of a platform and cut their arm on a boat propeller. ... in case...
  • Task-based Interaction with an Integrated Multilingual ...

    Task-based Interaction with an Integrated Multilingual ...

    with an Integrated Multilingual, Multimedia Information System: A Formative Evaluation Pengyi Zhang INFM700 Information Architecture, Jimmy Lin April 7, 2008 * Acknowledgement This is a collaborative work with Lynne Plettenberg, Judith Klavans, Doug Oard, and Dagobert Soergel.