Presentation is loading. Please wait.

Presentation is loading. Please wait.

Knowledge-based systems Sanaullah Manzoor CS&IT, Lahore Leads University https://sites.google.com/site/engrsanaullahmanzoor/home.

Similar presentations


Presentation on theme: "Knowledge-based systems Sanaullah Manzoor CS&IT, Lahore Leads University https://sites.google.com/site/engrsanaullahmanzoor/home."— Presentation transcript:

1 Knowledge-based systems Sanaullah Manzoor CS&IT, Lahore Leads University sanaullahmanzoor1988@gmail.com https://sites.google.com/site/engrsanaullahmanzoor/home Lecture 2

2 Knowledge Representation

3 3 Overview Knowledge Processing 3  Motivation  Objectives  Knowledge Types  Knowledge Representation Method Semantic Networks Frames Production Rules

4 Catching My Plane o Scenario for an examination of knowledge representation and reasoning: o A traveller wants to know when he/she needs to leave his/her hotel in order to catch a plane o background knowledge o situation knowledge o acquisition of additional knowledge for decision making o reasoning methods o verification and validation

5 Computer Scenario l Traveler posts a query to a computer

6 Google:

7 Bing:

8 Ask.com:

9 Human Scenario l Traveler asks a human n e.g. hotel receptionist

10 Motivation  Representation and manipulation of knowledge has been essential for the development of humanity as we know it  Use of formal methods and support from machines can improve our knowledge representation and reasoning abilities  Intelligent reasoning is a very complex phenomenon, and may have to be described in a variety of ways  Basic understanding of knowledge representation and reasoning is important for the organization and management of knowledge

11 Objectives l be familiar with the commonly used knowledge representation and reasoning methods l examine the suitability of knowledge representations for specific tasks l evaluate the representation methods and reasoning mechanisms employed in computer-based systems

12 Knowledge Representation  Types of Knowledge Factual Subjective Heuristic Deep or Shallow Other Types  Knowledge Representation Methods Semantic Networks Frames Production Rules

13 Factual Knowledge l Verifiable n through experiments, formal methods, sometimes commonsense reasoning n often created by authoritative sources l typically not under dispute in the domain community l often incorporated into reference works, textbooks, domain standards

14 Subjective Knowledge l Relies on individuals n insight, experience l possibly subject to interpretation l more difficult to verify n especially if the individuals possessing the knowledge are not cooperative different from belief n both are subjective, but beliefs are not verifiable

15 Heuristic Knowledge l Based on rules or guidelines that frequently help solving problems l often derived from practical experience working in a domain n as opposed to theoretical insights gained from deep thoughts about a topic l verifiable through experiments

16 Deep and Shallow Knowledge l deep knowledge enables explanations and credibility considerations n possibly including formal proofs l shallow knowledge may be sufficient to answer immediate questions, but not for explanations n heuristics are often an example of shallow knowledge Shallow is for time-being consideration while deep is long-term

17 Other Types of Knowledge l Procedural knowledge n knowing how to do something l Declarative knowledge n expressed through statements that can be shown to be true or false n prototypical example is mathematical logic l Tacit knowledge n implicit, unconscious knowledge that can be difficult to express in words or other representations

18 Other Types of Knowledge Priori knowledge n independent on experience or empirical evidence n e.g. “everybody born before 1983 is older than 20 years” Posteriori knowledge n dependent of experience or empirical evidenceevidence n e.g. “X was born in 1983”

19 Knowledge Representation Methodologies

20 Before we begin the methods.. Let’s see this l There is a common method used for many non-AI (databases) representation, namely n Object-Attribute-Value (O-A-V) Triplets u An O-A-V is a more complex type of proposition (fact). u It divides statement into three (3) parts as shown: shirt price RM39 object attributevalue

21 There can also be single or multiple value facts. shirt blue color cost rm39 size XL There can be single or multiple attribute facts

22 22 Semantic Networks  A semantic net has a binary relation  Concepts are represented by nodes  Links between nodes represent the relationships  Drawbacks:  Disjunctive and conjunctive information cannot be included into semantic nets  E.g. apple can be either green or red  E.g. panda has color black and white

23 23 Semantic Networks (II) l Examples of relationship labeled on arcs (notice that there is an underscore) n is_a n has_a n has_part l Examples of concepts (nodes) n bird n person n book n famous n intelligent

24 24 A semantic net that represents a bird’s property feathers bird flies small bluebird blue is_a size has_propertyhas_covering has_color

25 25 Exercise: Draw a semantic network for the following description: Lab is a room. Lab has a door. Lab has computers. Printer is in lab. Laser printer is a Printer.

26 26 Inheritance in Semantics Nets Breathe Animal Move Fly Bird Wings Feathers CanarySing Yellow is can has can Animal’s properties are inherited to Bird and Bird’s properties are inherited to a bird species called canary Penguin We shall see this later

27 27 Frames l The idea behind frames is to store information in meaningful chunks. l This frame has 4 slots: BOOK Title: Qualitative Reasoning Author: Ken D. Forbus Publisher: Prentice-Hall Year: 2000

28 28 Frame Description Hotel Room specialisation of: room location: the hotel contains: bed, chair & phone Hotel Bed superclass: bed size: king contains: mattress, pillow, etc. :: Hotel Phone specialisation of: phone use: calling room service billing: through room

29 29 Frames l You should be able to see now : n that a frame describes an object by embedding all the information about that object in “slots” n that slots are commonly known in programming terms as fields or attributes with associated value u this is an advantage (discuss in later part) n that a frame is similar to a database record n that a frame describes typical instances of the concepts they represent

30 30 Converting from Frames to Semantics Nets date author Forbus novel book publisher encyclopedia editor has_a is_a has_a is_a

31 31 Production Rules (I) l Most Expert Systems are rule-based n i.e. the knowledge-base of the ES consists of a huge set of production rules (or just “rules”) l Facts, rules and inference engines are required to execute a rule-based expert system l Production-rules system captures knowledge in simple “if-then” format.

32 32 Production Rules (II) l The human mental process is too complex to be represented as an algorithm l However, most experts are capable of expressing their knowledge in the form of rules for their problem solving l e.g. u IF the traffic-light is green THEN the action is go u IF the traffic-light is red THEN the action is stop

33 33 Production Rules (III) l A production rule model consists of two parts: n the IF part, called antecedent or premise or condition, and n the THEN part, called consequent or conclusion or action l In our earlier example: l IF THEN condition action

34 34 Production Rules (IV) l Multiple conditions are joined by the keywords AND (conjunction), OR (disjunction) or a combination of both. l Example: IF AND : AND THEN IF OR : OR THEN

35 Example 1 Production Rules l for a subset of the English language -> -> kid| man | woman -> loves | hates -> a little | a lot | forever | sometimes

36 kidlovesmotherforever Example 1 Parse Tree Example sentence: kid loves mother forever

37 37 Production Rules (VII) Strategy: IF the car is dead THEN check fuel tank step 1 is complete IF step 1 is complete AND the fuel tank is full THEN check battery step 2 is complete IF step 2 is complete AND the battery is replaced THEN check electrical fuel lines : Heuristics: IF the spill is liquid ANDthe spill pH is < 6 AND the smell is vinegar THEN the spill material is acetic acid Directive: IF the fuel tank is empty THEN refuel the car

38 38 Production System Model Production Rules Long term memory Facts Short term memory Reasoning Conclusion


Download ppt "Knowledge-based systems Sanaullah Manzoor CS&IT, Lahore Leads University https://sites.google.com/site/engrsanaullahmanzoor/home."

Similar presentations


Ads by Google