高级人工智能(2)

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

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值