Knowledge representation 2. Knowledge Representation using structured objects.

Slides:



Advertisements
Similar presentations
CSM6120 Introduction to Intelligent Systems Knowledge Representation 2.
Advertisements

Frame-based expert systems
Knowledge Representation
Intelligent systems Lection 7 Frames, selection of knowledge representation, its combinations.
Frame-Based Expert Systems
Frame Based Expert System
Semantic Nets, Frames, World Representation. Knowledge Representation as a medium for human expression An intelligent system must have KRs that can be.
Knowledge Representation (Introduction)
CSM6120 Introduction to Intelligent Systems Knowledge representation.
Intelligent systems Lecture 6 Rules, Semantic nets.
 Contrary to the beliefs of early workers in AI, experience has shown that Intelligent Systems cannot achieve anything useful unless they contain a large.
©Ian Sommerville 2006Software Engineering, 8th edition. Chapter 8 Slide 1 System models.
Basic Scientific Writing in English Lecture 3 Professor Ralph Kirby Faculty of Life Sciences Extension 7323 Room B322.
Frame-based expert systems
Objects Objects are at the heart of the Object Oriented Paradigm What is an object?
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
Modeling System Requirements:
1 A Student Guide to Object- Orientated Systems Chapter 4 Objects and Classes: the basic concepts.
OBJECT AND CLASES: THE BASIC CONCEPTS Pertemuan 8 Matakuliah: Konsep object-oriented Tahun: 2009.
©Ian Sommerville 2000 Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions of systems whose requirements are being.
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.
المحاضرة الثالثة. Software Requirements Topics covered Functional and non-functional requirements User requirements System requirements Interface specification.
Copyright © 2013 Curt Hill The Zachman Framework What is it all about?
Artificial Intelligence 4. Knowledge Representation Course V231 Department of Computing Imperial College, London © Simon Colton.
©Ian Sommerville 1995/2000 (Modified by Spiros Mancoridis 1999) Software Engineering, 6th edition. Chapter 7 Slide 1 System models l Abstract descriptions.
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.
Chapter 7 System models.
Software Development Process.  You should already know that any computer system is made up of hardware and software.  The term hardware is fairly easy.
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.
Black Box Testing Techniques Chapter 7. Black Box Testing Techniques Prepared by: Kris C. Calpotura, CoE, MSME, MIT  Introduction Introduction  Equivalence.
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.
Intermediate 2 Software Development Process. Software You should already know that any computer system is made up of hardware and software. The term hardware.
UML Class Diagram Trisha Cummings. What we will be covering What is a Class Diagram? Essential Elements of a UML Class Diagram UML Packages Logical Distribution.
Artificial Intelligence Chapter 18. Representing Commonsense Knowledge.
Semantic web course – Computer Engineering Department – Sharif Univ. of Technology – Fall Knowledge Representation Semantic Web - Fall 2005 Computer.
Introduction to Earth Science Section 2 Section 2: Science as a Process Preview Key Ideas Behavior of Natural Systems Scientific Methods Scientific Measurements.
Semantic Nets, Frames, World Representation CS – W February, 2004.
Object Oriented Analysis: Associations. 2 Object Oriented Modeling BUAD/American University Class Relationships u Classes have relationships between each.
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?
Winter 2011SEG Chapter 11 Chapter 1 (Part 1) Review from previous courses Subject 1: The Software Development Process.
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.
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.
Data Models. 2 The Importance of Data Models Data models –Relatively simple representations, usually graphical, of complex real-world data structures.
Knowledge Engineering. Sources of Knowledge - Books - Journals - Manuals - Reports - Films - Databases - Pictures - Audio and Video Tapes - Flow Diagram.
The Law of Averages. What does the law of average say? We know that, from the definition of probability, in the long run the frequency of some event will.
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.
5 Systems Analysis and Design in a Changing World, Fourth Edition.
5 Chapter 5: Modeling Systems Requirements: Events and Things Systems Analysis and Design in a Changing World.
Artificial Intelligence 4. Knowledge Representation
Knowledge Representation
Knowledge Representation Techniques
Analysis Classes Unit 5.
Glossary of Terms Used in Science Papers AS
Knowledge Representation
CS 641 – Requirements Engineering
CS 641 – Requirements Engineering
Knowledge Representation
Abstract descriptions of systems whose requirements are being analysed
KNOWLEDGE REPRESENTATION
Knowledge Representation
Semantic Nets and Frames
Presentation transcript:

Knowledge representation 2

Knowledge Representation using structured objects

Semantic nets

l knowledge is represented as a collection of concepts, represented by nodes (shown as boxes in the diagram), connected together by relationships, represented by arcs (shown as arrows in the diagram). l certain arcs - particularly isa arcs - allow inheritance of properties.

Semantic nets l Problems with semantic nets n logical inadequacy - vagueness about what types and tokens really mean. n heuristic inadequacy – finding a specific piece of information could be chronically inefficient. n trying to establish negation is likely to lead to a combinatorial explosion. n "spreading activation" search is very inefficient, because it is not knowledge- guided.

Semantic nets l Attempted improvements n building search heuristics into the network. n more sophisticated logical structure, involving partitioning. n these improvements meant that the formalism’s original simplicity was lost.

Semantic nets l Developments of the semantic nets idea: n psychological research into whether human memory really was organised in this way. n used in the knowledge bases in certain expert systems: e.g. PROSPECTOR. n special-purpose languages have been written to express knowledge in semantic nets.

Knowledge Representation using structured objects Frames

l Devised by Marvin Minsky, l Incorporates certain valuable human thinking characteristics: n Expectations, assumptions, stereotypes. Exceptions. Fuzzy boundaries between classes. l The essence of this form of knowledge representation is typicality, with exceptions, rather than definition.

Frames l The idea of frame hierarchies is very similar to the idea of class hierarchies found in object-orientated programming.

How frames are organised l A frame system is a hierarchy of frames l Each frame has: n a name. n slots: these are the properties of the entity that has the name, and they have values. A particular value may be: u a default value u an inherited value from a higher frame u a procedure, called a daemon, to find a value u a specific value, which might represent an exception.

How frames are organised l In the higher levels of the frame hierarchy, typical knowledge about the class is stored. n The value in a slot may be a range or a condition. l In the lower levels, the value in a slot may be a specific value, to overwrite the value which would otherwise be inherited from a higher frame.

How frames are organised l An instance of an object is joined to its class by an 'instance_of' relationship. l A class is joined to its superclass by a 'subclass_of' relationship. l Frames may contain both procedural and declarative knowledge. n Slot values normally amount to declarative knowledge, but a daemon is in effect a small program. So a slot with a daemon in it amounts to procedural knowledge.

How frames are organised l Note that a frames system may allow multiple inheritance but, if it does so, it must make provision for cases when inherited values conflict.

Frames: some examples l The following is an exploration of Minsky's frames, using simple examples. l Note that this is not exactly the way Minsky described frames in his original paper, but it is the way the idea has come to be used in practice.

Frames: some examples l First I provide a verbal description of some concept; l then I show a diagram representing the resulting frame; l beside this is a bit of programming which implements this frame in a suitable knowledge representation programming language - in this case, the MIKE package written by knowledge engineering specialists at the Open University.

Frames: some examples l We will start with a simple piece of information: there is a category of things called cars. l Given this information, we can start to build a frame:

Name: car Subclass of: thing

l More information: a car has 4 wheels, is moved by an engine, and runs on petrol or diesel. l We can now add three slots to the frame. l The last of these has a restriction rather than a specific value.

Name: car Subclass of: thing Slots: Name: Value: Restrictions: car subclass_of thing with wheels: 4, moved_by: engine, fuel: [value: unknown, type: [petrol,diesel]]. wheels 4 moved by engine fuel ?petrol or diesel “a car has 4 wheels, is moved by an engine, and runs on petrol or diesel.”

l More information: there is a particular type of car called a VW, manufactured in Germany. l We can add a second frame to our system, with one slot. We don’t need to repeat the slots and values in the previous frame: they will be inherited.

Name: VW Subclass of: car Slots: Name: Value: Restrictions: ‘VW’ subclass_of car with made_in: ‘Germany’. made in Germany “there is a particular type of car called a VW, manufactured in Germany. ”

l More information: there is a particular type of VW called a Golf, which has a sun-roof. l We can add a third frame to our system, with one slot. Once again, we don’t repeat the slots in the previous frames, because they will be inherited.

Name: Golf Subclass of: VW Slots: Name: Value: Restrictions: ‘Golf’ subclass_of VW with top: sunroof. top sunroof “there is a particular type of VW called a Golf, which has a sunroof.”

l More information: there is a particular type of Golf called a TDi, which runs on diesel. A TDi has 4 cylinders, and an engine capacity of 1.8 litres. l We can add a fourth frame to our system, with three slots. One of the slots (fuel) was already in the system, but appears here because it now has a specific value rather than a restriction.

Name: TDi Subclass of: Golf Slots: Name: Value: Restrictions: ‘TDi’ subclass_of ‘Golf’ with fuel: diesel, engine_capacity: 1.8, cylinders: 4. fuel diesel engine capacity 1.8 litres cylinders 4 “there is a particular type of Golf called a TDi, which runs on diesel, has 4 cylinders, and has a 1.8 litre engine.”

l More information: my car, called C637SRK, is a Golf Tdi. It hasn’t got a sun-roof. l We can add a fifth frame to our system, with two slots. Unlike all the previous frames, this one is an instance frame. One of the slots (top) was already in the system, but appears here because the value contradicts (overwrites) the value which would otherwise be inherited.

Name: C637SRK Instance of: TDi Slots: Name: Value: Restrictions: ‘C637SRK’ instance_of ‘TDi’ with owner: jp, top: no_sun_roof. owner jp top no sun-roof “There is a car called C637SRK which is an instance of a Golf TDi etc.”

l More information: to calculate a car’s cylinder size, you divide the total engine capacity by the number of cylinders. l We can now add another slot to the car frame. It’s a daemon, which discovers the information required, if the user asks what the value in the slot is.

Name: car Subclass of: thing Slots: Name: Value: Restrictions: car subclass_of thing with wheels: 4, moved_by: engine, fuel: [value: unknown, type: [petrol,diesel]], cylinder_size: [value: unknown, access_rule: (if the engine_capacity of ?self is E & the cylinders of ?self is C & Ans := E/C then make_value Ans)]. wheels 4 moved by engine fuel ?petrol or diesel. cylinder size ?find total engine capacity, find no.of cylinders, divide first by second. “to calculate a car’s cylinder size, you divide the total engine capacity by the number of cylinders.”

Knowledge Representation using structured objects Other varieties of structured object

l Knowledge representation researchers - particularly Roger Schank and his associates - devised some interesting variations on the theme of structured objects. l In particular, they invented the idea of scripts (1973). l A script is a description of a class of events in terms of contexts, participants, and sub-events.

Scripts l Rather similar to frames: uses inheritance and slots; describes stereotypical knowledge, (i.e. if the system isn't told some detail of what's going on, it assumes the "default" information is true), but concerned with events. l Somewhat out of the mainstream of expert systems work. More a development of natural-language-processing research.

Scripts l Why represent knowledge in this way? n Because real-world events do follow stereotyped patterns. Human beings use previous experiences to understand verbal accounts; computers can use scripts instead. n Because people, when relating events, do leave large amounts of assumed detail out of their accounts. People don't find it easy to converse with a system that can't fill in missing conversational detail.

Scripts l Scripts predict unobserved events. l Scripts can build a coherent account from disjointed observations.

Scripts l Commercial applications of script-like structured objects: work on the basis that a conversation between two people on a pre- defined subject will follow a predictable course. l Certain items of information need to be exchanged. n Others can be left unsaid (because both people know what the usual answer would be, or can deduce it from what's been said already), unless (on this occasion) it's an unusual answer.

Scripts l This sort of knowledge representation has been used in intelligent front-ends, for systems whose users are not computer specialists. l It has been employed in story- understanding and news-report- understanding systems.

Conceptual graphs l In 1984, John Sowa published his conceptual graph approach. l This is something like the semantic net approach described earlier. l It is more sophisticated in the way in which it represents concepts l It is much more precise regarding what the objects in the graphs mean in real- world terms.

Knowledge Representation using structured objects Practical applications

KBSs using structured objects l Two more examples of KBSs using structured objects for knowledge representation

Explorer l Explorer is a natural-language interface for a database relating to oil-wells: l Contains geological knowledge, organised as structured objects. l Interfaced to a graphics package that can draw oil-exploration maps. l The geologist can converse with the program in unconstrained natural language, and in geological jargon.

Bank customer advisory system l Bank customer advisory system: l Advises customer on opening a bank account, based on customer's needs/characteristics. This is a task that can consume a lot of the bank staff's time. l Deduces customer's intended meaning. l Does not annoy customer by asking for every detail; uses its knowledge about people to deduce what the answers must be.

Knowledge Representation using structured objects The CYC project

The CYC Project l A very large scale commercial research project designed to represent a large body of common-sense knowledge. l Headed by Lenat and Guha, and based in Austin, Texas l Has been making steady progress since 1984

The CYC Project l It now ‘knows’ a huge collection of fragments of real-world knowledge such as: n Mothers are older than their children. n You have to be awake to eat. n You can usually know people’s noses, but not their hearts. n If you cut a lump of peanut butter in half, each half is a lump of peanut butter, but if you cut a table in half, neither half is a table.

The CYC Project l The ultimate objective is to give it enough knowledge to understand ordinary books, so that it can read them and expand its own knowledge. l So far, it’s got to a stage where, when asked to find photos of “risky activities”, it located photos of people climbing mountains and doing white-water rafting.

Knowledge Representation using structured objects Final comments

Structured objects: final comments l A knowledge-representation system with property inheritance should make a distinction between essential properties ('universal truths') and accidental properties. n Some don't: some allow unrestrained overwriting of inherited properties. n It's possible to generate incoherent structures in any of these systems. n It's particularly easy when multiple inheritance is involved.

Structured objects: final comments l At best, structured objects provide data & control structures which are more flexible than those in conventional languages, and so more suited to simulating human reasoning.