Logic Meaning Logical Reasoning Neil Heffernan Slides from

  • Slides: 38
Download presentation
Logic- Meaning & Logical Reasoning Neil Heffernan (Slides from Andrew Moore at CMU) See

Logic- Meaning & Logical Reasoning Neil Heffernan (Slides from Andrew Moore at CMU) See Chapter 6 of Russell and Norvig

Goal: Make Logical Decesions • Adjancent squares (not diagonal) to wumps are stenchy •

Goal: Make Logical Decesions • Adjancent squares (not diagonal) to wumps are stenchy • Next to pit are breezes • Agents don’t know where they are- they will percive a bump if they try to walk into a wall. • Shoot wumpus with one arrow in straight line • Die if move into room with wumpus • Goal- get in and get out with gold in as few as moves as possible.

Truth Tables P Q ? True True False False

Truth Tables P Q ? True True False False

Truth Tables P Q ? True False False True

Truth Tables P Q ? True False False True

Truth Tables P Q ? True False True False

Truth Tables P Q ? True False True False

Truth Tables P Q P => Q True ? True False ? False True

Truth Tables P Q P => Q True ? True False ? False True ? True False If P is true that I am claim that Q is true, otherwise I am making no claim

Truth Tables P Q P <=> Q True ? True False ? False True

Truth Tables P Q P <=> Q True ? True False ? False True ? False ? True False

Valid Sentences (Tautologies) • A sentence is valid if it is true in all

Valid Sentences (Tautologies) • A sentence is valid if it is true in all possible worlds • P or not P • true • P v Q is not valid for it is only true is the worlds where wither P or Q is true.

Satisfiable • A sentence is satisfiable only if there is some interpretion that makes

Satisfiable • A sentence is satisfiable only if there is some interpretion that makes it true. • P • True • False is not satisfiable • P and not P is not satisifaible

P T T F F Q T T F F R T F T

P T T F F Q T T F F R T F T F

P v Q (Q R) P T T F F Q T T F

P v Q (Q R) P T T F F Q T T F F R T F T F Pv. Q T T T F F Q R T F F T P v Q (Q R) T F F T T

Draw a venn Diagram representing satisfiable sentences, valid sentences and unstatisfiable sentence.

Draw a venn Diagram representing satisfiable sentences, valid sentences and unstatisfiable sentence.

Answer • Your knowledge base has many sentences about that relates P, Q, R,

Answer • Your knowledge base has many sentences about that relates P, Q, R, S and T like – P v Q (S v T) – ~P v S – etc • You want to know if some arbiraty statement like (R Q) v T • You contruct and implication statement like – (Knowledgebase and’ed togheter) => ((R Q) v T) – Premise => conclusion

…. • (an inference proceudre is complete if you can find a proof for

…. • (an inference proceudre is complete if you can find a proof for any sentence entitled in the knowledge base) • This truth table method of inference is Complete- because it is always possible to enemeurate out all of the 2^n rows for any proof invovling n propositional symbols

How do you show that these inference rules are sound (that they don’t cause

How do you show that these inference rules are sound (that they don’t cause you to entail things that are not in your knoweldge base)

Prove that the four rules are sound

Prove that the four rules are sound

Our agent needs to be able to act • Can we ask the knowledge

Our agent needs to be able to act • Can we ask the knowledge base what action we should take?

No • But we can encode things not to do like • “Don’t go

No • But we can encode things not to do like • “Don’t go forward if the wumpus is in front of you” • A(1, 1) ^ East(A) ^ W(2, 1) => ~Forward • How many rules do we need for this?

Practice • Is this valid? Prove it or show counter example – P^(Q V

Practice • Is this valid? Prove it or show counter example – P^(Q V R) (P ^ Q) v (P ^ R)