Download presentation
Presentation is loading. Please wait.
1
Introduction to Knowledge-bases
Knowledge-base Agent Representation, Reasoning and Logic Propositional Logic Syntax & Semantics Inferencing Example: Wumpus World A Propositional logic Knowledge-based Agent for the Wupus World CPSC 533 AI - Knowledge-bases
2
Knowledge-base Agent Sentences Knowledge Representation Language
Background Knowledge KB tell ask/result agent percept Describing a KB... What it knows Knowledge level Logical level How it knows Implementation level Knowledge implementation CPSC 533 AI - Knowledge-bases
3
Knowledge-base Agent Sentences Knowledge Representation Language
Background Knowledge KB sentences inference engine tell ask/result agent percept Describing a KB... What it knows Knowledge level Logical level How it knows Implementation level Knowledge implementation CPSC 533 AI - Knowledge-bases
4
Representation, Reasoning & Logic
Knowledge Representation Languages Express knowledge in a computer-tractable manner. Are described in terms of: Syntax: Configurations to represent sentences. Semantics: Determines sentences meaning. Logic: Language with well-defined syntax and semantics. Inferencing inferencing a agent x sentences x+a sentences world y facts y+d facts CPSC 533 AI - Knowledge-bases
5
Representation, Reasoning & Logic
Inferencing (cont) Process where true sentences are generated, based on existing ones. Characteristics: Process: Truth-preserving / Sound. Sentences: Entailed. sentences entailed sentence Proof Completeness For an Inference Process to be “sound”, it has to comply with the inferencing semantical rules of a language (a.k.a. proof theory) CPSC 533 AI - Knowledge-bases
6
Representation, Reasoning & Logic
Semantics Sentences do not have a meaning: they need to be interpreted. “The sky is blue” vs. “The bird is in the cage”. Characteristics of sentences: Valid: True under all interpretations. Satisfiable: True under some interpretations. Un-satisfiable: False in all worlds. Logics CPSC 533 AI - Knowledge-bases
7
Propositional Logic Syntax Constants: True, False Symbols: P, Q, ...
() Connectives: BNF sentence à atomic_sentence | complex_sentence atomic_sentence à TRUE | FALSE | P | Q | ... complex_sentence à ( sentence ) | sentence connective sentence | Øsentence connective à Ù | Ú | Þ | Û CPSC 533 AI - Knowledge-bases
8
“A sentence has a meaning derived from its parts.”
Propositional Logic Semantics Constants: True = True, False = False Symbols: Not valid, but satisfiable. “A sentence has a meaning derived from its parts.” Truth tables CPSC 533 AI - Knowledge-bases
9
Propositional Logic Inference Rules a entails b a Modus-Ponens b
And-Elimination And-Introduction Or-Introduction Double-Negation Elimination Unit Resolution Resolution a b a Þ b, a b a1 Ù a2 Ù ... Ù an ai a1 , a2 , ... , an a1 Ù a2 Ù ... Ù an ai a1 Ú a2 Ú ... Ú an ØØa a a Ú b, Øb a Ø a Þ b, b Þ g Ø a Þ g CPSC 533 AI - Knowledge-bases
10
Propositional Logic (example)
Wumpus World 1 2 3 4 òòò Stench Wumpus » Breeze Pit Gold Gold Hunter D start CPSC 533 AI - Knowledge-bases
11
Propositional Logic (example)
Wumpus World 1 2 3 4 1 2 3 4 òòò òòò òòò OK D OK p - Pit w - Wumpus CPSC 533 AI - Knowledge-bases
12
Propositional Logic (example)
Wumpus World 1 2 3 4 1 2 3 4 òòò òòò òòò p? OK p? p - Pit w - Wumpus CPSC 533 AI - Knowledge-bases
13
Propositional Logic (example)
Wumpus World 1 2 3 4 1 2 3 4 òòò òòò òòò p? OK p? p - Pit w - Wumpus CPSC 533 AI - Knowledge-bases
14
Propositional Logic (example)
Wumpus World 1 2 3 4 1 2 3 4 òòò òòò w! òòò OK D p! p - Pit w - Wumpus CPSC 533 AI - Knowledge-bases
15
Propositional Logic (example)
Wumpus World 1 2 3 4 1 2 3 4 òòò òòò w! OK òòò OK D p! p - Pit w - Wumpus CPSC 533 AI - Knowledge-bases
16
Propositional Logic (example)
Wumpus World 1 2 3 4 1 2 3 4 òòò p? òòò w! p? òòò OK D p! p - Pit w - Wumpus CPSC 533 AI - Knowledge-bases
17
Propositional Logic (example)
A Propositional logic KB Agent for the Wumpus World 1 2 3 4 òòò ØS1,1 ØS2,1 S1,2 ØB1,1 B2,1 ØB1,2 R1 : ØS1,1 Þ ØW1,1 Ù ØW1,2 Ù ØW2,1 R2 : ØS2,1 Þ ØW1,1 Ù ØW2,1 Ù ØW2,2 Ù ØW3,1 R3 : ØS1,2 Þ ØW1,1 Ù ØW1,2 Ù ØW2,2 Ù ØW1,3 R4 : S1,2 Þ W1,1 Ú W1,2 Ú W2,2 Ú W1,3 òòò 1,3 òòò 1,2 1,1 2,1 3,1 CPSC 533 AI - Knowledge-bases
18
Propositional Logic (example)
A Propositional logic KB Agent for the Wumpus World 1) Modus Ponens on ØS1,1 and R1 ØW1,1 Ù ØW1,2 Ù ØW2,1 2) And-Elimination ØW1, ØW1, ØW2,1 3) Modus Ponens on ØS2,1 and R2 ØW1,1 Ù ØW2,1 Ù ØW2,2 Ù ØW3,1 4) And-Elimination ØW1, ØW2, ØW2, ØW3,1 5) Modus Ponens on S1,2 and R4 W1,1 Ú W1,2 Ú W2,2 Ú W1,3 6) Unit Resolution W1,2 Ú W2,2 Ú W1,3 7) Unit Resolution W2,2 Ú W1,3 8) Unit Resolution W1,3 ØS1,1 ØS2,1 S1,2 ØB1,1 B2,1 ØB1,2 R1 : ØS1,1 Þ ØW1,1 Ù ØW1,2 Ù ØW2,1 R2 : ØS2,1 Þ ØW1,1 Ù ØW2,1 Ù ØW2,2 Ù ØW3,1 R3 : ØS1,2 Þ ØW1,1 Ù ØW1,2 Ù ØW2,2 Ù ØW1,3 R4 : S1,2 Þ W1,1 Ú W1,2 Ú W2,2 Ú W1,3 Goal: W1,3 CPSC 533 AI - Knowledge-bases
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.