当前位置:   article > 正文

高级人工智能(2)_literals (文字) are atomic propositions or their neg

literals (文字) are atomic propositions or their negations

Propositional logic (命题逻辑)

Knowledge base is a set of sentences in a formal language

Logic Agents

Logics are formal languages

Syntax defines the sentence structures in the language

Semantics defines the meanings of the sentences

We use the term model in place of possible world

if a sentence α \alpha α is true in model m:

m satisfied α \text{m satisfied} \alpha m satisfiedα

m is a model of α \text{m is a model of}\alpha m is a model ofα

m ∈ M ( α ) , where M ( α ) is the set of all the models of  α m\in M(\alpha),\text{where}M(\alpha)\text{is the set of all the models of }\alpha mM(α),whereM(α)is the set of all the models of α

Entailment

Knowledge base (KB) entails sentence α \alpha α if and only if α \alpha α is true in all worlds where KB is true ,denoted as:

K B ⊨ α KB \models \alpha KBα

α ⊨ β  iff  M ( α ) ⊆ M ( β ) \alpha \models \beta \text{ iff } M(\alpha) \subseteq M(\beta) αβ iff M(α)M(β)

Propoitional Logic

Proposition :a declearative sentence that is either true or flase

Atomic propositions are minimun propositions

Literals are atomic propositions or their negations( p  or  ¬ p p \text{ or } \neg{p} p or ¬p)

The following grammar in Backus-Naur form (BNF) for syntax:

AtomicSentence | ComplexSentence

AtomicSentence -> True|False|P|Q|R

ComplexSentence -> Sentence|Sentence,Sentence ⋀ \bigwedge Sentence…

∧ \wedge , ∨ \vee , ⇒ \Rightarrow , ⇔ \Leftrightarrow

α ≡ β  iff  α ⊨ β  and  β ⊨ α \alpha \equiv \beta \text{ iff } \alpha \models \beta \text{ and } \beta \models \alpha αβ iff αβ and βα

( α ⇔ β ) ≡ ( ( α ⇒ β ) ∧ ( β ⇒ α ) ) (\alpha \Leftrightarrow \beta) \equiv ((\alpha \Rightarrow \beta)\wedge (\beta \Rightarrow \alpha)) (αβ)((αβ)(βα))

α ⇒ β = ¬ α ∨ β \alpha \Rightarrow \beta = \neg \alpha \vee \beta αβ=¬αβ

K B ⊨ α  iff  ( K B ∧ ¬ α )   i s u n s a t i s f i a b l e KB \models \alpha \text{ iff } (KB \wedge \neg \alpha )~is unsatisfiable KBα iff (KB¬α) isunsatisfiable

Inference

Inference i + i_+ i+can derive α \alpha α from KB denoted as

K B ⊢ i α KB \vdash_i \alpha KBiα

Soundness:i is sound if :

( K B ⊢ i α ) ⇒ ( K B ⊨ α ) (KB\vdash_i \alpha) \Rightarrow (KB\models \alpha) (KBiα)(KBα)

Completeness:i is complete if :

( K B ⊨ α ) ⇒ ( K B ⊢ i α ) (KB\models \alpha) \Rightarrow (KB\vdash_i \alpha) (KBα)(KBiα)

For KB consisting of only propositional logic or first-order logic .There exits a sound and complete inference procedure

FOL is expressive enough to express many things in the real world

Resolution and CNF

Horn and Definite Clauses

Definite clause: a disjunction of literals where exactly one is positive

Horn clause : a disjunction of literals where at most one is positive

Horn clause are closed under resolution:

Resolving two Horn clauses yields a Horn clause

Deciding entailment with Horn clauses can be done in linear time!

Forward Chaining

Resolution for Horn clauses (Modus Ponens):

α 1 , . . . , α n   ,   ( α 1 ∧ . . . ∧ α n )   → β β \frac{\alpha_1,...,\alpha_n~,~(\alpha_1\wedge ... \wedge \alpha_n)~\rightarrow \beta}{\beta} βα1,...,αn , (α1...αn) β

Backward Chaining

Foward vs. Backward Chaining:

Both time complexities are linear to the size of KB

Forward chaining is data-driven

Backward chaining is goal-driven

In general , backward chaining is more appropriate for problem solving

Forward chaining may generate many conclusions irrelevant to the goal

In general , time complexity of backward chaining is much less than linear of the size of KB

Pro

Propositional logic is declarative,pieces of syntax correspond to facts

Propositional logic allows partial/disjunctive/negated information(unlike most data structures and databases)

Propositional logic is compositional

Meaning in Propositional logic is context-independent(unlike natural language , where meaning depends on context)

Con

Propositional logic has very limited expressive power

Con not say "pits cause breezes in adjacent squares"except by writing one sentence for each square

First-Order Logic

First-Order Logic

Syntax and sematics

Syntax of FOL

Contants :

Variables:

Functions:

Predicates:

Connectives:

Equality:

Quantifiers:

Inference

Instantiation
Propositionalization
Unification
Forward chaining
Backward chaining
Resolution

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/木道寻08/article/detail/786648
推荐阅读
相关标签
  

闽ICP备14008679号