Download presentation
Presentation is loading. Please wait.
Published byKelly May Modified over 9 years ago
1
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 1 CS 8520: Artificial Intelligence Knowledge Representation Paula Matuszek Fall, 2005
2
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 2 KR Introduction General problem in Computer Science Solutions = Data Structures –words –arrays –records –list More specific problem in AI Solutions = knowledge structures –lists –trees –procedural representations –logic and predicate calculus –rules –semantic nets and frames –scripts
3
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 3 Kinds of Knowledge Objects –Descriptions –Classifications Events –Time sequence –Cause and effect Relationships –Among objects –Between objects and events Meta-knowledge Things we need to talk about and reason about; what do we know? Distinguish between knowledge and its representation Mappings are not one-to-one Never get it complete or exactly right
4
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 4 Types of Knowledge a priori knowledge –comes before knowledge perceived through senses –considered to be universally true a posteriori knowledge –knowledge verifiable through the senses –may not always be reliable procedural knowledge –knowing how to do something declarative knowledge –knowing that something is true or false tacit knowledge –knowledge not easily expressed by language
5
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 5 Characteristics of a good KR: It should –Be able to represent the knowledge important to the problem –Reflect the structure of knowledge in the domain Otherwise our development is a constant process of distorting things to make them fit. –Capture knowledge at the appropriate level of granularity –Support incremental, iterative development It should not –Be too difficult to reason about –Require that more knowledge be represented than is needed to solve the problem
6
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 6 Structured Knowledge Representations Modeling-based representations reflect the structure of the domain, and then reason based on the model. –Semantic Nets –Frames –Scripts Sometimes called associative networks
7
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 7 Basics of Associative Networks All include –Concepts –Various kinds of links between concepts “has-part” or aggregation “is-a” or specialization More specialized depending on domain Typically also include –Inheritance –Some kind of procedural attachment
8
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 8 Semantic Nets ugraphical representation for propositional information uoriginally developed by M. R. Quillian as a model for human memory ulabeled, directed graph unodes represent objects, concepts, or situations ulabels indicate the name unodes can be instances (individual objects) or classes (generic nodes) ulinks represent relationships uthe relationships contain the structural information of the knowledge to be represented uthe label indicates the type of the relationship
9
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 9 Semantic Nets Components Nodes or Concepts Arcs or Links Inheritance Generic (class) and Individual (object) Constraints, procedural attachments Nodes –“things” or “objects” or “concepts”. Typically a demonstrative entity, a noun. –E.g., ship, computer, day, dream Arcs –relationships. Typically a few types expressing important relationships among nodes. The type carries semantic information. –E.g., is_a, has_part, provides_power_to, agent
10
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 10 Semantic Net Examples Ship Hull Propulsion Steamboat HasA InstanceOf giveBob Candy Mary Person agent recipient object Instance
11
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 11 Generic / Individual Generic describes the idea--the “notion” –static Individual or instance describes a real entity –must conform to notion of generic –dynamic –“individuate” or “instantiate” Some representations distinguish two kinds of links: –Instance Of: instance level relationship –A Kind Of: class level relationship ISA can mean either, depending on whose terminology you are following .
12
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 12 Individuation example givePerson Thing Person agent recipient object giveBob Candy Mary agent recipient object Generic Representation Process the sentence “Bob gave Mary some candy”. Instantiation
13
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 13 Procedural Attachments, Constraints Procedural Attachments –Add heuristics –Associated with either nodes or links Constraints –maintain “definitional” flavor or nets –associated with links –typically constrain a concept in some way compared to its parents: size, type, number –May invoke a procedural attachment
14
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 14 Semantic Net Example Gaul Astérix Obélix Idéfix Dog Abraracourcix Panoramix Ordralfabetix Cétautomatix is-a barks-at takes-care- of is-friend-of is-boss-of fights-with sells-to buys-from lives- with Human AKO
15
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 15 Semantic Net Example
16
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 16 Relationships without relationships, knowledge is an unrelated collection of facts –reasoning about these facts is not very interesting relationships express structure in the collection of facts –this allows the generation of meaningful new knowledge generation of new facts generation of new relationships
17
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 17 Types of Relationships relationships can be arbitrarily defined by the knowledge engineer –allows great flexibility –for reasoning, the inference mechanism must know how relationships can be used to generate new knowledge inference methods may have to be specified for every relationship frequently used relationships –IS-A relates an instance (individual node) to a class (generic node) –AKO (a-kind-of) relates one class (subclass) to another class (superclass)
18
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 18 Inheritance Inheritance is the duplication of a concept’s relationships by its descendents. –Typically follows specialization hierarchy. –Not all relationships are inherited In semantic nets, inherited relationships may be further constrained but are not typically overridden. –Mammals have hair. A whale is a mammal. We can’t say whales don’t have hair, but we can further constrain it to say that they have very sparse hair. Efficient for creation, maintenance and storage Inefficient for reasoning
19
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 19 Schemata usuitable for the representation of complex knowledge ucausal relationships between a percept or action and its outcome unodes can have an internal structure ufor humans often tacit knowledge urelated to the notion of records in computer science
20
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 20 Concept Schema uabstraction that captures general/typical properties of objects uhas the most important properties that one usually associates with an object of that type umay be dependent on task, context, background and capabilities of the user, … usimilar to stereotypes umakes reasoning simpler by concentrating on the essential aspects umay still require relationship-specific inference methods
21
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 21 Schema Examples the most frequently used instances of schemata are –frames [Minsky 1975] –scripts [Schank 1977] frames consist of a group of slots and fillers to define a stereotypical objects scripts are time-ordered sequences of frames
22
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 22 Frame urepresents related knowledge about a subject uprovides default values for most slots uframes are organized hierarchically uallows the use of inheritance uknowledge is usually organized according to cause and effect relationships uslots can contain all kinds of items urules, facts, images, video, comments, debugging info, questions, hypotheses, other frames uslots can also have procedural attachments uprocedures that are invoked in specific situations involving a particular slot uon creation, modification, removal of the slot value
23
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 23 Simple Frame Example Slot NameFiller nameAstérix heightsmall weightlow professionwarrior armorhelmet intelligencevery high marital statuspresumed single
24
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 24 Overview of Frame Structure two basic elements: slots and facets (fillers, values, etc.); typically have parent and offspring slots –used to establish a property inheritance hierarchy (e.g., specialization-of) descriptive slots –contain declarative information or data (static knowledge) procedural attachments –contain functions which can direct the reasoning process (dynamic knowledge) (e.g., "activate a certain rule if a value exceeds a given level") data-driven, event-driven ( bottom-up reasoning) expectation-drive or top-down reasoning pointers to related frames/scripts - can be used to transfer control to a more appropriate frame [Rogers 1999]
25
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 25 Slots each slot contains one or more facets facets may take the following forms: –Explicit values –Default -- used if there is not other value present –Range -- what kind of information can appear in the slot –If-added -- procedural attachment which specifies an action to be taken when a value in the slot is added or modified (data-driven, event-driven or bottom-up reasoning) –If-needed -- procedural attachment which triggers a procedure which goes out to get information which the slot doesn't have (expectation-driven; top-down reasoning) –Other -- may contain frames, rules, semantic networks, or other types of knowledge [Rogers 1999]
26
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 26 Usage of Frames filling slots in frames –can inherit the value directly –can get a default value –these two are relatively inexpensive –can derive information through the attached procedures (or methods) that also take advantage of current context (slot-specific heuristics) –filling in slots also confirms that frame or script is appropriate for this particular situation [Rogers 1999]
27
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 27 Example Frame: Low-level frame ObjectThis AI class ISAAI class DateFall, 2005 Time6:15-9PM Thursdays InstructorMatuszek Enrollment12 Has_AROSTER
28
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 28 Frame Example: default frame ObjectAI Class ISAClass Date Time6:15-9PM InstructorIF-NEEDED: Ask department IF-ADDED: Update payroll EnrollmentCount ROSTER: Student-IDs Has_AROSTER
29
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 29 Another Example: high-level frame ObjectROSTER ISAClass Record Enrollment Limit 25 Enrollment StatusOpen Student-IDsIF-ADDED Increment Filler(Enrollment) If Filler(Enrollment) = Filler(Enrollment Limit) Then Filler(Status) = Closed IF-DROPPED …
30
CSC 8520 Fall, 2005. Paula Matuszek Slides taken in part from: www.csc.calpoly.edu/~fkurfess/Courses/CSC-481/W03/Slides/3-Knowledge-Representation.ppt 30 Frames vs Semantic Nets Frames and nets capture comparable knowledge You can automatically transform a frame into a net and vice versa Differences are more in typical usage: –Semantic nets are normally considered as specifications, and do not allow exceptions or defaults –Frames are normally considered as typical descriptions; defaults and overrides are expected Nets typically distinguish strongly between classes and instances; frames typically do instantiation at the slot level and don’t have a clearcut distinction at the frame level Which is preferable depends on your domain!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.