Knowledge Representation and Objects

Slides:



Advertisements
Similar presentations
Expert System Seyed Hashem Davarpanah
Advertisements

Artificial Intelligence 4. 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:
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)
Semantic Nets, Frames, World Representation. Knowledge Representation as a medium for human expression An intelligent system must have KRs that can be.
Intelligent systems Lecture 6 Rules, Semantic nets.
Knowledge Engineering
Rule Based Systems Michael J. Watts
SYSTEM ANALYSIS & DESIGN (DCT 2013)
Systems Analysis and Design 9th Edition
CS 330 Programming Languages 09 / 18 / 2007 Instructor: Michael Eckmann.
Knowledge Representation and Organization
Knowledge Representation
Objects Objects are at the heart of the Object Oriented Paradigm What is an object?
(c) University of Washington03-1 CSC 143 Java Inheritance Reading: Ch. 10.
Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems.
CHP - 9 File Structures. INTRODUCTION In some of the previous chapters, we have discussed representations of and operations on data structures. These.
C++ Object Oriented 1. Class and Object The main purpose of C++ programming is to add object orientation to the C programming language and classes are.
Knowledge Representation Semantic Network dan Frame.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
Lectures 5,6 MACHINE LEARNING EXPERT SYSTEMS. Contents Machine learning Knowledge representation Expert systems.
Chapter 4 System Models A description of the various models that can be used to specify software systems.
Chapter 8 Architecture Analysis. 8 – Architecture Analysis 8.1 Analysis Techniques 8.2 Quantitative Analysis  Performance Views  Performance.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
Programming in Java Unit 2. Class and variable declaration A class is best thought of as a template from which objects are created. You can create many.
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.
Early Work Masterman: 100 primitive concepts, 15,000 concepts Wilks: Natural Language system using semantic networks Shapiro: Propositional calculus based.
Temporal Reasoning and Planning in Medicine Frame-Based Representations and Description Logics Yuval Shahar, M.D., Ph.D.
LOGIC AND ONTOLOGY Both logic and ontology are important areas of philosophy covering large, diverse, and active research projects. These two areas overlap.
Semantic web course – Computer Engineering Department – Sharif Univ. of Technology – Fall Knowledge Representation Semantic Web - Fall 2005 Computer.
Design Elements of Graphical Representation, (Factors supporting appearance and functionality of solutions). P0CCUAA.
1 The Theoretical Framework. A theoretical framework is similar to the frame of the house. Just as the foundation supports a house, a theoretical framework.
Semantic Nets, Frames, World Representation CS – W February, 2004.
Chapter 4 enterprise modeling
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
ESDI Workshop on Conceptual Schema Languages and Tools
Cognitive Processes PSY 334 Chapter 5 – Meaning-Based Knowledge Representation.
Knowledge Representation
Some Thoughts to Consider 8 How difficult is it to get a group of people, or a group of companies, or a group of nations to agree on a particular ontology?
1 CS 385 Fall 2006 Chapter 7 Knowledge Representation 7.1.1, 7.1.5, 7.2.
Systems Analysis and Design 8th Edition
Finite State Machines (FSM) OR Finite State Automation (FSA) - are models of the behaviors of a system or a complex object, with a limited number of defined.
Knowledge Representation Fall 2013 COMP3710 Artificial Intelligence Computing Science Thompson Rivers University.
 To explain why the context of a system should be modelled as part of the RE process  To describe behavioural modelling, data modelling and object modelling.
Reasoning Systems For Categories By Franklyn O. Reasoning Systems For Categories Categories are the primary building blocks of any large-scale knowledge.
Lecture 5 Frames. Associative networks, rules or logic do not provide the ability to group facts into associated clusters or to associate relevant procedural.
1 Chapter 4 Unordered List. 2 Learning Objectives ● Describe the properties of an unordered list. ● Study sequential search and analyze its worst- case.
Artificial Intelligence Knowledge Representation.
Knowledge Representation
Definition and Technologies Knowledge Representation.
16 April 2011 Alan, Edison, etc, Saturday.. Knowledge, Planning and Robotics 1.Knowledge 2.Types of knowledge 3.Representation of knowledge 4.Planning.
Knowledge Representation. A knowledge base can be organised in several different configurations to facilitate fast inferencing Knowledge Representation.
Knowledge Representation & Logic
Knowledge Representation Techniques
Object-Oriented Analysis and Design
Knowledge Representation
Knowledge Representation
Knowledge Representation
Knowledge Representation
KNOWLEDGE REPRESENTATION
Weak Slot-and-Filler Structures
Semantic Nets and Frames
Subject : Artificial Intelligence
CGS 2545: Database Concepts Summer 2006
Presentation transcript:

Knowledge Representation and Objects

Representing objects In the procedural approach objects tend to be entangled in the algorithm in question and difficult to extract for use in other circumstances. The advantages of re-use are many and this served as a motivation for the development of an object oriented approach to both to programming and also to knowledge representation.

Objects Objects are at the heart of the Object Oriented Paradigm What is an object?

Objects We are surrounded by objects. In this class room there are desks, blackboards, lights , chairs and so on. Each object has specific attributes The desk is made of wood. The seat has a blue cover and so on.

Objects have associations and relationships with each other . Seats have desktops attached. All are attached to the floor Seats are adjacent to other seats. They are oriented in the same way. Lights are controlled by switches

Object Roles and Functions Each Object in the room has a specific role or function or behaviour. Seats are to be sat on. Board is to be written on. Lights can be turned on and off Boards can be moved up and down and seats can be put up and down.

Objects can be classified Within the room objects can be grouped into different classes For example we could have the furniture objects e.g. chairs, tables, worktop We could also have the electrical objects. Lights, projector, laptop and so on.

The nature of Objects Clearly Objects constitute a complex multi faceted concept. Their definition is dependent on many elements- their attributes , their behaviour, their classification and as we will see much , much more To investigate the nature of objects , it is helpful to consider an important knowledge representation scheme which is the basis for theoretical frameworks of the object oriented paradigm This framework is known as semantic networks

Semantic Nets Semantic networks are a popular scheme which elegantly reflect these ideas. A network consists of nodes repesenting objects, concepts and events and links between the nodes representing their interrelations.

Example Using the example Birds have wings a typical semantic net would be

Origin The development of semantic networks had its origins in psychology. Ross Quillian in 1968 designed two semantic network based systems that were intended primariliy as psychological models of associateive memory. Semantic Networks quickly found application in AI. B. Raphaels SIR system, also 1968, was one of the first programs to use this type of representation scheme. SIR was a question Answering system and could answer questions requiring a variety of simple reasoning tasks and relationships

Meaning of Semantic Nets The semantics of net structures however depends solely on the program that manipulates them and there are no fixed conventions about their meaning. A wide variety of network based systems have been implemented that use totally different procedures for making inferences.

Another Example Dog bone likes

Evolving Features While there are no fixed conventions, a number of important features of Semantic nets have emerged , that are widely used. These have largely emerged because of the application of Semantic Nets to Object Oriented Theory.

Object Definitions The central aspect of the object paradigm is how it defines objects. The basic mechanism of representation is the articulation of class hierarchies. Instances of Objects exist. In turn Objects belong to classes and these in turn can belong to other classes

Example Consider Fido ( who is a dog) Fido is instance of the object “dog”. Dogs belong to the class pets, which for example could also include other classes such as cats. Pets in turn belong to a class animals and so on

Animals Pets Cats Dogs Fido

Labels used in Semantic Nets Objects and Instances Both Represented by Nodes linked by an IS_A link Fido Dog IS_A Instance Object

Labels used in Semantic Nets Objects and Classes Both Represented by Nodes linked by an Subset or a SuperSet link Dog Pets Subset Object Class

SuperSet links Objects and Classes Both Represented by Nodes linked by an SuperSet link Dog Pets Subset Object Class Superset

Relationships, attributes and associations Represented by a labelled link between objects etc Fido Black and white colour

Component Parts Object components Both Represented by Nodes linked by an HAP (has as part) link A dog has a tail Dog Tail HAP Object Object

Inheritance Attributes of classes are inherited by subclasses and instances of objects Because we know dogs have tails and Fido is a dog we know Fido has a tail since this is inherited from the parent class

Inheritance A dog has a tail and Fido is a dog Dog Tail HAP ISA Object

Bigger Example Exercise What does the following Semantic net represent

Building subset Purpose Habitation House No. Of Storeys subset brick Bungalow 1 Made_of ISA Colour HAP HAP Roof My House Red walls

Advantages of Semantic Nets Easy to visualize – Graphical in nature – easy for humans to interpret Expressive power equal to or exceeding that of First Order Predicate Logic Formal definitions of semantic networks have been developed for use Related knowledge is easily clustered – logically and physically close Efficient in space requirements Objects represented only once Relationships handled by pointers Other schemes are limited to True or False answers where as Semantic Nets are more informative and flexible Not limited to only binary representation… can also represent action concepts

Disadvantages of Semantic Nets Inheritance (particularly from multiple sources and when exceptions in inheritance are wanted) can cause problems such as conflicts Facts placed inappropriately cause problems No standards about node and arc values – in spite of the generic formal definitions

Frames The representation of knowledge about objects and events typical to specific situations has been the focus of research into a concept called frames. Frames were originally proposed in 1975 by Minsky, as a basis for understanding visual perception, natural language dialogues and other complex behaviours.

How does a frame work? Attached to each frame are several different kinds of knowledge. Some knowledge is how to use the frame, some is about the different elements of the frame, some is about what to expect in given situations and some is what to do if the specified conditions do not materialise. Frames contain a representation mechanism called a slot. Knowledge which is relevant to part of a given situation can be entered into a slot. thus the composite pieces of knowledge that go to make up the larger entity can be represented as slots within the larger structure of a frame.

What are slots again? A frame is a composite data structure which consists of a number of slots which correspond to various aspects of the object being represented. For example slots in the frame could contain information such as

Frame elements 1: frame identification information. 2: relationship of this frame to other frames. 3: descriptors of requirements for frame match. for example the chair frame might specify a flat base on four vertical supports with a back support at 90 degrees to the base.

More Frame elements 4: procedural information on the use of the structure called demons. 5: frame default information: for example as default a chair has four legs. 6: new instance information. Many frame slots are left unspecified until a particular instance of the structure is identified. For example the colour of the chair might not be filled in until a particular instance is identified.

Inheritance Frames support inheritance: Class types are represented by frames which omit the detail of objects of the class, for example the frame representing a three legged chair object could inherit the slots of a class frame representing an abstract chair and augment these with its own particular detail to describe the new object. 8: The big problem with frames is controlling their invocation particularly when a number of them are applicable to a situation. e.g. The man broke a leg when he fell onto the chair. Would the man frame or the chair frame take precedence.

In Summary Frames then are data structures for representing composite entities. The top levels of a frame are fixed and represent things that are always true about a supposed situation. The top levels therefore give a high level abstract view of the situation. Only the details are missing. The lower levels have many slots that must be filled by specific instances or data. That is the details of the specific situation can be added at these levels.

Adding new knowledge The slot mechanism is a modular concept. New knowledge pertaining to a frame can be added simply by creating new slots. Conversely redundant knowledge may be deleted by removing slots from a frame.

Static versus variable slots The idea of having fixed higher and variable lower levels is entirely suitable for representing different versions of the one context. This is so because different instances of the same context differ only in detail. For example any room has walls, a ceiling and a floor but one instance of a room differs from another in what it contains and how these contents are arranged i.e. in the specific details of that room.

Demons Procedures called demons can be attached to slots of a frame. Thus algorithmic knowledge (or Behaviour) can be incorporated into a frame based system. One interesting function of these demons is to activate other appropriate frames.

Frames and stereotyped situations Many everyday situations are stereotyped or conform to a familiar pattern. waking or opening a door are examples of stereotyped situations. Most of the events associated with these situations are expected. The slots of a frame are therefore filled with default values to mirror these expected events. However if we are trying to represent new or uncertain situations then default values tend not to work very well. More sophisticated inference is generally needed. The notion of using stereotypes would reflect thinking among psychologists that we use previous experiences to deal with situations that we have never met before.

Problems There are three major problems involved in the use of frames. 1: When should a frame be activated i.e. when does it become relevant. 2: When should a frame be de-activated i.e. when does it become irrelevant. 3: What happens if a situation arises in which no frames are relevant.

Applications of Frames When Minsky first published his ideas on frames, it started a flurry of research into its use. A side development but one that is very similar is the development of Object Oriented Orogramming Paradigms a huge area in its own right. Modern AI research is considering the notion of flavors i.e. a frame based structure which introduces concepts by presenting a stereotypical flavor of it. One major applications Minsky proposed for frame based structures is the idea of scripts.

Scripts A script is a structured representation describing a stereotyped sequence of events in a particular context. The script was originally deigned by Schank and Ableson 1977. A typical script is the restaraunt script. The customer recognizes the restaraunt by a sign on the door. They are met at the door and directed to an appropriate table by the waiter. They are brought menus. They order the meal which is brought by the waiter. They eat the meal, pay and leave. This is fairly typical scenario and comfortably describes the average trip to restaurant.

Script Representation To represent scenarios like this a script has a number of components. 1: Entry Conditions or descriptors of the world thaty must be true for the script to be called. In a restaraunt script these might be for example a restaurant that is open and a customer who is hungry. 2: Results or facts that are true when the script has terminated, for example the customer is full and the money has been paid. 3: Props or the things that make up the content of the script including cast for example menu, money, tables, waiters, customers and so on.

More 4: Roles are the actions that the individual participants perform, for example the waiter shows the customer to their seat, brings the menu and food and accepts the money at the end. 5: Scenes: These provide a temporal partitioning of the script for example in the restaurant the scenes and their order might be: entering, ordering, eating, paying , leaving.

Applications of scripts Scripts can be used to answer questions about particular situations. For example it would be easy to answer questions like Who brought the food, With what did the customer pay etc. They can be used to resolve referential ambiguities because each prop has a specific role.

Of the disadvantages of scripts the biggest problem is when two or more scripts are applicable to a given situation. Consider for example the text "John visited his favourite restaurant on the way to the concert. He was pleased by the bill because he liked Mozart" In this case which should take precedence a concert script or a restaurant script.

Ambiguity in Natural Language Exact meaning can still present problems because of the idiosyncratic ambiguities in English. For example the following text will present problems. "John was eating dinner at his favourite restaraunt when a large piece of plaster fell from the ceiling and landed on his date" Was the date on his plate or was he gazing into her eyes.