Alternate Representational Methods CS 531: LUMS Lahore Dr. M M Awais Frames Graphical Representation: Semantic Nets.

Slides:



Advertisements
Similar presentations
Expert System Seyed Hashem Davarpanah
Advertisements

Default Reasoning the problem: in FOL, universally-quantified rules cannot have exceptions –  x bird(x)  can_fly(x) –bird(tweety) –bird(opus)  can_fly(opus)
Knowledge Representation CPSC 386 Artificial Intelligence Ellen Walker Hiram College.
Semantic Networks and Frames
Knowledge Representation
Knowledge Representation
Intelligent systems Lection 7 Frames, selection of knowledge representation, its combinations.
Frame-Based Expert Systems
Knowledge Representation. Essential to artificial intelligence are methods of representing knowledge. A number of methods have been developed, including:
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)
1 Knowledge Representation We’ve discussed generic search techniques. Usually we start out with a generic technique and enhance it to take advantage of.
1 Generalizations Multiple Inheritance (finishing up Class Design) Class Design – Another Look – Part 11.
CSM6120 Introduction to Intelligent Systems Knowledge representation.
CS 484 – Artificial Intelligence
Knowledge Engineering
System Modelling System modelling helps the analyst to understand the functionality of the system and models are used to communicate with customers. Different.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System modeling 2.
 Contrary to the beliefs of early workers in AI, experience has shown that Intelligent Systems cannot achieve anything useful unless they contain a large.
Artificial Intelligence Lecture No. 12 Dr. Asad Ali Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
2-1 © Prentice Hall, 2007 Chapter 2: Introduction to Object Orientation Object-Oriented Systems Analysis and Design Joey F. George, Dinesh Batra, Joseph.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Lahore University of Management Sciences, Lahore, Pakistan Dr. M.M. Awais- Computer Science Department Lecture 6 Knowledge Representation Non-Formal Method.
Objects Objects are at the heart of the Object Oriented Paradigm What is an object?
UML Diagrams Computer Science I.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Semantic Networks The idea behind a semantic network is that knowledge is often best understood as a set of concepts that are related to one another. The.
Frames and semantic networks, page 1 CSI 4106, Winter 2005 A brief look at semantic networks A semantic network is an irregular graph that has concepts.
Knowledge Representation Semantic Network dan Frame.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
System models Abstract descriptions of systems whose requirements are being analysed Abstract descriptions of systems whose requirements are being analysed.
Protege OWL Plugin Short Tutorial. OWL Usage The world wide web is a natural application area of ontologies, because ontologies could be used to describe.
Knowledge Representation Semantic networks Frames
Alternative representations: Semantic networks
Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.
Chapter 7 System models.
Temporal Reasoning and Planning in Medicine Frame-Based Representations and Description Logics Yuval Shahar, M.D., Ph.D.
Slide 1 System models. Slide 2 Objectives l To explain why the context of a system should be modelled as part of the RE process l To describe behavioural.
System models l Abstract descriptions of systems whose requirements are being analysed.
Modified by Juan M. Gomez Software Engineering, 6th edition. Chapter 7 Slide 1 Chapter 7 System Models.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Software Engineering, 8th edition Chapter 8 1 Courtesy: ©Ian Somerville 2006 April 06 th, 2009 Lecture # 13 System models.
Sommerville 2004,Mejia-Alvarez 2009Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
@Anupam Basu Frames Lecture Basu What is a Frame? A frame is a prototype of a concept –Denoting the attributes of the concept –The class of.
CHAPTER 13: OBJECT-ORIENTED DATA MODELING (OVERVIEW) © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition.
Semantic web course – Computer Engineering Department – Sharif Univ. of Technology – Fall Knowledge Representation Semantic Web - Fall 2005 Computer.
Object-Oriented Design Justin Callanan CS 597. Object-Oriented Basics ● Data is stored and processed in “objects” ● Objects represent generalized real.
Semantic Nets, Frames, World Representation CS – W February, 2004.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
1 search CS 331/531 Dr M M Awais REPRESENTATION METHODS Represent the information: Animals are generally divided into birds and mammals. Birds are further.
Knowledge Representation. Keywordsquick way for agents to locate potentially useful information Thesaurimore structured approach than keywords, arranging.
1 CS 385 Fall 2006 Chapter 7 Knowledge Representation 7.1.1, 7.1.5, 7.2.
1 Chapter 3 Knowledge Representation. 2 Chapter 3 Contents l The need for a good representation l Semantic nets l Inheritance l Frames l Object oriented.
Lecture 5 Frames. Associative networks, rules or logic do not provide the ability to group facts into associated clusters or to associate relevant procedural.
Knowledge-based systems Sanaullah Manzoor CS&IT, Lahore Leads University
16 April 2011 Alan, Edison, etc, Saturday.. Knowledge, Planning and Robotics 1.Knowledge 2.Types of knowledge 3.Representation of knowledge 4.Planning.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 8 Slide 1 System models.
Engineering, 7th edition. Chapter 8 Slide 1 System models.
Module 5 Other Knowledge Representation Formalisms
Knowledge Representation Techniques
Artificial Intelligence
Class Diagrams.
Abstract descriptions of systems whose requirements are being analysed
Artificial Intelligence (CS 370D)
Knowledge Representation and Inference
Object-Oriented Knowledge Representation
Weak Slot-and-Filler Structures
PreAP Computer Science Quiz
Semantic Nets and Frames
Presentation transcript:

Alternate Representational Methods CS 531: LUMS Lahore Dr. M M Awais Frames Graphical Representation: Semantic Nets

2 FOL CS 331/531 Dr M M Awais Approaches: Symbolic Symbolic All birds fly  X(bird(X) flies(X)) Problem (Commonsense/uncertain things are hard to represent through symbolic methods) Such as ‘Probably birds can fly’

3 FOL CS 331/531 Dr M M Awais Frames and Semantic Networks Provides a natural way of representing FACTUAL knowledge Knowledge is represented as collection of OBJECTS and RELATIONS We have CLASSES, SUBCLASSSES, and INSTANCES Class: the main branch of objects (such as animals is a class of living beings) Subclass: sub branch of the main class (birds) Instances: (crow, sparrow……..)

4 FOL CS 331/531 Dr M M Awais Semantic Networks/Frames Conceptual Description Language Instance (object, class) Subclass(class, superclass) Features(class, attribute, value) Superclass: Animal Subclass: reptiles and mammals, mammals have head Subclass of mammals: elephants (with size large and colour grey) Instances: Elephant A and B, B likes grass

5 FOL CS 331/531 Dr M M Awais Alternative Representation Use labels for the links that are similar to DFD in Software Engineering/Databases We have slot values to fill in Objects have Its super class/ class/ or subclass values Its specific properties

6 FOL CS 331/531 Dr M M Awais Frames Frames are a variant of semantic networks, and a popular way to represent facts in expert systems Relevant information is stored in single complex entity called frames Frames support inheritance, superficially similar to data structure (struct)

7 FOL CS 331/531 Dr M M Awais Example Problem:Animals have types reptiles and mammals. All Mammals have heads. Element is a typical mammal with grey color and large size. A and b are two elephants. A likes bananas and and B eats oranges. Mammal: subclass: Animal has_part: head Elephant:: subclass: Mammal color:grey size:large A: instance:Elephant likes:bananas B: instance:Elephant eats:oranges Reptiles: subclass: Animal objects Slot values

8 FOL CS 331/531 Dr M M Awais Implementing Simple Frames IF slot_value (O,P) returns a value V, return V. Otherwise, IF slot_value(O,subclass) or slot_value(O,instance) return C, find slot_value(C,P ) and return this value Otherwise, fail O=object, P=Attribute/Property slot_value(O,subclass) checks for slot value: subclass in O slot_value(O,instance) checks for slot value: instance in O

9 FOL CS 331/531 Dr M M Awais Example of the Algo. Question 1: What does elephant A likes? Step one: O = elephant A, P=likes Evaluate: slot_value(A,likes) returns: bananas query successful Mammal: subclass: Animal has_part: head Elephant:: subclass: Mammal color:grey size:large A: instance:Elephant likes:bananas B: instance:Elephant eats:oranges

10 FOL CS 331/531 Dr M M Awais Example of the Algo. Question 1: What is the color of the elephant A ? Step one: O = elephant A, P=color Evaluate: value(A,color) returns: nil query not successful Step Two: O=A, P=subclass/instance Evaluate: slot_value(A,subclass) returns: nil (A does not have slot value for a subclass) Evaluate: slot_value(A,instance) returns: Elephant Evaluate: slot_value(Elephant, colour) returns grey Mammal: subclass: Animal has_part: head Elephant:: subclass: Mammal color:grey size:large A: instance:Elephant likes:bananas B: instance:Elephant eats:oranges

11 FOL CS 331/531 Dr M M Awais Default and Multiple Inheritance Mammal: subclass: Animal has_part: head warm_blooded: yes  angry: yes Elephant:: subclass: Mammal has_trunk: yes  color:grey  size:large  angry:no A: instance:Elephant color:pink owner:Farid likes:bananas B:instance:Elephant size:small Mammal: subclass: Animal has_part: head warm_blooded: yes  angry: yes Elephant:: subclass: Mammal has_trunk: yes  color:grey  size:large  habitat:jungle Circus_Animal: subclass:Animal habitat:tent skills:balancing on a ball A: instance:Circus_Animal Elephant color:pink owner:Farid Default values are those values that can be overridden and changed for subclass and/or instances ? Multiple Inheritance: When more than one parent class is present, which attribute is to be passed.

12 FOL CS 331/531 Dr M M Awais Semantic Nets A semantic network focuses on the graphical representation of relations between elements in a domain. Components are nodes and links Nodes: used to represent domain elements (normally represented with rectangle or ellipse) Links (or arcs): represent the relationship between the elements. Shown as vector from one element to the other element

13 FOL CS 331/531 Dr M M Awais Examples Shahid eats apple Nodes: shahid and apple Link: eating Shahideatsapple [shahid eats apple] Link can be viewed as something that asserts to be true about one element relative to another. An assertion can only be true or false, therefore fundamentally its BINARY RELATION (examples of binary relation IS_A, PART_OF etc.)

14 FOL CS 331/531 Dr M M Awais Examples, cont… Hassan is a mammal Nodes: hassan and mammal Link: isa Hassanisamammal [hassan is_a mammal] Horse has a tail Tail partof Horse [tail part_of horse]

15 FOL CS 331/531 Dr M M Awais Examples, cont… Horse is a mammal with tail TAIL HORSEMAMMAL partof isa Could use an ellipse instead of rectangle

16 FOL CS 331/531 Dr M M Awais Examples, cont… Instance: a specific example of a class is the instance of that class. Animals are a class of living beings. Humans are subclass of animals and Zahra is an instance of subclass human, class animals Horse is a mammal with a tail. Tony is horse of black color TAIL HORSE MAMMAL partof isa BLACKTONY color instance

17 FOL CS 331/531 Dr M M Awais Examples, cont… Property Inheritance: The properties of the class are inherited by the instances by default, unless specified.Tony in the example below also has a tail. TAIL HORSE MAMMAL partof isa BLACKTONY color instance

18 FOL CS 331/531 Dr M M Awais Examples, cont… Problem:Animals have types reptiles and mammals. All Mammals have heads. Elephant is a typical mammal with grey color and large size. A and B are two elephants. A likes bananas and and B eats oranges. Nodes: Animals, reptiles, mammals, elephants, A, B, bananas and oranges

19 FOL CS 331/531 Dr M M Awais Examples, cont.. ANIMAL REPTILES MAMMALSHEAD ELEPHANT GREY LARGE A BORANGES BANANAS subclass eats has_part size color likes instance All relations have to be defined

20 FOL CS 331/531 Dr M M Awais Examples, cont… Problem: Vertebrates are animals with several types. Birds are type of vertebrates with feathers. Using these feathers they can fly. A bluebird is typical bird with blue colour and small size. Horses are also vertebrates, but are mammals. They have tails and cannot fly. Trigger is a horse with white colour. This horse is very old and is nearly dead.

21 FOL CS 331/531 Dr M M Awais Examples, cont… Problem: Snow is form of water, it is soft, slippery and white in color. Ice is also formed of water and share all the properties of snow except that it is hard and clear. One can form snowman from ice frosty is a snow man that I saw in the forest.