Download Representing Knowledge

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
Transcript
363CS – Artificial Intelligence
Lecture 7: 17/5/1435
knowledge Representation
Lecturer/ Kawther Abas
[email protected]
Introduction



Real knowledge representation and reasoning systems
come in several major varieties.
These differ in their intended use, expressivity,
features,…
Some major families are
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
Logic programming languages
Theorem provers
Rule-based or production systems
Semantic networks
Frame-based representation languages
Databases (deductive, relational, object-oriented, etc.)
Constraint reasoning systems
Description logics
Bayesian networks
Evidential reasoning
What is Knowledge?
data – primitive verifiable facts, of any
representation. Data reflects current world,often
voluminous frequently changing.
information – interpreted data
 knowledge – relation among sets of data
(information), that is very often used for further
information deduction. Knowledge is (unlike data)
general. Knowledge contains information about
behaviour of abstract models of the world.
Data, Information, Knowledge ?
Non-algorithmic
(heuristic)
Nonprogrammable
WISDOM
KNOWLEDGE
INFORMATION
Algorithmic
DATA
programmable
4
Knowledge Representation
Techniques
Rules
Semantic
Networks
Object-Attribute
Value
TECHNIQUES
Logic
Frames
5
Object-Attribute-Value (OAV)
Using fact : “
Used in MYCIN
•Eg: The ball’s color is red (assign red to the ball’s color)
The object can be physical (eg: car, books) or abstract
(eg: love, hobby).
•The value can be numerical, string or Boolean! It could
be either single or multi valued from different attributes
and objects.
6
OAV Triplets Diagram (i)
Fact :=: “The chair’s color is red and priced at $
35.00 ”
RED
Color
CHAIR
Priced
Object
Attribute
$ 35.00
Value
7
OAV Triplets Diagram (ii)
Fact :=: “TIN 313 is a compulsory subject for MSc Int Sys., code
for Artificial Intelligence, and taught by Mr Yousef Salahat”
Compulsory
subject
MSc Int. Sys
TIN 313
Code
Taught
Mr Yousef
Salahat
Artificial Intelligence
8
Rules Based
IF condition THEN action statements.
(premise
(goal
antecedent)
consequent)
•Example  IF “Temperature is hot” THEN “turn on
the air-conditioning system”
9
Rules Based System (I)
Rule 1:IF the ball’s color is red THEN I like the ball.
Rule 2:IF I like the ball THEN I will buy the ball.
Knowledge Base
3
IF ball’s color = red THEN like = ball
IF like = ball THEN will buy the ball
Question:
Ball’s color?
Working Memory
1
Answer: Red
Ball’s color = red
2
Like = ball
5
Will buy = ball
4
10
Rules Based System (II)
•Rule 1:
IF
x has a sore throat
AND suspect bacterial infection
THEN x has strep throat
•Rule 2:
IF
x temperature is > 37 c
THEN x has a fever
•Rule 3:
IF
x has been sick > a month
AND x has a fever
THEN suspect bacterial infection
•Patient’s
temperature =
38 c 38 ‫حرارة المريض‬
•Patient has been
sick > 2 months
‫المريض تعبان من شهرين‬
•Patient has a sore
throat
‫المريض لديه التهاب حلق‬
•Conclusion ?
Patient has
Strep throat
‫المريض لديه بكتيريا في الحلق‬
11
The Example of Semantic
Networks (Bird)
FACT : Parrot is a bird. Typically bird has wings and travel by
flying. Bird category falls under animal kingdom. All animal
requires air to breathe. Ostrich is a bird but travels by walk.
Wings
has
is-a
Parrot
is-a
Bird
Air
Animal
Breathe
travel
Fly
Walk
“exceptional
handling”
Ostrich
travel
12
Frames Structure
Frame Name: BIRD
Frame Name: OSTRICH
Properties:
Color = unknown
Wings = 2
Flies = True
Class Name: BIRD
Properties:
Color = brown/dark
Wings = 2
Flies = False
13
‫ المنطق الرياضي‬Logic
•The oldest representation existed
•Implemented using PROLOG, LISP programming
language.
14
Logical Operators
General
Name
Formal
Name
Not
Negation
And
Conjunction
Or
Disjunction
If…
Then/Implies
Conditional
If and only if
Biconditional
Symbols





15
Facts
•Artificial intelligence is a computer system
•Cat is an animal
Or combine
•Ahmed mother is married to Khalid father = True
•Cat is human = false
16
‫القواعد‬Rules
•Easy come easy go
•every way has an answer
or
If
• animal give milk it is a mammal
17
Predicate Calculus Logic
(FOPL)
operator (variables_1, variables_2,…)
EXAMPLES:
COMPUTER_COURSE(ARTIFICIAL_INTELLEGIENCE)
ANIMAL(CAT)
18
Mathmatical Logic
Meaning
Symbol
For All

Exist

NOT

And

OR
v
Then

Greater than
gt
Less than
lt
Greater than or equal
ge
Less than or equal
le
equal
=
19
Predicate Calculus Logic
(FOPL)
•Example: “She likes chocolate”  likes (she,
chocolate).
•Universal quantifier (X)  to show all object is true
[Eg: All students  (X (student (X))]
• Existential quantifier (X)  to show existence /
partial object is true [ Eg: Some people ( X (people
(X))]
20
The Example of FOPL
Normal: “If it doesn’t rain today, Ahmad will go to the
beach.
FOPL: rain( today) go(Ahmad, beach)
Normal: “All volleyball players are tall”
FOPL: X (volleyball_player (X)  tall (X))
Normal: Some people like durian.
FOPL: X (person(X)  likes(X, durian))
Normal: Nobody likes wars
FOPL:  X likes (X, wars)
21
Implementing Propositional Logic
“IF the battery is dead THEN the
car won’t start”
•P = battery is dead & Q = car
won’t start
•Battery is dead = T, car won’t
start = T
•“Battery not dead” = F, “car will
start” = F
P
Q
PQ
T
T
F
F
T
F
T
F
T
F
T
T
•Equivalence to P  Q
22
Example:
Mammals
Subset-of
legs
HasMother
2
Person
Subset of
Female
Person
Subset-of
Male
Person
Member of
Member of
Sister of
Mariam
Ahmad
legs
1
Example
Sister_of(Mariam,Ahmed)

Legs(Ahmed)=1 
Member_of(Mariam,Female_Person) 
Ahmed frame:
Ahmed :
Member of : Male Person
Legs: 1
Has Sister : Mariam
:‫حالة استثنائية‬
‫أحمد له رجال واحدة‬
‫بينما لكل البشر رجالن‬
Person frame:
Person:
Subset of : Mammal
Legs: 2
Has Mother : Female Person
24
Resolution
Theorem. Resolution is sound. Thai is, all
derived formulas are entailed by the given
ones
 Theorem: Resolution is refutationally
complete.
 That is, if a clause set is unsatisfiable, then
Resolution will derive the empty clause
eventually.


If a clause set is unsatisfiable and closed under
the application of resolution inference rule then
it contains the empty clause.
35