Data Information Knowledge Nonalgorithmic heuristic WISDOM Nonprogrammable KNOWLEDGE
Data, Information, Knowledge ? Non-algorithmic (heuristic) WISDOM Nonprogrammable ﺣﻜﻤﺔ KNOWLEDGE INFORMATION Algorithmic DATA programmable 3
The Example of Representation ( ) The example to present pi value. High (human) ¡ ¡ {Abstraction} ¡ ¡ Low (machine) The real number The decimal equivalent 3. 142 exponent Floating point 3142 1 Computer memory 11100010 mantissa 5
Knowledge Representation Techniques Rules ﺍﻟﻘﻮﺍﻋﺪ Semantic Networks ﺍﻟﺸﺒﻜﺎﺕ ﺍﻟﺪﻻﻟﻴﺔ Object-Attribute Value TECHNIQUES Logic ﺍﻟﻤﻨﻄﻖ Frames ﺍﻻﻃﺎﺭﺍﺕ 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 8
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 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? Answer: Red Working Memory 1 Ball’s color = red 2 Like = ball 5 Will buy = ball 4 11
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 38 ﺍﻟﻤﺮﻳﺾ ﺣﺮﺍﺭﺓ c • Patient has been sick > 2 months ﺷﻬﺮﻳﻦ ﻣﻦ ﺗﻌﺒﺎﻥ ﺍﻟﻤﺮﻳﺾ • Patient has a sore throat ﺣﻠﻖ ﺍﻟﺘﻬﺎﺏ ﻟﺪﻳﻪ ﺍﻟﻤﺮﻳﺾ • Conclusion ? Patient has Strep throat ﺍﻟﺤﻠﻖ ﻓﻲ ﺑﻜﺘﻴﺮﻳﺎ ﻟﺪﻳﻪ ﺍﻟﻤﺮﻳﺾ 12
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. has Parrot ﺍﻟﺒﺒﻐﺎﺀ is-a Bird ﻃﺎﺋﺮ Animal ﺣﻴﻮﺍﻥ travel Fly ﻳﻄﻴﺮ Walk ﻣﺸﻲ “exceptional handling” Ostrich ﺍﻟﻨﻌﺎﻣﺔ travel Wings ﺃﺠﻨﺤﺔ Air ﺍﻟﻬﻮﺍﺀ Breathe ﻳﺘﻨﻔﺲ 14
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 16
Predicate Calculus Logic (FOPL) : • ﻭﺍﻟﺸﻜﻞ ﺍﻟﻌﺎﻡ ﻟﺘﺮﻛﻴﺐ ﺍﻟﺠﻤﻞ ﻭﻓﻖ ﺍﻟﻤﻨﻄﻖ ﺍﻟﺮﻳﺎﺿﻲ ﻫﻮ operator (variables_1, variables_2, …) EXAMPLES: COMPUTER_COURSE(ARTIFICIAL_INTELLEGIENCE) ANIMAL(CAT) 21
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))] 23
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) 24
The Truth Table P Q NOT (P) AND P^Q OR Pv. Q Implies P Q Biconditional P Q T T F T T T F F F T T 25
The Example of Logical Operation Consider P and Q as a propositional statement. Show the result when (P ^ (P Q)) Q P Q P ^ (P Q) (P ^ (P Q)) Q T T T F F F T T F F T 26
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 T T F T F F T • Equivalence to P Q 27
The Example of PROLOG Language My name is Ahmad bin Abdullah. My father is Abdullah bin Abdul Karim. Code son(ahmad, abdullah). son(abdullah, abdul_karim). grandfather(X, Y): fahter(X, Somebody), fahter(Somebody, Y). father(X, Y): son(Y, X). Output ? - grandfather(X, Y). X = abdul_karim , Y = ahmad ; ? - father(X, Y). X = abdullah , Y = ahmad ; X = abdul_karim , Y = abdullah 28
The Application from PROLOG Language Congkak! Games: Reversi Travelling Salesman Analysis 29
- Slides: 31