Chap II: Knowledge Representation - PowerPoint PPT Presentation

About This Presentation
Title:

Chap II: Knowledge Representation

Description:

Title: Representing Knowledge Author: wolverine Last modified by: MASH Created Date: 7/1/2004 3:44:30 PM Document presentation format: On-screen Show – PowerPoint PPT presentation

Number of Views:112
Avg rating:3.0/5.0
Slides: 32
Provided by: wolv151
Category:

less

Transcript and Presenter's Notes

Title: Chap II: Knowledge Representation


1
Chap II Knowledge Representation
  • ????? ??????? ???? ???? ??????? ???? ???? ??????.
  • ????? ????? ??????? ???????????? ????? ???
    ???????? ???? ???? ??? ????? ?????? ?????????.

2
Knowledge Representation
  • ??????? ?????? ??????? ?? ??? ?????? ???? ??
    ????? ????? ?????? ???? ???? ??? ???? ??????? ?
    ????? ????????? ? ?????? ??? ???????..
  • ?????? ?????? ??????? ???? ????? ????? ?? ???????
    ??? ???? ?????. ? ?? ??? ???? ?????? ??? ???????
    .. ? ??? ??? ???? ??? ????????!
  • ?? ?????? ??? ???????? ??????? ???? ????? ????
    ??? ??? ?? ? ????? ??? ?????? ?? ????????? ?? ???
    ????? ??? ??????????????????????.. ? ??? ????
    ??????? ??????? ?? ????.
  • ? ??? ?? ???? ?????? ????? ????? ????? ?? ????
    ???? ?????? ? ????? ? ??? ??? ??? ?? ??????
    ???????? ??????..

3
Data, Information, Knowledge ?
Non-programmable
Non-algorithmic(heuristic)
WISDOM
????
KNOWLEDGE
INFORMATION
Algorithmic
programmable
DATA
4
Physical Symbol System Hypothesis (P2SH)
  • ???? ?????? ?? ?? ?? ??????? ?????? ??? ??????
    ???-
  • ????? ????? ?????? ????? ??????? ????????.
  • ?????? ?????? ???? ?????.
  • ??? ??????? ???? ?? ?? ????.

5
The Example of Representation (?)
The example to present pi value.
  • The real number

High (human)
?
  • The decimal equivalent
  • 3.142

exponent
Abstraction
  • Floating point

mantissa
  • Computer memory

11100010
Low (machine)
6
Knowledge Representation Techniques
Rules ???????
Semantic Networks ??????? ????????
Object-Attribute Value
TECHNIQUES
Frames ????????
Logic ??????
7
Object-Attribute-Value (OAV)
  • Using fact ? ????? ??????? ?????????
  • ??????? ????? ????? ????? ???? ??
  • Eg The balls color is red (assign red to the
    balls 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.???? ?? ????
    ????? ?? ?????? ????? ?? ???? ?? ????? ????

Used in MYCIN
8
OAV Triplets Diagram (i)
Fact The chairs color is red and priced at
35.00
RED
Color
CHAIR
Priced
35.00
Object
Attribute
Value
9
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
Mr Yousef Salahat
Taught
Code
Artificial Intelligence
10
Rules Based
  • ??????? ???? ??????? ???? ???? ??? ?????????
    ???????? ???? ????? ???? ????????? ?? ?????????
    ??? ????????.
  • IF condition THEN action statements.     
    (premise              (goal     
    antecedent)          consequent)
  • Example ? IF Temperature is hot THEN turn on
    the air-conditioning system
  • ????. ?? ( ??????? ?????) ???? ????? ( ????? ????
    ???????).

11
Rules Based System (I)
Rule 1IF the balls color is red THEN I like the
ball. Rule 2IF I like the ball THEN I will buy
the ball.
Knowledge Base
IF balls color red THEN like ball IF like
ball THEN will buy the ball
3
Question Balls color? Answer Red
Working Memory
1
2
5
4
12
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 gt 37 c THEN
    x has a fever
  • Rule 3 IF x has been sick gt a month AND
    x has a fever THEN suspect bacterial infection
  • Patients temperature 38 c

????? ?????? 38
  • Patient has been sick gt 2 months

?????? ????? ?? ?????
  • Patient has a sore throat

?????? ???? ?????? ???
  • Conclusion ?

?????? ???? ??????? ?? ?????
13
Semantic Networks
  • ?? ???? ????? ????????? ?? ????? ??????? ?? ?????
    ??????? .. ??? ????? ?? ????? ??????? ??? ???
    ????? ???? ..
  • ?? ???? ??????
  • ?????? ?? Objects ???? ??? nodes..
  • ?????? ?? ??????? Link ???? ??? nodes..
  • ???????? ??????????? Exceptional handling
  • ??? ??????????? ?????? ????? ?? ?????? ?????
    ??? ??????? ???????? ??? ?? ???? ??????? ?? ?????

14
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
Bird ????
Parrot ???????
Air ??????
Animal ?????
is-a
Breathe ?????
Fly ????
travel
Ostrich ???????
Walk ???
exceptional handling
travel
15
Frames
  • ? ?? ???? ????? ????????? ?????? ??????? ?? ?????
    ??????? ? ?? ????? ???? ?????? ?????? ??????? ???
    ??? ???? ??? ????? ??????.
  • Extension schemas and basic to OOP
  • Class frame ? ????? ???? ???? ??????? ??????
    ????. ???? ??????? ???? ???? ??? ????? ????
    ??????.
  • Instance frame ? ???? ????? ????? ?? ???? ???????
    ????. ????? ????? ?? ???? ????? ????

16
Frames Structure
Frame Name BIRD
Frame Name OSTRICH
Properties
Class Name BIRD
Color unknown Wings 2 Flies True
Properties
Color brown/dark Wings 2 Flies False
17
Logic ?????? ???????
  • The oldest representation existed ???? ?????
    ?????.
  • Implemented using PROLOG, LISP programming
    language.
  • ????? ??????? ????? ??????? ????? ????? ???
    ????? ??? ??? ???? ??????? ???? ????? ??????.
  • ?????? ??? ?????? ????????? Propositional Logic
    ??? ?? ???? ??? ????? ?? ??? ?????.

18
Logical Operators
  • ??? ????? ??????? ???? ???????? ?? ??? ?????
    ????? ??? ?? ???? ?????? ( ?????) ?? ?????? ????
    ??????? ?? ??????? ??? ?? ???? ????? ?? ?????
    (True or False).

General Name Formal Name Symbols
Not Negation
And Conjunction
Or Disjunction
If Then/Implies Conditional
If and only if Biconditional
19
Facts ???????
  • ??? ????? ???? ??? ???? ?? ?? ???? ?? ??? ??
    ???? ???? ??? ?????? ???? ????? ?? ????? ?? ???
    ????? ??? ???? ??????
  • ?????? ????????? ???? ???? Artificial
    intelligence is a computer system
  • ???? ????? Cat is an animal
  • ??? ???? ??????? ?????
  • ?? ???? ?????? ?? ???? ???? Ahmed mother is
    married to Khalid father
  • ???? ??????? ???? ????? ????? (True)
  • ??? ??? ????? ?????? ??????? Cat is human
  • ??? ????? ????? (false)

20
Rules ???????
  • ??? ????? ???? ???? ??????? ?? ??????? ???
    ?????? ?? ??????? ????? ??????? ???? ??? ??
    ?????? ????.
  • ?? ???? ?????? ???? ?????? Easy come easy go
  • ??? ???? ???? every way has an answer
  • ?? ???? ??????? ?? ???? ???? if ??? ???? ??????
  • ??? ??? ??????? ???? ????? ??? ??????? ?? ????
    ???????? if animal give milk it is a mammal

21
Predicate Calculus Logic (FOPL)
  • ?????? ????? ?????? ????? ??? ?????? ??????? ??
  • operator (variables_1, variables_2,)
  • EXAMPLES
  • COMPUTER_COURSE(ARTIFICIAL_INTELLEGIENCE)
  • ANIMAL(CAT)

22
???? ?????? ????????? ?? ??????? ??????? ??????
????? Symbol ?????? Meaning
? ???For All
? ???? Exist
? ??? NOT
? ?And
v ?? OR
? ??? Then
gt ???? ?? Greater than
lt ??? ?? Less than
ge ???? ?? ?? ?????Greater than or equal
le ??? ?? ?? ?????Less than or equal
????? equal
23
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))

24
The Example of FOPL
Normal If it doesnt 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)
25
The Truth Table
P Q NOT ?(P) AND P Q OR P v Q Implies P ? Q Biconditional P ?? Q
T T F T T T T
T F F F T F F
F T T F T T F
F F T F F T T
26
The Example of Logical Operation
Consider P and Q as a propositional statement.
Show the result when (P (P ? Q)) ? Q
P Q P ? Q P (P ? Q) (P (P ? Q)) ? Q
T T T T T
T F F F T
F T T F T
F F T F T
27
Implementing Propositional Logic
  • IF the battery is dead THEN the car wont start
  • P battery is dead Q car wont start
  • Battery is dead T, car wont start T
  • Battery not dead F, car will start F
  • Equivalence to P ? Q

P Q P ? Q
T T T
T F F
F T T
F F T
28
The Example of PROLOG Language
My name is Ahmad bin Abdullah. My father is
Abdullah bin Abdul Karim.
?- grandfather(X,Y). X abdul_karim , Y ahmad
?- father(X,Y). X abdullah , Y ahmad X
abdul_karim , Y abdullah
son(ahmad,abdullah). son(abdullah,abdul_karim).
grandfather(X,Y)- fahter(X, Somebody), fahter(S
omebody, Y). father(X,Y)- son(Y,X).
29
The Application from PROLOG Language
Congkak!
Games Reversi
Travelling Salesman Analysis
30
????? ?????? ???? ?? ???? ?????? ?????? ?????.
?????? ?? ???? ??? ????? ?? ???? ?? ??? ????????
?? ?????? 1.??? ??? ?????? ??????? 2. ???
??????
Mammals
Subset-of
2
legs
Person
HasMother
Subset of
Female Person
Male Person
Subset-of
Member of
Member of
Sister of
Mariam
Ahmad
legs
1
31
????? ?????? ???? ?? ???? ?????? ?????? ?????.
?????? ?? ???? ??? ????? ?? ???? ?? ??? ????????
?? ?????? 1.??? ??? ?????? ??????? 2. ???
??????
  • Sister_of(Mariam,Ahmed)
  • Legs(Ahmed)1
  • Member_of(Mariam,Female_Person)

???? ????????? ???? ?? ???? ????? ????? ???
????? ?????
Person ?????? ????? ? Person Subset of Mammal Legs 2 Has Mother Female Person
Ahmed ?????? ????? ? Ahmed Member of Male Person Legs 1 Has Sister Mariam
Write a Comment
User Comments (0)
About PowerShow.com