B. Ross Cosc 4f79 1 Frames Knowledge bases can be enhanced by using principles from frame knowledge representation (similar to object orientation) This.

Slides:



Advertisements
Similar presentations
Ontology-Based Computing Kenneth Baclawski Northeastern University and Jarg.
Advertisements

Expert System Seyed Hashem Davarpanah
When is Orientated Programming NOT? Mike Fitzpatrick.
B. Ross Cosc 4f79 1 Forward chaining backward chaining systems: take high-level goal, and prove it by reducing it to a null goal - to reduce it to null,
Classes & Objects Computer Science I Last updated 9/30/10.
Chapter 12: Expert Systems Design Examples
Applying Architectural Styles and Patterns. Outline  Defining Architectural Patterns and Style The activation model Styles and Quality Attributes  Common.
Programming Language Paradigms: summary. Object-oriented programming Objects are the fundamental building blocks of a program. Interaction is structured.
1 Programming for Engineers in Python Autumn Lecture 5: Object Oriented Programming.
Algorithms and Problem Solving-1 Algorithms and Problem Solving.
UML CASE Tool. ABSTRACT Domain analysis enables identifying families of applications and capturing their terminology in order to assist and guide system.
Production Rules Rule-Based Systems. 2 Production Rules Specify what you should do or what you could conclude in different situations. Specify what you.
Object-Oriented Databases
Data Abstraction and Object- Oriented Programming CS351 – Programming Paradigms.
ASP.NET Programming with C# and SQL Server First Edition
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
Sharif University of Technology Session # 7.  Contents  Systems Analysis and Design  Planning the approach  Asking questions and collecting data 
C++ fundamentals.
1 An introduction to design patterns Based on material produced by John Vlissides and Douglas C. Schmidt.
CSCI-383 Object-Oriented Programming & Design Lecture 15.
Expert Systems Expert systems are AI programs that solve a highly technical problem in some domain Expert systems are AI programs that solve a highly technical.
TCU CoSc Introduction to Programming (with Java) Getting to Know Java.
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.
Rule-Based Expert Systems. Expert Systems  Acknowledge that computers do not posses general knowledge (common sense)  Attempt to train computer in a.
O BJECT O RIENTATION F UNDAMENTALS Prepared by: Gunjan Chhabra.
B. Ross Cosc 4f79 1 Commercial tools Size of system: –small systems 400 rules single user, PC based –larger systems narrow, problem-type specific or hybrid.
Programming Paradigms
Database Design - Lecture 2
1 Classes and Controls CE-105 Spring 2007 By: Engr. Faisal ur Rehman.
Next-generation databases Active databases: when a particular event occurs and given conditions are satisfied then some actions are executed. An active.
Introduction CS 3358 Data Structures. What is Computer Science? Computer Science is the study of algorithms, including their  Formal and mathematical.
1 Introduction to Software Engineering Lecture 1.
ADTs and C++ Classes Classes and Members Constructors The header file and the implementation file Classes and Parameters Operator Overloading.
B. Ross Cosc 4f79 1 Inference mechanisms Backward chaining - goal-driven reasoning which gathers data as needed - Prolog's default mechanism - good for.
Requirements Engineering Methods for Requirements Engineering Lecture-30.
Data Structures Using C++ 2E1 Inheritance An “is-a” relationship –Example: “every employee is a person” Allows new class creation from existing classes.
C++ Programming Basic Learning Prepared By The Smartpath Information systems
Database Environment Chapter 2. Data Independence Sometimes the way data are physically organized depends on the requirements of the application. Result:
Object-Oriented Modeling: Static Models. Object-Oriented Modeling Model the system as interacting objects Model the system as interacting objects Match.
Introduction to c++ programming - object oriented programming concepts - Structured Vs OOP. Classes and objects - class definition - Objects - class scope.
Learners Support Publications Object Oriented Programming.
© 2006 Pearson Addison-Wesley. All rights reserved2-1 Chapter 2 Principles of Programming & Software Engineering.
© 2006 Pearson Addison-Wesley. All rights reserved 2-1 Chapter 2 Principles of Programming & Software Engineering.
Design Patterns Software Engineering CS 561. Last Time Introduced design patterns Abstraction-Occurrence General Hierarchy Player-Role.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Introduction to Object Oriented Programming (OOP) Object Oriented programming is method of programming.
Chapter 20 Concepts for Object-Oriented Databases Copyright © 2004 Pearson Education, Inc.
Artificial Intelligence
Lecture 5 Frames. Associative networks, rules or logic do not provide the ability to group facts into associated clusters or to associate relevant procedural.
EXPERT SYSTEMS GROUP F.
Structure A Data structure is a collection of variable which can be same or different types. You can refer to a structure as a single variable, and to.
Knowledge Engineering. Sources of Knowledge - Books - Journals - Manuals - Reports - Films - Databases - Pictures - Audio and Video Tapes - Flow Diagram.
 By the end of this lecture, you should …  Understand the three pillars of Object- Oriented Programming: Inheritance, Encapsulation and Polymorphism.
CPS120: Introduction to Computer Science Lecture 16A Object-Oriented Concepts.
16 April 2011 Alan, Edison, etc, Saturday.. Knowledge, Planning and Robotics 1.Knowledge 2.Types of knowledge 3.Representation of knowledge 4.Planning.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Chapter 12: Support for Object- Oriented Programming Lecture # 18.
CSCI 383 Object-Oriented Programming & Design Lecture 15 Martin van Bommel.
Concepts of Object Oriented Programming
The Movement To Objects
Design by Contract Jim Fawcett CSE784 – Software Studio
Design by Contract Jim Fawcett CSE784 – Software Studio
Architecture Components
Artificial Intelligence (CS 370D)
Knowledge Representation
Knowledge Representation and Inference
Object-Oriented Programming
KNOWLEDGE REPRESENTATION
Object-Oriented Programming
Agenda Software development (SD) & Software development methodologies (SDM) Orthogonal views of the software OOSD Methodology Why an Object Orientation?
C++ Object Oriented 1.
Presentation transcript:

B. Ross Cosc 4f79 1 Frames Knowledge bases can be enhanced by using principles from frame knowledge representation (similar to object orientation) This is advantageous, as it permits large and complex knowledge bases to be "smarter" -- essentially by implementing them as object-oriented databases. Object: formal structure which has variables which denotes its state and procedures which denote its behaviors Object-oriented programming: a style of programming where data and procedures are encapsulated into objects. They communicate by passing messages which invoke the encapsulating procedures. Slot: an attribute or property Facet: usually a value, but can be a default, constraint, description, or demon Demon: Rules or procedures activated under certain conditions, eg. when a slot value is being modified Frames: formal structure that contains an object's slots and facets

B. Ross Cosc 4f79 2 Frames Definitions (cont) Inheritance : Frames or objects can be organized into hierarchies such that members of classes can derive (inherit) slots and values from classes above them I will first show some code which implements three basic frame utilities: get_frame: retrieves attrobute values for a frame add_frame : adds or updates attribute values for a frame del_frame: deletes attribute values for a frame Then this frame framework will be incorporated into the Oops forward chaining system.

B. Ross Cosc 4f79 3 Frames (6.1)

B. Ross Cosc 4f79 4 Frames Data Structure p.101, 100

B. Ross Cosc 4f79 5 Frames 1. get_frame 6.2

B. Ross Cosc 4f79 6 Frames 102,103,104,105

B. Ross Cosc 4f79 7 Frames 106

B. Ross Cosc 4f79 8 Frames 2. add_frame 107,108

B. Ross Cosc 4f79 9 Frames 3. del_frame 109,110

B. Ross Cosc 4f79 10 Frames Example usage: 111,112

B. Ross Cosc 4f79 11 Comments Having a frame-based knowledge base means that it can be modified very easily. Frames forces a structure to the KB. Contrast this with the static KB's, for example, the first bird KB. Here, all the rules are "flat", and you can change any rule you like, which can have dire effects on the soundness of the whole KB. A frame KB, however, is arguably less "declarative", since frame directives introduce more implmentation-specific syntax and peculiarities.

B. Ross Cosc 4f79 12 Frame integration Oops: forward chaining expert system for furniture placement whole system implemented with productions - some rules did system-specific operations, such as input and output - these rules were messy - the rules in general were large and complicated, since they dealt with lots of descriptive facts about furniture which weren't directly related to rules about how to place furniture We can make this application much cleaner by: 1. Adding frames to represent items of furniture, walls, etc - these frames will contain descriptive facts 2. Adding hooks to Prolog routines to do I / O, rather than in productions 3. Use production rules exclusively for placing furniture in room.

B. Ross Cosc 4f79 13 Frame integration p. 133

B. Ross Cosc 4f79 14 Frame integration p.120

B. Ross Cosc 4f79 15 Frame integration 1. Integrating frames incorporate frame classes (like before) and frame instances, which are previous frames, but with - class name - instance (object) name - slot-attribute value pair list - time stamp (used for enhanced forward-chaining strategies) fancier frame format: Class - Name with [Attr-Val, Attr-Val,... ] typical rule: rule f11: [ table_lamp - TL with [ position-none ], end_table - ET with [ position-wall/W]] ==> [ update(table_lamp-TL with [ position-end_table/ET] )].

B. Ross Cosc 4f79 16 Frame integration 2. Prolog hooks add production actions test { LHS } and take { RHS } which refer to Prolog routines inference engine will call these Prolog utilities directly p.125-6

B. Ross Cosc 4f79 17 Frame integration 3. Productions We will describe furniture items and walls with frame instances. This permits the knowledge base to deal exclusively with rules for placing furniture in a room p furniture frames:

B. Ross Cosc 4f79 18 Frame integration furniture frames

B. Ross Cosc 4f79 19 Frame integration frame demons: called by frames to do specific actions initial data p.125

B. Ross Cosc 4f79 20 Frame integration frame rules p. 129

B. Ross Cosc 4f79 21 Frame integration Conclusion: As with most non-trivial software systems, a mixture of techniques can provide the clearest solution. This Foops system is a sophisticated shell - inference uses efficiency techniques such as specificity, time stamps,... - the frame component can be used for programming applications - hooks to general Prolog means that rules and frames are not burdened with system code - Prolog's adaptive syntax means that prettier rule formats are trivial to derive (Try doing that in any other language!)