Академический Документы
Профессиональный Документы
Культура Документы
November 2010
Lecture 10:
Knowledge Representation and Reasoning Part 1 ( )
Preview
Our last lectures were all focused on algorithms that allow you to develop smart software Smart = intelligence, e.g. Find optimal solutions according to given scenario Find the shortest path Suggest on step to proceed in adversrial game that has more chance to win etc. In this lecture, we move our focus from problemspecific agents to knowledge-based agents
241-320 Design Architecture & Engineering for Intelligent System
Preview (cont.)
Knowledge-based Agents
Can represent knowledge And reason with this knowledge, Can combine general knowledge with current percepts to infer hidden aspects of the current state Q: How is this different from the knowledge used by problem-specific agents? more general more flexible
241-320 Design Architecture & Engineering for Intelligent System
Knowledge base = set of sentences in a formal language Allows an agent to reason about the world, deduce hidden properties and determine appropriate actions. Example: KB = { Somchai comes to the party;
If Somsri comes to the party then Somying comes; If Somsri doesn't come then Somchai won't come to the party } Agent should be able to deduce that .... Somying comes to the party.
241-320 Design Architecture & Engineering for Intelligent System
Knowledge Representation is concerned with expressing knowledge explicitly in a computertractable way (for use by the agent in reasoning) Reasoning attempts to take this knowledge and draw inferences (e.g. answer queries, determine facts that follow
from the knowledge base, decide what to do, etc.)
Outline
Knowledge vs Data Knowledge Representation Schemes Logic-based Knowledge Representation
Propositions Propositional Logic
Syntax Semantics
Information Hierarchy
More refined and abstract
Data
The raw material of information
Information
Wisdom Knowledge Information Data Data organized and presented in a particular manner
Knowledge
Justified true belief Information that can be acted upon
Wisdom
Distilled and integrated knowledge Demonstrative of high-level understanding
Knowledge Representation and Reasoning - part 1
An Example
Data 98.6 F, 99.5 F, 100.3 F, 101 F, Information Hourly body temperature: 98.6 F, 99.5 F, 100.3 F, 101 F, Knowledge If you have a temperature above 100 F, you most likely have a fever Wisdom If you dont feel well, go see a doctor
241-320 Design Architecture & Engineering for Intelligent System
Consider an English sentence like: The boy saw a girl with a telescope - 2 possible meanings:
- . . - . .
Also: I heard about him at school (structural ambiguity) - What are 2 possible meanings??
241-320 Design Architecture & Engineering for Intelligent System
10
11
12
Outline
Knowledge vs Data Knowledge Representation Schemes Logic-based Knowledge Representation
Propositions Propositional Logic
Syntax Semantics
13
14
Outline
Knowledge vs Data Knowledge Representation Schemes Logic-based Knowledge Representation
Propositions Propositional Logic
Syntax Semantics
15
This logical-based approach represents knowledge in a declarative, static way (i.e. as the form of sentence) so that they can be used and determined later This is the basis of the programming language PROLOG (Programming in Logic)
16
What is a Logic?
A logic consists of 1. A formal system for expressing knowledge about a domain consisting of Syntax Set of legal sentences (also known as Propositions or ) Semantics Interpretation of legal sentences 2. A proof system for specifying how we can derive derive new sentences from our existing sentences In a knowledge base
17
Propositions ()
Propositions are entities (facts or non-facts) that can be true or false ( ) Propositions are expressed using ordinary declarative sentences
e.g. the sentence expresses the proposition () that . Is this proposition true? () 4 () These are called Single Proposition (), where only one subject and verb are in the sentence.
241-320 Design Architecture & Engineering for Intelligent System
18
Propositions () (cont.)
Other propositions (Complex proposition or ), where prepsotions are involved to join sentences:
() ()
1
()
4 ()
19
Outline
Knowledge vs Data Knowledge Representation Schemes Logic-based Knowledge Representation
Propositions Propositional Logic
Syntax Semantics
20
Propositional Logic ()
(T) (F)
Input
Premises ()
Output
Inferences
Logical Process
()
or Conclusions
() Facts ( ) ( ) Example of the propositions using a simple deductive process Statement A = The mail carrier comes on Monday through Friday. Statement B = Today is Sunday. Conclusion C = The mail carrier will not come today.
241-320 Design Architecture & Engineering for Intelligent System
21
Propositional Logic ()
(cont.)
All humans have 2 eyes Jane is a human Therefore Jane has 2 eyes All humans have 4 eyes Jane is a human Therefore Jane has 4 eyes Both are (logically) correct sentences
Which statements are true/false?
All humans have 2 eyes Jane has 2 eyes Therefore Jane is human No human has 4 eyes Jane has 2 eyes Therefore Jane is not human Both are (logically) incorrect sentences
Which statements are true/false?
22
Propositional Logic
Often use single letters or symbols to represent basic propositions in reasoning combine them into more complex sentences using operators for not, and, or, implies, iff Propositional connectives ():
23
24
Improving Readability
25
Semantics
The semantics of the connectives can be given by truth tables
One row for each possible assignment of True/False to propositional variables Note: Above P and Q can be any sentence, including complex sentences
241-320 Design Architecture & Engineering for Intelligent System
26
27
28
Outline
Knowledge vs Data Knowledge Representation Schemes Logic-based Knowledge Representation
Propositions Propositional Logic
Syntax Semantics
29
First-order Logic
First-order logic furnishes us with a much more expressive knowledge representation language than propositional logic We can directly talk about objects, their properties, relations between them, etc. Here, we will have a quick tour of first-order logic
30
31
32
33
Nested Quantifiers
The order of quantification is very important
34
Then we define:
35
A note to students
Dont worry much if you are about to getting confuse about new terms, symbols & semantic interpretation. We wont go deeper in details of first-order logic as it has been introduced as an example of an analysis representation technique. However, you should know why first-order logic is better than propositional logic.
36
Conclusion
Due to the ambiguity in natural languages there is a need to specify knowledge through the use of formal languages Not only will these formal languages give us a way to remove ambiguity but they will also help to provide methods for automating inference Propositional logic and first-order logic is a move in this direction for Knowledge representation and reasoning formalism This means we can draw new conclusions from the knowledge we have (i.e. we can reason & have enough to build a knowledge-based agent)
241-320 Design Architecture & Engineering for Intelligent System
37
38