Keywords
- reasoning 推理
- Deductive reasoning(for a basic logic) 演繹推理
- analogy 類比;比喻 /əˈnælədʒi/
- definition of terminology /ˌtɜːmɪˈnɒlədʒi/術語的定義
- proposition/ˌprɒpəˈzɪʃn/命題
- distinction/dɪˈstɪŋkʃn/n. 區別;差別
- arithmetic /əˈrɪθmətɪk/ 算術,算法
- anthropomorphize/,ænθrəpəʊ'mɔːfaɪz/vt. 賦與人性,人格化
- knowledge base(KB) 知識庫
- connectionism /kə'nekʃənizəm/ 聯結主義
- retrieval /rɪˈtriːvl/n. 檢索;恢復;取回;拯救
- inference: 推理
- entailment:蘊含
- syntax: /ˈsɪntæks/n. 語法;句法;
- semantic: /sɪˈmæntɪk/adj. 語義的;語義學的
- falsity: /ˈfɔːlsəti/n. 虛偽;錯誤;謊言;不真實
- notation /nəʊˈteɪʃn/n. 符號
- terminology:/ˌtɜːmɪˈnɒlədʒi/n. 術語,術語學;用辭
- theorem/ˈθɪərəm/n. [數] 定理;原理
- axiom: /ˈæksiəm/n. [數] 公理
- iff: 當且僅當
- K |= a是語義蘊含,K |- b是形式推演
What's all the Fuss about?
- Resources required to solve a problem
- Time(computational complexity)
- Memory
- Some problem are easy to solve
- 1+1=?
- This is good!
- Some problems are difficult to solve
- Playing chess, scheduling/timetabling...
- Is this bad?
- Some problems cannot be solved!
- Reasoning, planning,...
What is knowledge?
- taking the world to be one way and not another
- the propositions for the true or false encode what you know about the world.
What is representation?
- symbolic encoding of propositions believed by some agent 命題的符號編碼,由某些行為者相信
- symbols standing for things in the world
What is reasoning?
- Manipulation of symbols encoding propositions to produce representations of new propositions.對編碼命題的符號進行操作,以產生新命題的表示。
Why knowledge?
- taking an intentional stance
Why representation?
- intentional stance says nothing about what is / is not represented symbolically
Why reasoning?
- Want knowledge to affect action
- We don't want to do action A if sentence P is in KB,
- But rather do action A if world believed in satisfies P
- Difference:
- P may not be explicitly represented
- Need to apply what is known to particulars of given situation
- Usually need more than just DB-style retrieval of facts in the KB
Entailment
- Sentences P1, P2, ..., Pn entail sentence P iff the truth of P is implicit in the truth of P1, P2, ..., Pn
- Inference: the process of calculating entailments
- sound: get only entailment
- complete: get all entailment
- Sometimes want unsound / incomplete reasoning
- Logic: study of entailment relations
Using Logic
- No universal language / semantics
- No universal reasoning scheme
- Start with first-order predicate calculus(FOL)
Why do we need formal Knowledge Representation?
- Natural languages exhibit ambiguity
- ambiguity make it difficult to make any inferences
Syntax vs Semantics
- Syntax: Describe the legal sentences in a knowledge representation language.
- Semantics: Refers to the meaning of sentences. Semantics talks about truth and falsity.
Propositions
- Propositions are statements of fact.
- We shall use single letters to represent propositions
- P: Socrates is bald.
Formulae in Propositional Logic
Syntax
- BNF grammar
- Sentence ::= AtomicSentence || ComplexSentence
- AtomicSentence ::= True || False || P || Q || R || . .
- ComplexSentence ::= ( Sentence ) || Sentence Connective Sentence || ¬ Sentence
- Connective ::= ∧ || ∨ || → || ↔
Semantics
- The semantics of the connectives can be given by truth tables. It determines the semantics for complex formulae.
What is a logic?
- A logic consists of:
- A formal system for expressing knowledge about a domain consisting of
- Syntax: Sentences(well formed formulae)
- Semantics: Meaning
- A proof theory: rules of inference for deducing sentences from a knowledge base
Provability
- λ ⊢ ρ: we can construct a proof for ρ from λ using axioms and rules of inference
- If λ is empty (i.e., 0⊢ρ) and ρ is a single formula, then we say that ρ is a theorem of the logic
Entailment
- λ |= ρ: whenever the formula(s) λ are true, one of the formula(s) in ρ is true
- In the case where ρ is a single formula, we can determine whether λ |= ρ by constructing a truth table for λ and ρ. If, in any row of the truth table where all the formulae in λ are true, ρ is also true, then λ |= ρ.
- If λ is empty, we say that ρ is a tautology
Soundness and Completeness
- λ |= a是語義蘊含, λ |- b是形式推演
- An inference procedure (and hence a logic) is sound if and only if it preserves truth
- In other words ⊢ is sound iff whenever λ ⊢ ρ, then λ |= ρ
- Soundness 是說右側推演的知識都是被λ蘊含的(推出來的知識都是正確的)
- A logic is complete if and only if it is capable of proving all truths
- In other words, whenever λ |= ρ, then λ ⊢ ρ
- Completeness 是說,左側蘊含出來的知識都可以推演出來
- A logic is decidable if and only if we can write a mechanical procedure (computer program) which when asked λ ⊢ ρ it can eventually halt and answer “yes” or answer “no”
