Chapter 2 Knowledge Representation Artificial Intelligence 605451 Dr

  • Slides: 31
Download presentation
Chapter 2 Knowledge Representation Artificial Intelligence (605451) Dr. Hassan Al-Tarawneh

Chapter 2 Knowledge Representation Artificial Intelligence (605451) Dr. Hassan Al-Tarawneh

Knowledge Representation Issues in AI • To solve complex problems in AI we need

Knowledge Representation Issues in AI • To solve complex problems in AI we need large amount of knowledge and some mechanism for manipulation that knowledge • To deal with knowledge, we first need to represent knowledge in an appropriate and efficient manner – knowledge representation issue

How is knowledge represented? • Knowledge is best represented thought a knowledge representation language

How is knowledge represented? • Knowledge is best represented thought a knowledge representation language which determine the computational objects, relations and inference available to a programmer – A knowledge representation language helps the programmer to acquire, organize and manipulate knowledge – Knowledge is represented as a data structure – organize pieces of knowledge. The data structure are usually called knowledge representation schemes, each representing knowledge in a particular manner – Typically AI language such as Prolog and Lisp can be used to represent knowledge based on a prescribed knowledge representation scheme

Classification of Knowledge Representation Schemes • Logical Representation schemes – Uses expression in formal

Classification of Knowledge Representation Schemes • Logical Representation schemes – Uses expression in formal logic to represent knowledge – Predicate calculus is the most widely used logical representation scheme – Prolog is an ideal programming language for such representation scheme • Procedural representation schemes – Represent knowledge as a set of instruction for solving problems – Typical implementation are if… then … else rules • Network representation schemes – Capture knowledge as a graph in which the nodes represent objects/concepts and the arcs represent the relations between them – Typical examples include semantic networks and conceptual graphs • Structured representation schemes – An extension of the network representation schemes where each node is a complex data structures consisting of slots with attached values – The slot value may be symbolic/numeric data, pointers to other slots or procedures for performing a particular function – Typical examples include frames and scripts

Properties of A Good Knowledge Representation system • Whatever knowledge representation scheme has been

Properties of A Good Knowledge Representation system • Whatever knowledge representation scheme has been chosen to represent a particular domain it should exhibit the following four properties • Representation adequacy – The ability to represent all kinds to knowledge that are needed in the domain • Inferential ability – The ability to manipulate the representational structures in such a way as to derive new structures by the process of differencing • Inferential efficiency – The ability to incorporate into the knowledge structure additional information that can be used to guide the inference mechanism towards the most promising path • Acquisitional efficiency – The ability toe acquire new information easily, i. e. to automatically update the structure with new knowledge

Inheritance • An important feature of knowledge representation is its organization into class hierarchies.

Inheritance • An important feature of knowledge representation is its organization into class hierarchies. Classes can be base on the properties of objects/concepts • Inheritance is a relation by which an individual assumes the properties of its class and b which properties of a class are passed on to its subclass • In order to support inheritance, objects/ concepts must be organized into classes and classes must be arranged in a generalized hierarchy – the most generic object/concept is at the top of the hierarchy and the most specific is at the bottom of the hierarchy

Inheritance

Inheritance

Advantages of Inheritance • • • Inheritance provides a natural mechanism for representing taxonomically

Advantages of Inheritance • • • Inheritance provides a natural mechanism for representing taxonomically structured knowledge Inheritance provides an economical means of expressing properties common to a class of objects/concepts Inheritance guarantees that all members of a class inherit the appropriate properties thus ensuring consistency with the class definition Inheritance reduces the size of the knowledge base as properties are defined once for the most general type of object/concepts and these properties are then share by other less generic objects/concepts in the type hierarchy. For example, the property of ability to move would be denied for primates and inherited by the class animals, monkeys, and finally the concept Fido. Inheritance can also be used to provide default values that can be inherited from the appropriate superclass Inheritance can also be used to provide exceptions to existing definition. This can be achieved by re-defining the property at a lower level in the hierarchy. For instance, at a higher level we have a property that monkeys are not pets, however we can later state at the lowest level that Fido is a pet

Associationist Theories of Meaning • Associationist theories define the meaning of an object in

Associationist Theories of Meaning • Associationist theories define the meaning of an object in terms of a network of associations with other objects in the mind or in a knowledge base

Associationist Theories are psychologically motivates • A concept in our mind id connected through

Associationist Theories are psychologically motivates • A concept in our mind id connected through appropriate relationships to other concepts. Our entire knowledge base is therefore a network of connected concepts. When we perceive an object, it maps onto a concept in our mind which in turn activates other related concepts • For example, through experience we associate the concept of a university with other concepts such as lectures, lecturer, exams, projects and fun

Hierarchical Organization of Information • There is psychological evidence that humans organize their knowledge

Hierarchical Organization of Information • There is psychological evidence that humans organize their knowledge hierarchically, with information stored at appropriate levels of the hierarchy. Generic information is kept high up the hierarchy and specific information is kept at low levels. Humans try to place as much as information as possible at the higher levels of the hierarchy

Semantic Network • A semantic network is knowledge representation scheme that represents knowledge as

Semantic Network • A semantic network is knowledge representation scheme that represents knowledge as a graph. The nodes of the graph correspond to concepts or facts and the arc correspond to relations or associations between concepts. In a semantic network both the no`des and arcs are labeled

Semantic Network • A semantic network that defined the propertied of snow and ice

Semantic Network • A semantic network that defined the propertied of snow and ice • The concept snowman inherits all the properties of snow • The concept of ice and snow share a number of properties

Expressing Relationship in Semantic Networks • The most important link in a semantic network

Expressing Relationship in Semantic Networks • The most important link in a semantic network is the is-a link • A semantic network can organize knowledge in a hierarchy by using the is-a link such that the lower nodes inherit the properties of the higher nodes

The is-a relationship in a semantic networks • In a semantic network information about

The is-a relationship in a semantic networks • In a semantic network information about a superclass is made available to subclasses through the is-a link • The is-a link allows the lower nodes to inherit properties of the connect upper nodes

The is-a relationship in a semantic networks

The is-a relationship in a semantic networks

The is-a relationship in a semantic networks By tracing the semantic network an AI

The is-a relationship in a semantic networks By tracing the semantic network an AI program can answer question : Q : Does a canary has wings? A : Yes Q : Does a shark breathe? A : Yes Q : Does a bird move? A : Yes Q : Does a bird swim? A : No Q : Can a salmon sing? A : No Q : Is shark similar to a canary? A : No

Relating two entities using semantic network • Semantic network for the fact “the height

Relating two entities using semantic network • Semantic network for the fact “the height of ali is 72 inches’ • A semantic network to relate two entities ali and ahmad by the fact “Ali is taller than Ahmad” • The nodes H 1 and H 2 are new concepts representing Ali’s and Ahmad’s heights, respectively

Conceptual Graphs • A conceptual graph is a finite, connected bipartite graphs. The nodes

Conceptual Graphs • A conceptual graph is a finite, connected bipartite graphs. The nodes of the graphs are concepts (represented as a box) or conceptual relations (represented as a ellipse) • Conceptual graphs do not have labeled arcs. Instead, conceptual relations nodes represent relation between concepts • Concepts can only have arcs to conceptual relations and viceversa. This simplifies the representation of knowledge • In a conceptual graph, a relation of arity n is represented by a conceptual relation node having n arcs

Conceptual Graphs • Each conceptual graph represents a single proposition • Proposition : A

Conceptual Graphs • Each conceptual graph represents a single proposition • Proposition : A bird flies • Proposition : An apple taste sweet

Conceptual Graphs • Proposition : Ahmad likes computes and AI • Proposition : Mary

Conceptual Graphs • Proposition : Ahmad likes computes and AI • Proposition : Mary gave John the book

Types in Conceptual Graphs • In a conceptual graph, every concept is an unique

Types in Conceptual Graphs • In a conceptual graph, every concept is an unique individual of a particular type. The types are organized in a hierarchy. The type monkey is a subtype of primates which is a subtype of mammals and so on. • Each concept box is labeled with the names of the type and the individual. The type and the individual are separated by a colon • In a concept box the type label indicated the type (or class) of the individual concept represented by that concept node. If the concept node does not indicate the individual, then it means that the concept node represents an unspecified concept of the given type. • Boxes with the same type of label represent concepts of te same type. However, they may or may not represent the same individual concept

Frames – Structured Representations • A frame is a static data structure used to

Frames – Structured Representations • A frame is a static data structure used to represent knowledge as a collection of attributes (called slots) and associated values. • Slots identify properties of an object or concept and contain particular values associated with each property • A frame can be seen as a data structure similar to the traditional “record” data structure that contains well -understood information

Frames BOY FRAME Is – A Person Gender Male Age Under 12 years Home

Frames BOY FRAME Is – A Person Gender Male Age Under 12 years Home House

Frames DOG FRAME Is – A Animal Owner some human Breed Some dog breed

Frames DOG FRAME Is – A Animal Owner some human Breed Some dog breed Age An integer

Characteristic of Frames • Frames are possible data structures that we may use to

Characteristic of Frames • Frames are possible data structures that we may use to organize out own knowledge. Frames are therefore regarded as mental data structures • We understand new situation with respect to past experience. We may revise the details of the past experiences to represent the new situation. • We may have a general concept of a book which includes attributes (slots) such as Is-A, Title, Author, Publisher, Publication Place, & Price. • Using this generic concept we can define any specific book by giving values to the slots, thus forming the frame of a SPECIFIC book

Frames BOOK FRAME Is - A Object Title Artificial Intelligence Author George F. Luger

Frames BOOK FRAME Is - A Object Title Artificial Intelligence Author George F. Luger Publisher Addison Wesley Publication Place London Price RM 100. 00

Characteristics of Slots in Frames • Slots may contain the following information – Frame

Characteristics of Slots in Frames • Slots may contain the following information – Frame identification information • A header that defines the frame – Relationship of a frame to other frames • Inheritance information regarding how can two frames be associates – Descriptors of the requirements for matching the frames • Typical attributes values associated with a slot – Procedural information on the use of structures • Some procedural code that can be executed – Frame default information • Slot values that are regarded as true when no information is given – New instance information • Information that is provided when needed, else the slot is left blank

Frame Based Systems • A frame based system consists of a number of frames

Frame Based Systems • A frame based system consists of a number of frames that are connected to each other, such that value of one attribute (slot) may be another frame. A frame based system therefore realizes a nesting of frames • A frame bases system describing the concept of a hotel room (Figure 6. 12 pg. 216)

Inheritance Property in Frames • To conserve space, frames can be organized hierarchically such

Inheritance Property in Frames • To conserve space, frames can be organized hierarchically such that the sub frames inheriting all the attributes (slots) of the relates super-frame

Inheritance Property in Frames

Inheritance Property in Frames