2 Logic and Reasoning(逻辑及其推理)

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

Such knowledge can only be used in one way -- by executing it
Declarative(描述性的,说明性的), e.g.:
constraints It can be used to perform many different sorts of inferences
model of KB is also a model of Alternatively, KB ╞ iff
KB is valid (永真的)
{KB,} is unsatisfiable (不可满足的)
14
Model of a A^B C
A 0 0 B 0 0 C 0 0 D 0 1 A^B C 1 1 A^B 0 0
representing other aspects of W
5
Connection World-Representation
涵蕴 Sentences Conceptualization World W
hold hold represent
Entail

Sentences
represent
Facts about W
Facts about W
6
1 Battery-OK Bulbs-OK Headlights-Work 2 Battery-OK Starter-OK Empty-Gas-Tank Engine-Starts 3 Engine-Starts Flat-Tire Car-OK 4 Headlights-Work 5 Battery-OK 6 Starter-OK 7 Empty-Gas-Tank 8 Car-OK
4
Logic
Logic is a declarative language to:
Assert sentences representing facts that hold in a
world W (these sentences are given the value true)
Deduce the true/false values to sentences
1
1
0
1
1
1
1
1
12
Satisfiability of a KB (可满足性)
A KB is satisfiable iff it admits(接纳) at least one model; otherwise it is unsatisfiable
KB1 = {P, QR} is satisfiable KB2 = {PP} is satisfiable KB3 = {P, P} is unsatisfiable
Propositional logic: Semantics
Each model specifies true/false for each proposition symbol E.g. P1,2 false P2,2 true P3,1 false
With these symbols, 8 possible models, can be enumerated automatically. Rules for evaluating truth with respect to a model m:
1
1
1
1
1
15
Validity(永真性) and satisfiability(可满足性)
A sentence is valid if it is true in all models, e.g., True, A A, A A, (A (A B)) B
Validity is connected to inference via the Deduction Theorem: (演绎定理) KB ╞ α if and only if (KB α) is valid
3/home.htm www.cs.umbc.edu/~ypeng/F02671/lecturenotes/Ch06.ppt
补充读物:Nils J. Nilsson著, 郑扣根 庄越挺译 Artificial Intelligence A New Synthesis 机械工业 出版社 2000 (中南大学图书馆 TP18 NES)
S is true iff S1 S2 is true iff S1 S2 is true iff S1 S2 is true iff i.e., is false iff S1 S2 is true iff
S is false S1 is true and S2 is true S1is true or S2 is true S1 is false or S2 is true S1 is true and S2 is false S1S2 is true andS2S1 is true
Given a vocabulary A, B, C and D, how many
models for A^B C are there? for A^B B?
11
Model of a A^B C
A 0 0 B 0 0 C 0 0 D 0 1 A^B C 1 1 A^B 0 0
valid sentence or tautology
13
Logical Entailment (逻辑涵蕴)
KB : set of sentences (知识库)
: arbitrary sentence
KB entails – written KB ╞ – iff every
17
Inference Problem
Given: KB: a set of sentence : a sentence
Answer: KB ?
18
Inference Rule (推理规则)
An inference rule {, }
consists of 2 sentence patterns and called the conditions and one sentence pattern called the conclusion If and match two sentences of KB then the corresponding can be inferred according to the rule
9
Model
Assignment of a truth value – true or false – to
every atomic sentence Examples:
Let A, B, C, and D be the propositional symbols
m = {A=true, B=false, C=false, D=true} is a model m’ = {A=true, B=false, C=false} is not a model
A sentence is satisfiable if it is true in some model e.g., A B, C A sentence is unsatisfiable if it is true in no models e.g., AA
Satisfiability is connected to inference via the following: KB ╞ α if and only if (KB α) is unsatisfiable
7
Propositional logic: Syntax
Propositional logic is the simplest logic – illustrates basic ideas The proposition symbols P1, P2 etc are sentences
16
Inference
I: Set of inference rules
KB: Set of sentences
Inference is the process of applying
successive inference rules from I to KB, each rule adding its conclusion to KB (推理 就是不断将I中的规则应用到KB, 并将其结论加入到KB中的过程。)
If S is a sentence, S is a sentence (negation) If S1 and S2 are sentences, S1 S2 is a sentence (conjunction) If S1 and S2 are sentences, S1 S2 is a sentence (disjunction) If S1 and S2 are sentences, S1 S2 is a sentence (implication) If S and S are sentences, S S is a sentence (biconditional)8
19
Example: Modus Ponens (假言推理) { , }
{, }


Example: Battery-OK Bulbs-OK Headlights-Work Battery-OK Bulbs-OK Headlights-Work

20
Sound Inference Rules (deductive rules)
Lecture 2 Logic and reasoning 第2讲 逻辑及其推理
2.1 Propositional Logic 命题逻辑 2.2 Predicate Calculus 谓词逻辑
Acknowledgment
robotics.stanford.edu/~latombe/cs121/200
0
0 0 0
0
0 1 1
1
1 0 0
0
1 0 1
1
1 1 1
0
0 0 0
令KB= {A^B C, A^B} =C
有KB wenku.baidu.com
0
0 1 1
1
1 0 0
1
1 0 0
0
1 0 1
1
1 1 1
0
0 0 0
1
1 1 1
0
0 1 1
1
1 0 0
0
1 0 1
1
1 0 0
0
0 1 1
1
1
1
1
1
1
0
With n propositional symbols, one can define 2n
models
10
Model of a KB
Let KB be a set of sentences
A model m is a model of KB iff it is a
model of all sentences in KB, that is, all sentences in KB are true in m
╞ Flat-Tire
Conceptualization World W 1. 如果电池正常 且车灯正常, 那么车灯亮 诊断结论: 2. 如果电池正常,启动器正常且油箱不空,那么引 轮胎爆胎 擎可以发动 3. 如果引擎可以发动,且轮胎没有爆胎,那么汽车 正常 4. 车灯亮 5. 电池正常 6.启动器正常 7. 油箱不空 8. 汽车不正常
2
Propositional Logic 命题逻辑
Knowledge-Based Agent
sensors
?
agent actuators
environment
Knowledge base
3
Types of Knowledge
Procedural(过程性的), e.g.: functions
0
0 0 0
0
0 1 1
1
1 0 0
0
1 0 1
1
1 1 1
0
0 0 0
A^B C有 多少模型 {A^B C, A^B}有多少 模型
0
0 1 1
1
1 0 0
1
1 0 0
0
1 0 1
1
1 1 1
0
0 0 0
1
1 1 1
0
0 1 1
1
1 0 0
0
1 0 1
1
1 0 0
0
0 1 1
1
1
1
1
相关文档
最新文档