Propositional Logic - PowerPoint PPT Presentation

1 / 51
About This Presentation
Title:

Propositional Logic

Description:

Construct the models of KB based on rules of world ... Constructing the KB. 38. 39. Properties of Model Checking ... it works for any KB and sentence to prove a ... – PowerPoint PPT presentation

Number of Views:28
Avg rating:3.0/5.0
Slides: 52
Provided by: Kathleen268
Category:

less

Transcript and Presenter's Notes

Title: Propositional Logic


1
Propositional Logic
  • Reading C. 7.4-7.8, C. 8

2
Logic Outline
  • Propositional Logic
  • Inference in Propositional Logic
  • First-order logic

3
Agents that reason logically
  • A logic is a
  • Formal language in which knowledge can be
    expressed
  • A means of carrying out reasoning in the
    language
  • A Knowledge base agent
  • Tell add facts to the KB
  • Ask query the KB

4
Towards General-Purpose AI
  • Problem-specific AI (e.g., Roomba)
  • Specific data structure
  • Need special implementation
  • Can be fast
  • General purpose AI (e.g., logic-based)
  • Flexible and expressive
  • Generic implementation possible
  • Can be slow

5
Language Examples
  • Programming languages
  • Formal, not ambiguous
  • Lacks expressivity (e.g., partial information)
  • Natural Language
  • Very expressive, but ambiguous
  • Flying planes can be dangerous.
  • The teacher gave the boys an apple.
  • Inference possible, but hard to automate
  • Good representation language
  • Both formal and can express partial information
  • Can accommodate inference

6
Components of a Formal Logic
  • Syntax symbols and rules for combining
    them What you can say
  • Semantics Specification of the way symbols (and
    sentences) relate to the world What it means
  • Inference Procedures Rules for deriving new
    sentences (and therefore, new semantics) from
    existing sentences Reasoning

7
(No Transcript)
8
(No Transcript)
9
(No Transcript)
10
(No Transcript)
11
(No Transcript)
12
Semantics
  • A possible world (also called a model) is an
    assignment of truth values to each propositional
    symbol
  • The semantics of a logic defines the truth of
    each sentence with respect to each possible world
  • A model of a sentence is an interpretation in
    which the sentence evaluates to True
  • E.g., TodayIsTuesday -gt ClassAI is true in model
    TodayIsTuesdayTrue, ClassAITrue
  • We say TodayIsTuesdayTrue, ClassAITrue is a
    model of the sentence

13
Exercise Semantics
  • What is the meaning of these two sentences?
  • If Shakespeare ate Crunchy-Wunchies for
    breakfast, then Sally will go to Harvard
  • If Shakespeare ate Cocoa-Puffs for breakfast,
    then Sally will go to Columbia

14
Examples
  • What are the models of the following sentences?
  • KB1 TodayIsTuesday -gt ClassAI
  • KB2 TodayIsTuesday -gt ClassAI, TodayIsTuesday

15
(No Transcript)
16
(No Transcript)
17
(No Transcript)
18
Proof by refutation
  • A complete inference procedure
  • A single inference rule, resolution
  • A conjunctive normal form for the logic

19
(No Transcript)
20
(No Transcript)
21
(No Transcript)
22
(No Transcript)
23
(No Transcript)
24
(No Transcript)
25
(No Transcript)
26
Example Wumpus World
  • Agent in 1,1 has no breeze
  • KB R2 ? R4 (B1,1lt-gt(P1,2 V P2,1))
    ?B1,1
  • Goal show P1,2

27
Conversion Example
28
(No Transcript)
29
Resolution of Example
30
Inference Properties
  • Inference method A is sound (or truth-preserving)
    if it only derives entailed sentences
  • Inference method A is complete if it can derive
    any sentence that is entailed
  • A proof is a record of the progress of a sound
    inference algorithm.

31
(No Transcript)
32
(No Transcript)
33
Other Types of Inference
  • Model Checking
  • Forward chaining with modus ponens
  • Backward chaining with modus ponens

34
Model Checking
  • Enumerate all possible worlds
  • Restrict to possible worlds in which the KB is
    true
  • Check whether the goal is true in those worlds or
    not

35
Wumpus Reasoning
  • Percepts nothing in 1,1 breeze in 2,1
  • Assume agent has moved to 2,1
  • Goal where are the pits?
  • Construct the models of KB based on rules of
    world
  • Use entailment to determine knowledge about pits

36
(No Transcript)
37
Constructing the KB
38
(No Transcript)
39
Properties of Model Checking
  • Sound because it directly implements entailment
  • Complete because it works for any KB and sentence
    to prove a and always terminates
  • Problem there can be way too many worlds to
    check
  • O(2n) when KB and a have n variables in total

40
Inference as Search
  • State current set of sentences
  • Operator sound inference rules to derive new
    entailed sentences from a set of sentences
  • Can be goal directed if there is a particular
    goal sentence we have in mind
  • Can also try to enumerate every entailed sentence

41
(No Transcript)
42
(No Transcript)
43
(No Transcript)
44
(No Transcript)
45
(No Transcript)
46
(No Transcript)
47
(No Transcript)
48
Example
49
Complexity
  • N propositions M rules
  • Every possible fact can be establisehd with at
    most N linear passes over the database
  • Complexity O(NM)
  • Forward chaining with Modus Ponens is complete
    for Horn logic

50
(No Transcript)
51
Example
Write a Comment
User Comments (0)
About PowerShow.com