Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information.

Slides:



Advertisements
Similar presentations
Expert System Seyed Hashem Davarpanah
Advertisements

1 Knowledge Representation Introduction KR and Logic.
Artificial Intelligence 4. Knowledge Representation
CHAPTER 13 Inference Techniques. Reasoning in Artificial Intelligence n Knowledge must be processed (reasoned with) n Computer program accesses knowledge.
Rulebase Expert System and Uncertainty. Rule-based ES Rules as a knowledge representation technique Type of rules :- relation, recommendation, directive,
Knowledge Representation CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Knowledge Representation
Intelligent systems Lection 7 Frames, selection of knowledge representation, its combinations.
Inferences The Reasoning Power of Expert Systems.
Frame-Based Expert Systems
Knowledge Representation. Essential to artificial intelligence are methods of representing knowledge. A number of methods have been developed, including:
Knowledge Representation.  What is Knowledge Representation What is Knowledge Representation  Type of knowledge in AI Type of knowledge in AI  Declarative.
CPSC 322 Introduction to Artificial Intelligence November 5, 2004.
Representations One of the major distinctions between ordinary software and AI is the need to represent domain knowledge (or other forms of worldly knowledge)
CSM6120 Introduction to Intelligent Systems Knowledge representation.
Intelligent systems Lecture 6 Rules, Semantic nets.
Chapter 7 Knowledge Terms: concept, categorization, prototype, typicality effect, object concepts, rule-governed, exemplars, hierarchical organization,
INTRODUCTION TO ARTIFICIAL INTELLIGENCE Massimo Poesio LECTURE 4: Semantic Networks and Description Logics.
Rule Based Systems Michael J. Watts
 Contrary to the beliefs of early workers in AI, experience has shown that Intelligent Systems cannot achieve anything useful unless they contain a large.
Chapter 12: Expert Systems Design Examples
Expert System Human expert level performance Limited application area Large component of task specific knowledge Knowledge based system Task specific knowledge.
Knowledge Representation Knowledge Aquisition Analysis Representation Coding Representation Inference  Knowledge can be organised in various ways  Many.
Rules and Expert Systems
Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you.
Building Knowledge-Driven DSS and Mining Data
CPSC 433 Artificial Intelligence CPSC 433 : Artificial Intelligence Tutorials T01 & T02 Andrew “M” Kuipers note: please include.
Objects Objects are at the heart of the Object Oriented Paradigm What is an object?
Scene Based Reasoning Cognitive Architecture Frank Bergmann, Brian Fenton,
Sepandar Sepehr McMaster University November 2008
Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems.
Lecture 10 – Semantic Networks 1 Two questions about knowledge of the world 1.How are concepts stored? We have already considered prototype and other models.
Rule-Based Expert Systems. Expert Systems  Acknowledge that computers do not posses general knowledge (common sense)  Attempt to train computer in a.
13: Inference Techniques
Artificial Intelligence 4. Knowledge Representation Course V231 Department of Computing Imperial College, London © Simon Colton.
Alternative representations: Semantic networks
Chapter 9: Rules and Expert Systems Lora Streeter.
 Architecture and Description Of Module Architecture and Description Of Module  KNOWLEDGE BASE KNOWLEDGE BASE  PRODUCTION RULES PRODUCTION RULES 
Early Work Masterman: 100 primitive concepts, 15,000 concepts Wilks: Natural Language system using semantic networks Shapiro: Propositional calculus based.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Artificial Intelligence Knowledge Representation Logical Agents
Semantic Nets, Frames, World Representation CS – W February, 2004.
For Friday Read chapter 8 Homework: –Chapter 7, exercise 1.
Intelligent Control Methods Lecture 7: Knowledge representation Slovak University of Technology Faculty of Material Science and Technology in Trnava.
1 Lectures on Artificial Intelligence (CS 364) 1 Khurshid Ahmad Professor of Artificial Intelligence Centre for Knowledge Management September 2001.
Knowledge Representation
1 How is knowledge stored? Human knowledge comes in 2 varieties: Concepts Concepts Relations among concepts Relations among concepts So any theory of how.
Artificial Intelligence Knowledge Representation Department of Computer Science & Enggineering V. R. Palekar.
Artificial Intelligence
Forward and Backward Chaining
Review: What is a logic? A formal language –Syntax – what expressions are legal –Semantics – what legal expressions mean –Proof system – a way of manipulating.
Lecture 5 Frames. Associative networks, rules or logic do not provide the ability to group facts into associated clusters or to associate relevant procedural.
Artificial Intelligence Knowledge Representation.
Knowledge Engineering. Sources of Knowledge - Books - Journals - Manuals - Reports - Films - Databases - Pictures - Audio and Video Tapes - Flow Diagram.
Knowledge Representation. A knowledge base can be organised in several different configurations to facilitate fast inferencing Knowledge Representation.
Module 5 Other Knowledge Representation Formalisms
Artificial Intelligence 4. Knowledge Representation
Knowledge Representation Techniques
Artificial Intelligence
Knowledge Representation
Knowledge Representation
Artificial Intelligence (CS 370D)
Knowledge Representation
CPSC 433 : Artificial Intelligence Tutorials T01 & T02
Knowledge Representation
Semantic Nets and Frames
CSNB234 ARTIFICIAL INTELLIGENCE
How is knowledge stored?
Human Computer Interaction Lecture 3 The Human
Subject : Artificial Intelligence
Presentation transcript:

Dr.Abeer Mahmoud ARTIFICIAL INTELLIGENCE (CS 461D) Dr. Abeer Mahmoud Computer science Department Princess Nora University Faculty of Computer & Information Systems

Dr.Abeer Mahmoud (CHAPTER-7) LOGICAL AGENTS

Dr.Abeer Mahmoud Some General Representations 1. Logical Representations 2. Production Rules 3. Semantic Networks Conceptual graphs, frames, scripts 4. Description Logics ( not covered in this course ) 3

Dr.Abeer Mahmoud Non-Logical Representations? 4

Dr.Abeer Mahmoud Non-Logical Representations? 1. Production rules 2. Semantic networks Conceptual graphs Frames Scripts 5

Dr.Abeer Mahmoud Production Rules 6

Dr.Abeer Mahmoud Production Rules Rule set of pairs “if condition then action” Match-resolve-act cycle Match: Agent checks if each rule’s condition holds Resolve: Multiple production rules may fire at once (conflict set) Agent must choose rule from set (conflict resolution) Act: If so, rule “fires” and the action is carried out 7

Dr.Abeer Mahmoud 8 Rules If Animal has hair And Animal produces milk Then animal is a mammal IFanimal has feather, THEN animal is bird. IFanimal flies, AND animal lays eggs, THEN animal is bird..

Dr.Abeer Mahmoud IFthe interest-rate out look is down, THEN do not buy money-market funds.. An apple a day keeps the doctor away. A stitch in time saves nine. Rules-of-Thumb 9

Dr.Abeer Mahmoud IF you’re old, THENyou have owned several homes. Fuzzy Rules IF you have owned several homes THEN you have had numerous headaches. IF the interest-rate out look is up and the risk you can accept is low, THENbuy a conservative money-market fund. 10

Dr.Abeer Mahmoud IF the interest-rate out look is up and the risk you can accept is high, THEN buy aggressive money-market fund. IF the patient is sneezing, ANDhas a runny nose, ANDhas watery eyes, THENthe patient has cold, CF=0.5. Rules with certainty factors 11

Dr.Abeer Mahmoud Production Rules Example IF (at bus stop AND bus arrives) THEN action(get on the bus) IF (on bus AND not paid AND have oyster card) THEN action(pay with oyster) AND add(paid) IF (on bus AND paid AND empty seat) THEN sit down 12

Dr.Abeer Mahmoud Inference Engine  The inference engine is a generic control mechanism for navigating through and manipulating knowledge and deduce results in an organized manner  It applies a specific task take data and drive conclusions  The inference engine is the part of the system that chooses which facts and rules to apply when trying to solve the user’s query

Dr.Abeer Mahmoud Inference Engine  The forward chaining, backward chaining and tree search are some of the techniques used for drawing inferences from the knowledge base Inferences from rules 1.Goal driven = backward chaining 2.Data driven= forward chaining

Dr.Abeer Mahmoud 15  Goal driven or backward chaining An inference technique which uses IF-THEN rules to repetitively break a goal into smaller sub-goals which are easier to prove

Dr.Abeer Mahmoud Example : KB contains Rule set : Rule 1: if A and C then F Rule 2: if A and E then G Rule 3: if B then E Rule 4: if G then D

Dr.Abeer Mahmoud

 Data driven or Forward chaining An inference technique which uses IF-THEN rules to deduce a problem solution from initial data

Dr.Abeer Mahmoud

Advantages of Rules Rules are easy to understand Inference and explanation are easy to derive Modifications and maintenance are relatively easy Uncertainty is easily combined with rules Each rule is usually independent of all others 21

Dr.Abeer Mahmoud Graphical Representation 22

Dr.Abeer Mahmoud Graphical Representation Graphs easy to store in a computer To be of any use must impose a formalism Jason is 15, Bryan is 40, Arthur is 70, Jim is 74 How old is Julia? 23

Dr.Abeer Mahmoud Semantic Networks Because the syntax is the same We can guess that Julia’s age is similar to Bryan’s Formalism imposes restricted syntax 24

Dr.Abeer Mahmoud Semantic Networks Graphical representation (a graph) Links indicate subset, member, relation,... Equivalent to logical statements (usually FOL) Easier to understand than FOL? Example: natural language understanding Sentences with same meaning have same graphs e.g. Conceptual Dependency Theory (Schank) 25

Dr.Abeer Mahmoud 26 Semantic Networks In this scheme, knowledge is represented in terms of objects and relationships between objects The objects are denoted as nodes of a graph. The relationship between two objects are denoted as a link between the corresponding two nodes The most common form of semantic network uses the link between nodes to represent IS-A and HAS relationships between objects

Dr.Abeer Mahmoud Example of semantic network 27

Dr.Abeer Mahmoud APPEARANCE ACTIVITY APPENDANCE ANIMAL MAMMAL BIRD A-KIND-OF A Semantic network for animal kingdom A-KIND-OF CARNIVORE SKIN COVER ACTIVITY SKIN COVER ACTIVITY HAIR MILK PRODUCTION FORWARD EYES FORWARD TEETH EATS MEAT CLAWS FEATHERS FLYS LAYS EGGS 28

Dr.Abeer Mahmoud Example of Semantic Network headanimal part of bird is a fly travel feathers covering fish is a wings part of ostrich is a walk travel penguin travel is a color has value brown canary color has value yellow sound sing robin covering skin is a sound swim travel tweety is a color white has value color has value red opus is a

Dr.Abeer Mahmoud Frames o I n this technique, knowledge is decomposed into highly modular pieces called frames, which are generalized record structures o Knowledge consist of concepts, situation, attributes of concepts, relationships between concepts, and procedure to handle relationships  Each concept may be represented as a separate frame  The attributes, the relationships between concepts and the procedures are allotted to slots in a frame  The contents of a slot may be of any data type –numbers, strings, functions or procedures and so on  The frames may be linked to other frames, providing the same kind of inheritance as that provided by a semantic network 30

Dr.Abeer Mahmoud Frame Representations Semantic networks where nodes have structure Frame with a number of slots (age, height,...) Each slot stores specific item of information When agent faces a new situation Slots can be filled in (value may be another frame) Filling in may trigger actions May trigger retrieval of other frames Inheritance of properties between frames Very similar to objects in OOP 31

Dr.Abeer Mahmoud Frames Basic frame design Frame Name: Class: Properties: Object1 Object2 *** Value2Property2 Value1Property1

Dr.Abeer Mahmoud Example: Frame Representation 33

Dr.Abeer Mahmoud Frame Representation of the “ animal kingdom ” MAMMALCARNIVOREBIRD A-KIND-OF ANIMAL SKIN COVER HAIR ACTIVITY PRODUCES MILK APPEARANCE FORWARD EYES POINTED TEETH APPENDGES CLAWS ACTIVITY EATS MEAT SKIN COVER FEATHER ACTIVITY FLY LAYS EGGS 34

Dr.Abeer Mahmoud Example of Frame Based System superclass: vehicle reg. number producer model owner truck class: vehicle reg. number producer model owner tonnage part ofbask et car class: vehicle reg. number producer model owner number of doors 4 horse-power John’s car class: car reg. numberLV97 producerBMW model520 ownerJohn number of doors 2 horse-power150 basket dimensions2*3*1.5 materialtin John age22 length of driving2

Dr.Abeer Mahmoud 36 Chair frame

Dr.Abeer Mahmoud Flexibility in Frames Slots in a frame can contain Information for choosing a frame in a situation Relationships between this and other frames Procedures to carry out after various slots filled Default information to use where input is missing Blank slots: left blank unless required for a task Other frames, which gives a hierarchy 37

Dr.Abeer Mahmoud 38 Script

Dr.Abeer Mahmoud 39 Script Concept : Scripts accounted for information about Stereotypical events Eg – going to restaurant taking bus Visiting the dentist Scripts are inherently episodic in origin It arise fro experience and are applied to understand new events

Dr.Abeer Mahmoud 40 The acquisition of script is the result of repeated exposure to a given situation Ex: children learn the restaurant script by going to restaurant over and over again As a psychological theory of memory, scripts suggested that people would remember an event in terms of its associated script

Dr.Abeer Mahmoud RESTAURANT SCRIPT Example of a script 41 Track : Roles: Props Entry Conditions: Fast food restaurent Customer © Server (S) Counter Tray Food Mony Napkins Salt/pepper/catsup/straws Customer is hungry Customer has money Scene 1:entry Customer park car Customer enters restaurant Customer waits in line at the counter Customer reads the menu on the wall and makes a decision about what to order

Dr.Abeer Mahmoud 42 Scene 2: order Customer give order to server Server fills order by putting food on tray Customer pays server Scene 3: eating Customer gets napkins, straws, salt Customer takes tray on unoccupied table Customer eats food quickly Scene 4: exit Customer cleans up table Customer discard trash Customer leave restaurant Customer drives away

Dr.Abeer Mahmoud Results : Customer no longer hungry Customer has less money Customer is happy Customer is unhappy Customer is too full Customer has upset stomach Options 43

Dr.Abeer Mahmoud Knowledge Representation SchemeAdvantagesDisadvantages Production Rules simple syntax easy to understand simple interpreter highly modular flexible (easy to add or modify) hard to follow hierarchy inefficient for large systems not all knowledge can be expressed as rules poor at representing structure descriptive knowledge Semantic Networks easy to follow hierarchy easy to trace association flexible meaning attached to nodes might be ambiguous exception handling is difficult 44

Dr.Abeer Mahmoud Knowledge Representation SchemeAdvantagesDisadvantages Framesexpressive power easy to setup slots for new properties and relations easy to include default information and detect missing values difficult to Program difficult for inference lack of software Formal Logic facts asserted independently of use assurance that all and only valid consequences are asserted (precision) Completeness separation of representation and processing inefficient with large data sets very slow with large knowledge base 45

Dr.Abeer Mahmoud Thank you End of Chapter 7- part2 46