+ All Categories
Home > Documents > Knowledge Representation CPTR 314. The need of a Good Representation The representation that is...

Knowledge Representation CPTR 314. The need of a Good Representation The representation that is...

Date post: 16-Jan-2016
Category:
Upload: samson-booker
View: 222 times
Download: 0 times
Share this document with a friend
Popular Tags:
27
Knowledge Knowledge Representation Representation CPTR 314 CPTR 314
Transcript
Page 1: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Knowledge Knowledge RepresentationRepresentation

CPTR 314CPTR 314

Page 2: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

The need of a Good The need of a Good RepresentationRepresentation

The representation that is used to The representation that is used to represent a problem is very represent a problem is very importantimportant

The representation used can make The representation used can make the difference between an efficient the difference between an efficient algorithm and an algorithm that algorithm and an algorithm that doesn’t work al alldoesn’t work al all

Page 3: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Associationist TheoriesAssociationist Theories Associationist theories define the meaning of an Associationist theories define the meaning of an

object in terms of a network of associations with object in terms of a network of associations with other objectsother objects

For the associationist, when humans perceive and For the associationist, when humans perceive and reason about an object, that perception is first reason about an object, that perception is first mapped into a conceptmapped into a concept

This concept is part of our entire knowledge of This concept is part of our entire knowledge of the world and is connected through appropriate the world and is connected through appropriate relationships to other conceptsrelationships to other concepts

These relationships form an understanding of the These relationships form an understanding of the properties and behavior of objects such as properties and behavior of objects such as snowsnow– For example, through experience, we associate the For example, through experience, we associate the

concept snow with other concepts such as cold, white, concept snow with other concepts such as cold, white, snowman, slippery, and ice.snowman, slippery, and ice.

Page 4: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Semantic NetsSemantic Nets

The semantic net is a commonly used The semantic net is a commonly used representation in Artificial Intelligence and representation in Artificial Intelligence and it is based on the associationist theoriesit is based on the associationist theories

A semantic net is a graph consisting of A semantic net is a graph consisting of nodes that are connected by edgesnodes that are connected by edges

The nodes represent objects, and the links The nodes represent objects, and the links between nodes represent relationships between nodes represent relationships between those objectsbetween those objects

The links are usually labeled to indicate The links are usually labeled to indicate the nature of the relationshipthe nature of the relationship

Page 5: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Psychological evidencePsychological evidence

Collins and Quillan (1969) modeled Collins and Quillan (1969) modeled human information storage and human information storage and management using a semantic management using a semantic networknetwork

They found that there is evidence They found that there is evidence that there is an intrinsic a that there is an intrinsic a hierarchical representation of hierarchical representation of conceptsconcepts

Page 6: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Semantic network developed by Collins and Quillian in their research on Semantic network developed by Collins and Quillian in their research on human information storage and response times (Harmon and King 1985)human information storage and response times (Harmon and King 1985)

Page 7: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Semantic NetsSemantic Nets

In semantic nets the links are arrows, In semantic nets the links are arrows, meaning that they have a directionmeaning that they have a direction

One limitation of semantic nets is the One limitation of semantic nets is the inability to represent negationsinability to represent negations

Page 8: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Semantic net representation of snow and ice

Page 9: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Semantic NetsSemantic Nets

Note that in the previous semantic Note that in the previous semantic net we have represented some net we have represented some specific entities (Frosty) and some specific entities (Frosty) and some general as (Snowman)general as (Snowman)

We use object oriented concepts as We use object oriented concepts as instances, classes and inheritance to instances, classes and inheritance to build semantic netsbuild semantic nets

Page 10: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

FramesFrames

Frame-based representation is a Frame-based representation is a development of semantic nets and development of semantic nets and allows us to express the idea of allows us to express the idea of inheritanceinheritance

A Frame system consists of a set of A Frame system consists of a set of frames, which are connected frames, which are connected together by relationstogether by relations

Each frame has one or more slots Each frame has one or more slots which are assigned slot valueswhich are assigned slot values

Page 11: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Frame ExampleFrame Example

Frame NameFrame Name SlotSlot Slot ValueSlot Value

BobBob Is aIs a

OwnsOwns

EatsEats

BuilderBuilder

FidoFido

CheeseCheese

FidoFido Is aIs a

ChasesChasesDogDog

FangFang

FangFang Is aIs a

ChasesChasesCatCat

MiceMice

MiceMice EatEat CheeseCheese

CheeseCheese

BuilderBuilder

DogDog

CatCat

Page 12: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Part of a frame description of a hotel room. “Specialization” Part of a frame description of a hotel room. “Specialization” indicates a pointer to a superclassindicates a pointer to a superclass

Page 13: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Frame RelationshipsFrame Relationships

GeneralizationsGeneralizations– ““Is a”Is a”

AggregationsAggregations– One object being part of another objectOne object being part of another object

AssociationsAssociations– Meaning in two directinonsMeaning in two directinons

Example: Fido “chases” Fang and Fang is Example: Fido “chases” Fang and Fang is being “chased” by Fidobeing “chased” by Fido

Page 14: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

InheritanceInheritance

We might extend our frame system with We might extend our frame system with the following additional informationthe following additional information– Dogs chase catsDogs chase cats– Cats chase miceCats chase mice

We now do not need to state explicitly that We now do not need to state explicitly that Fido chases Fang or that Fang chases Fido chases Fang or that Fang chases mice.mice.

We could add the following Fact:We could add the following Fact:– Mammals have four legsMammals have four legs– This is not true for humans. But we can define This is not true for humans. But we can define

a default value that it may be overridden.a default value that it may be overridden.

Page 15: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

ProceduresProcedures

A procedure is a set of instructions A procedure is a set of instructions associated with a frame that can be associated with a frame that can be executed on requestexecuted on request

Frames may have demon proceduresFrames may have demon procedures– Run automatically whenever a particular Run automatically whenever a particular

value changes or when a particular value changes or when a particular event occursevent occurs

Page 16: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Search SpacesSearch Spaces

A search space is a representation of the A search space is a representation of the set of possible choices in a given problem, set of possible choices in a given problem, one or more of which are the solution to one or more of which are the solution to the problemthe problem

Because a search space consists of a set Because a search space consists of a set of states, connected by paths that of states, connected by paths that represent actions, they are also known as represent actions, they are also known as state spacesstate spaces

The arrows between states represent state The arrows between states represent state transitionstransitions

Page 17: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

State space of the 8-puzzle generated by “move blank” operations.

Page 18: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Semantic TreeSemantic Tree

A semantic tree is semantic net with A semantic tree is semantic net with the restriction of being a tree instead the restriction of being a tree instead of a graphof a graph

This means that it cannot contain This means that it cannot contain cycles while semantic nets couldcycles while semantic nets could

Page 19: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Example: Traveling SalesmanExample: Traveling Salesman

A salesman must visit each of a set A salesman must visit each of a set of cities and then return home. The of cities and then return home. The aim of the problem is to find the aim of the problem is to find the shortest path that lets the salesman shortest path that lets the salesman visit each city.visit each city.

This is an NP complete problemThis is an NP complete problem If we fix the starting city there is (n-If we fix the starting city there is (n-

1)! Possibilities to find the shortest 1)! Possibilities to find the shortest path path

Page 20: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Traveling Salesman ExampleTraveling Salesman Example

We can write the tree and possible We can write the tree and possible distancesdistances

We can search the tree using brute-force. We can search the tree using brute-force. – Not very productive for large n; it can take Not very productive for large n; it can take

thousand of years to solvethousand of years to solve We can search using a heuristicsWe can search using a heuristics

– Heuristics is a rule or piece of information that Heuristics is a rule or piece of information that is used to make search more effective or more is used to make search more effective or more efficientefficient

– In this case we could use the nearest neighbor In this case we could use the nearest neighbor heuristics for an approximation heuristics for an approximation

Page 21: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

An instance of the traveling salesperson problem.

Page 22: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Search of the traveling salesperson problem. Each arc is marked with the total weight of all paths from the start node (A) to its endpoint.

Page 23: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

An instance of the traveling salesperson problem with the nearest neighbor path in bold. Note that this path (A, E, D, B, C, A), at a cost of 550, is not the shortest path. The comparatively high cost of arc (C, A) defeated the heuristic.

Page 24: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

Goal TreesGoal Trees

A goal tree (also called an and-or A goal tree (also called an and-or tree) is a form of semantic tree used tree) is a form of semantic tree used to represent problems that can be to represent problems that can be broken down in this waybroken down in this way

We say that the solution to the We say that the solution to the problem is the goal, and each problem is the goal, and each individual step along the way is a individual step along the way is a sub-goalsub-goal

Page 25: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

And/or graph of the expression (q and r => p)

Page 26: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

And/or graph of the expression (q or r => p)

Page 27: Knowledge Representation CPTR 314. The need of a Good Representation  The representation that is used to represent a problem is very important  The.

And/or graph a grammar. Some of the nodes (np, art, etc.) have been written more than once to simplify drawing the graph.


Recommended