Specification and Knowledge Representation

Slides:



Advertisements
Similar presentations
1 Knowledge Representation Introduction KR and Logic.
Advertisements

ARCHITECTURES FOR ARTIFICIAL INTELLIGENCE SYSTEMS
Problem Solving Well-formed predicate calculus expressions provide a means of describing objects and relations in a problem domain and inference rule.
Knowledge Representation
Intelligent systems Lection 7 Frames, selection of knowledge representation, its combinations.
CPSC 322 Introduction to Artificial Intelligence November 5, 2004.
1 Knowledge Representation We’ve discussed generic search techniques. Usually we start out with a generic technique and enhance it to take advantage of.
Intelligent systems Lecture 6 Rules, Semantic nets.
Rule Based Systems Michael J. Watts
Objects Objects are at the heart of the Object Oriented Paradigm What is an object?
Knowledge representation methods جلسه سوم. KR is AI bottleneck The most important ingredient in any expert system is knowledge. The power of expert systems.
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.
Knowledge representation
Artificial Intelligence 4. Knowledge Representation Course V231 Department of Computing Imperial College, London © Simon Colton.
Semantic web course – Computer Engineering Department – Sharif Univ. of Technology – Fall Knowledge Representation Semantic Web - Fall 2005 Computer.
Semantic Nets, Frames, World Representation CS – W February, 2004.
Knowledge Representation
Testing OO software. State Based Testing State machine: implementation-independent specification (model) of the dynamic behaviour of the system State:
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.
Onlinedeeneislam.blogspot.com1 Design and Analysis of Algorithms Slide # 1 Download From
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.
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.
Databases and Database User ch1 Define Database? A database is a collection of related data.1 By data, we mean known facts that can be recorded and that.
Artificial Intelligence 4. Knowledge Representation
Introduction to DBMS Purpose of Database Systems View of Data
Knowledge Representation & Logic
Advanced Computer Systems
Knowledge Representation
Knowledge Representation Techniques
By P. S. Suryateja Asst. Professor, CSE Vishnu Institute of Technology
What is cognitive psychology?
CHAPTER 1 Introduction BIC 3337 EXPERT SYSTEM.
Knowledge Representation
Graph Coverage for Specifications CS 4501 / 6501 Software Testing
Abstract descriptions of systems whose requirements are being analysed
Knowledge Representation
Artificial Intelligence (CS 370D)
Knowledge Representation
Strong Slot-and-Filler Structures
Computer Programming.
Object-Oriented Analysis
Introduction to Database Systems
Chapter 2 Database Environment Pearson Education © 2009.
Chapter 2 Database Environment.
Analysis and Understanding
Issues in Knowledge Representation
Developing and Evaluating Theories of Behavior
Knowledge Representation and Inference
Multiple Aspect Modeling of the Synchronous Language Signal
Chapter 20 Object-Oriented Analysis and Design
Strong Slot-and-Filler Structures
CIS 488/588 Bruce R. Maxim UM-Dearborn
KNOWLEDGE REPRESENTATION
Introduction to DBMS Purpose of Database Systems View of Data
Weak Slot-and-Filler Structures
Introduction to Data Structure
Knowledge Representation
Semantic Nets and Frames
Chapter 5 Architectural Design.
Chapter 4 System Modeling.
Structured Knowledge Representation
Chapter 2 Database Environment Pearson Education © 2009.
Subject : Artificial Intelligence
Presentation transcript:

Specification and Knowledge Representation CIS 488/588 Bruce R. Maxim UM-Dearborn 11/16/2018

Specification Seeks to find a way to represent the analysis concepts using formal notation or data structures Dealing with specification explicitly is a huge advantage when AI needs to be scaled up 11/16/2018

Procedural View of AI Consider the AI as a single procedure that needs to be passed information to return results or produce outputs In C++ prototypes are used to describe function interfaces which describe the relationships among variables external to the function At the end of the specification phase, an interface or scaffold is defined to describe how the AI fits into the rest of the system 11/16/2018

Types of Knowledge Objects Events Performance META Knowledge both physical & concepts Events usually involve time maybe cause & effect relationships Performance how to do things META Knowledge knowledge about how to use knowledge 11/16/2018

Stages of Knowledge Use - 1 Acquisition structure of facts integration of old & new knowledge Retrieval (recall) roles of linking and chunking means of improving recall efficiency 11/16/2018

Stages of Knowledge Use - 2 Reasoning Formal reasoning deductive theorem proving Procedural Reasoning expert system Reasoning by Analogy very hard for machines Generalization reasoning from examples Abstraction simplification 11/16/2018

Knowledge Representation Theory for expressing information in computer systems The task of defining an interface is essentially KR How should information passed to AI modules be encoded? 11/16/2018

Representation Set of syntactic and semantic conventions which make it possible to describe things Syntax specific symbols allowed and rules allowed Semantics how meaning is associated with symbol arrangements allowed by syntax 11/16/2018

Knowledge Representation Issues Grain size or resolution detail Scope or domain Modularity Understandability Explicit versus implicit knowledge Procedural versus declarative knowledge 11/16/2018

Advantages Procedural representation Declarative representations Easy to represent "how to do things" Easy to represent any knowledge not fitting declarative format Relatively easy to implement heuristic stuff on doing thing efficiently Declarative representations Store each fact once Easy to add new facts 11/16/2018

Good Knowledge Representations Important things made clear /explicit Expose natural constraints Must be complete Are concise Transparent (easily understood) Information can be retrieved & stored quickly Detail suppressed (can be found as needed) Computable using existing procedures 11/16/2018

River Puzzle Problem Constraints There are four items a farmer, wolf, goose, and corn. The farmer can only take one item across the river at a time. Constraints Wolf will eat the goose if left alone with it Goose will eat the corn if left alone with it 11/16/2018

F=Farmer W=Wolf G=Goose C=Corn ~=River W F ~ W F G F W F G ~ G F ~ W C W C C ~ G F G ~ C F ~ W C F ~ C F W W G ~ G G ~ G C C C F C W ~ G W 11/16/2018

Solution Once graph is constructed finding solution is easy (simply find a path) AI programs would rarely construct the entire graph explicitly before searching AI programs would generate nodes as needed and restrict the path search to the nodes generated May use forward reasoning (initial to goal) or backward reasoning (goal to initial) 11/16/2018

State Space Representation How can individual objects and facts be represented? How do you combine individual object descriptions to form a representation of the complete problem state? How can the sequences of problem states that arise be represented efficiently? 11/16/2018

Attributes of Good KR Schemes -1 Representational Adequacy works for all knowledge in problem domain Inferential Adequacy provides ability to manipulate structures to desire new structures ability to incorporate additional information in knowledge structures to help focus attention of promising new directions 11/16/2018

Attributes of Good KR Schemes - 2 Acquisitional Efficiency easy to add new knowledge Semantic Power Supports truth theory Provides for constraint satisfaction Can cope with incomplete or uncertain knowledge Contains some commonsense reasoning capability 11/16/2018

KR Languages - 1 Provide means for formalizing representation Expressiveness How well language represents knowledge in general Information can expressed in notational (explicit) form or inferential (deduced from existing knowledge) form 11/16/2018

KR Languages - 2 Efficiency tradeoffs Disk storage limits the use of notational forms Computational power limits the use of highly inferential forms Inference support as basis for understanding Well-defined syntax (sentence structure) Well-defined semantics (sentence meanings) 11/16/2018

KR Language Attributes - 1 Consistent Guarantees that statements are valid and conclusions drawn by systems are sound Complete How well does the language express the required knowledge? Extensible How easy is it to customize to particular problems? 11/16/2018

KR Language Attributes - 2 Natural Easy to understand by humans (esp. domain experts) Easy for humans to write when communicating with the computer There is a strong link between reasoning and representation However, most KR formalisms can be converted from one to another 11/16/2018

Representation Types Symbols Object-Attribute-Value (OAV) Relational databases Constraints Predicate logic Concept hierarchies Semantic networks Frames Scripts 11/16/2018

Symbols Facts can be stored as text strings or numbers This scheme can be implemented using any standard programming data types The disadvantage is that every concept needs its own variable Examples: [left_obstacle_distance 4.0] [right_obstacle “unknown”] 11/16/2018

OAV Objects or concepts can have multiple variables associated with them Implemented as C structs, C++ classes, Lisp property lists, Prolog predicates, database records,hash tables Generally notated as A(O,V) Examples: distance(left_obstacle,4.0) presence(right_obstacle,”unknown”) 11/16/2018

Semantic Networks A declarative representation in which complex entities are described as collections of attributes and associated values Sometimes called a “slot and filler” type structure To assist in their implementation AI languages provide some type of associative memory in which object can be stored as OAV triples 11/16/2018

Decomposition Most complex sets of objects can be decomposed into smaller subsets These decompositions often contain two types of relations “isa” and “ispart” dog isa pet isa animal isa living thing finger ispart hand ispart body 11/16/2018

Inverse Relations Sometimes it is also useful to define inverse relationships “ako” (a kind of) as inverse of “isa” “haspart” as inverse of “ispart” dog ako pet ako animal ako living thing finger haspart hand haspart body 11/16/2018

Animal Hierarchy 11/16/2018

Inheritance These relations form a partial ordering of the network This allows us to use transitivity relations to aid in search Storage of information is more efficient since inheritance can be used to “copy” information from a class to its subclasses 11/16/2018

Inheritance 11/16/2018

Value Inheritance Form a queue consisting of node F and all class nodes found in F’s “isa” slot Until queue is empty or value found if queue front has value in slot S then value found else remove first queue element and add nodes related by “isa” slot If value found then report value found in slot S announce failure. 11/16/2018

Semantic Nets How do semantic networks differ from ordinary directed graphs? In semantic networks there must be some underlying meeting associated with the representation (especially the edge or link labels) 11/16/2018

Semantic Network feathers wings bird eagle falcon has has isa isa 11/16/2018

Semantic Nets in C++ 1. bird 2. falcon 3. eagle 4. wings 5.feathers has 2.falcon isa 3.eagle 4.wings 11/16/2018

Problems with Semantic Nets When do you have enough semantic primitives? How do you know the selected primitives are correct? What is the smallest number of link types needed to span all human knowledge? How do you represent quantified knowledge? 11/16/2018

Frames Can be looked at as being similar to a “pre-defined” semantic network Frames contain information that can be used even if not observed Frames contain attributes true of all instances of object or events Frames contain stereotypical instances of objects or events 11/16/2018

Frame Attributes Based on stereotypes Slot & filler type static representation Make use of procedural attachment (demons) to fill in missing values Allow us to use current explanation provided by frame until the “current view” is proven to be incorrect 11/16/2018

How are frame used? People may select a frame from a list of proposed frames candidates based on a small amount of partial evidence (e.g. bigot) The attributes of a selected frame are instantiated with observed attributes from the current object or event description 11/16/2018

How are frame used? As values for slots are found they are copied to the evolving frame description If slot values cannot be found or begin to contradict slot constraints a new frame candidate may need to be selected You may also need to be alert for changes in the object or event while the frame is being instantiated 11/16/2018

What happens when frame instantiation fails? You may be able to follow pre-defined links between frames in a frame system bench table no back, too big no back, too wide drawers chair no back, too high desk stool dresser no kneehole 11/16/2018

What happens when frame instantiation fails? Another option is to follow the inheritance links in the hierarchical structure formed by the frames (e.g. dog  mammal  animal) until a sufficiently “general” frame that does not conflict with the evidence is found 11/16/2018

Problems with Frames Frames are not very frame-like (e.g. there are more atypical mammals than typical mammals) Definitions are more important than most people think Cancellation of default properties is very a tricky business 11/16/2018

Scripts If frames can be viewed as using semantic networks to structure static information Scripts can be viewed as using a series of related frames to represent dynamic information as a sequence a stereotypic events from a some context 11/16/2018

Script Attributes Entry conditions Result Props Roles Track Scenes When does the script apply? Result What will be true once script is completed Props Roles Track Variation or specialization of usual script pattern Scenes Actual event sequences 11/16/2018

Restaurant Script Track: Coffee Shop Props: Tables, menu, food (F), check, money Roles: Customer (S), waiter (W), cook (C), casher (M), owner (O) Entry conditions: S is hungry, S has money Results: S has less money, O has more money, S not hungry, S happy (optional) 11/16/2018

Scripts Are useful because they record patterns of the occurrence of events from the real world These patterns are based on causal relationships between events (e.g. agents perform one action to be able to perform another action) The sequence of script events define a causal chain that will facilitate reasoning about unobserved events 11/16/2018

Scripts Can be used in question answering program (e.g. story comprehension) Why did a waiter bring John a menu? Scripts can also help to focus attention on unusual events as script departures John went to a restaurant, was shown to a table, ordered a large steak waited for a long time, got angry, and left. Why did John get angry? 11/16/2018

Scripts When a script is known to be appropriate to a given situation it can be used to predicate the occurrence of future events Example: I went to a restaurant, ordered food, paid my bill, and left Did I eat? 11/16/2018

Strengths of Scripts Can be used to predicate events and answer questions Provide a framework for integrating observations into a coherent interpretation Scripts provide scheme for detecting unusual events 11/16/2018

Weaknesses of Scripts Less general than frames so not appropriate for some knowledge types If scripts can only account for all details in a restricted domain It is unlikely that scripts can account for every real life scenario 11/16/2018

Introspection For KR formalisms to have any impact they need to be implemented in such a way as to allow introspection Introspection means that the AI is allowed to query knowledge properties dynamically This may require the use of extra variables or data structures that can be examined during active game play 11/16/2018

Specification Phases Sketching Rationalization Typical brainstorming activity Ideas are collected and described informally Rationalization Ideas are checked for consistency with existing requirements Valid ideas are formalized by converting the sketch into some KR The KR is checked for consistency with requirements 11/16/2018

Role of Sketching - 1 Context Input What goes on behind the interfaces that allows the problem to be solved? Which variables are involved and how can their complexity be minimized? Input Select relevant inputs by asking “what info does human use in this case? What problem variables for a programmer to solve this problem? 11/16/2018

Role of Sketching - 2 Output How can a problem be decomposed into a sequence of actions? 11/16/2018

Inspiration Where do the idea for sketching come from? Research (journals and conference proceedings) Reading (look for developer reviews and game postmortems) Relative work (look for open source projects to examine) Borrowing idea (look for things that work in other domains) 11/16/2018

Formalizing Involves selecting a KR language Determining data structures needed to implement the KR in the target programming language Outputs are often easier to formalize than inputs (do this first) Failing to create good formalisms for inputs is a frequent cause of failures later The supporting variables from the context are often defined abstractly (they can be done last) 11/16/2018

Rationalizing Does each model allow case studies to be satisfied and do they match the informal requirements? How does model affect other requirements? (e.g. HW and SW) Is the specification consistent with the rest of the design (interfaces and hierarchical dependencies)? Are the interfaces flexible enough to handle all propose, applicable implementations? 11/16/2018

Specification Benefits High-level understanding Separates implementation and design, allowing focus to be on architecture rather than programming Abstraction Only need to be concerned with module inputs and outputs Comparison If interface remains constant alternative prototype implementations can be investigated 11/16/2018

Sir Tank Uses straight forward reactive behaviors to bounce off of obstacles Sir Tank’s behavior does not take orientation into account This allows movement to be separated from other capabilities such as aiming 11/16/2018