美文网首页
KBAI 笔记 12 Logic

KBAI 笔记 12 Logic

作者: 我的名字叫清阳 | 来源:发表于2019-01-01 08:36 被阅读33次

Preview

Logic
  • Logic is a language allows to make association of the world in a precise way.
  • it form the basis of planning

Why do we need formal logic?

Logic

Knowledge base: sentence in the language of logic; complete and correct
Rules of Inference engine:

Inferences About Birds

Put the sentence classifying birds in to language of logic

Exercise: Inferences About Foos

The sentences are language of logic

Predicates

":" means indicates.
If Feathers(animal): Then Bird(animal) reads if animal has feathers, then animal is bird.

Conjunctions and Disjunctions

And Or Not

Implies

Implies

Notation Equivalency

Exercise: Practicing Formal Logic

Truth Tables

Exercise: Truth Tables I

Exercise: Truth Tables II (more complicated sentence)

In theory, we can calculate True or False values for very complicated sentences.

Exercise: Commutative Property


A & B is the same as B & A

Exercise: Distributive Property

  • A &(B or C) is equivalent to (A and B) or (A and C)
    Exercise: Associative Property

Exercise: Associative Property

  • The associate property applies when there is only conjunction or disjunctions.

Exercise: De Morgan's Law

Truth of Implications


This is hard to understand: need to go back to the examples
But remember A=> B is actually !A | B.

Implication Elimination

Rules of Inference

  • The rules here can be used for reasoning.

Prove Harry is a bird

Although the rules exist for a long times, it's hard to use these rules in AI agent because the computation is not feasible.

Universal Quantifiers and Existential Quantifier

Universal Quantifier Existential Quantifier
  • Propositional logic (zero-order logic): no variables.
  • Existential and Universal Quantifier can be used with variables.
  • Universal Quantifier mean given all values for the variable
  • Existential Quantifier means at least one value

A Simple Proof

resolution theorem proving
  1. convert every sentence into a conjunctive normal form.
not finished for this part. did not understand

exercise

Proof I Proof II Proof III Proof IV Proof V Proof VI
  • A efficient way to proof sentences

Wrap Up

The Cognitive Connection

  • Formal and precise way to reason
  • Human uses logic sometimes.. but its not a fundamental method.
  • Human uses induction and abduction more for reasoning. logic is deductive.

相关文章

网友评论

      本文标题:KBAI 笔记 12 Logic

      本文链接:https://www.haomeiwen.com/subject/rfcuwttx.html