Você está na página 1de 26

Humans vs the computer

Brain

Computer

Brains are analogue (neuronal firing rate,


asynchronous, leakiness)

Computers are digital

Brain uses content-addressable memory

Computers use byte addressable memory

Brain is a massively parallel machine

Computers are modular and serial

Processing speed is not fixed in the brain; there is no


system clock

Processing speed is fixed; there is a system clock

Short-term memory only holds pointers to long term


memory

RAM has isomorphic data

No hardware/software distinction can be made with


respect to the brain or mind

Computers have a clear distinction between hardware


and software

Synapses are far more complex than electrical logic


gates

Electrical gates are simpler in function and


mechanism

Processing and memory are performed by the same


components in the brain

Processing and memory are performed by different


components in the computer

The brain is a self-organizing system

Computers are usually not self organizing

Brains have bodies and use them

Computers do not usually use their bodies

The brain capacity is much larger than any computer

09/04/12
Computer capacities though large are still
not
comparable with those of the brain

Knowledge Representation

09/04/12

Knowledge Representation and


Reasoning
Intelligent agents should have capacity for:
Perceiving: that is, acquiring information from
environment,
Knowledge Representation: that is, representing its
understanding of the world,
Reasoning: that is, inferring the implications of what
it knows and of the choices it has, and
Acting: that is, choosing what it want to do and carry
it out.

Knowledge Representation Methods


Production Rules
Semantic Nets
Schemata and Frames
Logic

Production Rules
frequently used to formulate the knowledge in expert
systems
a grammar is a complete, unambiguous set of production

rules for a specific language


Condition-Action Pairs
IF this condition (or premise or antecedent) occurs,
THEN some action (or result, or conclusion, or
consequence) will (or should) occur
IF the stop light is red AND you have stopped, THEN a
right turn is OK

Forms of Rules

IF premise, THEN conclusion


IF your income is high, THEN your chance of being

audited by the IT is high

Conclusion, IF premise
Your chance of being audited is high, IF your income is

high

Inclusion of ELSE
IF your income is high, OR your deductions are unusual, THEN your

chance of being audited by the IT is high, OR ELSE your chance of


being audited is low

More Complex Rules


IF credit rating is high AND salary is more than $30,000, OR assets

are more than $75,000, AND pay history is not "poor," THEN
approve a loan up to $10,000, and list the loan in category "B.
Action part may have more information: THEN "approve the loan"
and "refer to an agent"

Advantages of Production Rules


Simple and easy to understand

Straightforward implementation in computers possible


Formal foundations for some variants

Easy to derive inference and explanations


Easy to modify and maintain
Rules are frequently independent

Problems with Production Rules


simple implementations are very inefficient

some types of knowledge are not easily expressed

in such rules
complex knowledge requires many rules
large sets of rules become difficult to understand
and maintain
Search limitations in systems with many rules

Semantic Networks
graphical representation for propositional information
originally developed by M. R. Quillian as a model for
human memory

labeled, directed graph


nodes represent objects, concepts, or situations

links represent relationships


the label indicates the type of the relationship
is-a
has-a

11

Semantic networks can show inheritance

Semantic Nets - visual representation of relationships

Can be combined with other representation methods

Semantic Network Example


Human
Being

Boy

Needs

Goes to
School

Woman

Joe

Food

Has
a child
Kay

12

Representation of Knowledge in Semantic Network


Every human, animal and bird is living thing who
breathe and eat. All birds can fly. All man and woman
are humans who have two legs. Cat is an animal and
has a fur. All animals have skin and can move. Giraffe
is an animal who is tall and has long legs. Parrot is a
bird and is green in color .

Representation in Predicate Logic


Every human, animal and
bird is living thing who
breathe and eat.
X [human(X) living(X)]
X [animal(X) living(X)]
X [bird(X) living(X)]

All birds are animal and can


fly.
X [bird(X) canfly(X)]

Every man and woman are


humans who have two legs.
X [man(X) haslegs(X)]
X [woman(X) haslegs(X)]
X [human(X) has(X, legs)]

Cat is an animal and has a


fur.
animal(cat) has(cat, fur)

All animals have skin and


can move.
X [animal(X) has(X, skin)
can move(X)]

Giraffe is an animal who is


tall and has long legs.
animal(giraffe) has(giraffe,
long_legs) is(giraffe, tall)

Parrot is a bird and is green


in color.
bird(parrot) has(parrot,
green_colour)

Representation in Semantic Net


Semantic Net
breathe, eat
Living_thing

prop

isa

isa

two legs

isa
Human
isa

fly

Animal
isa

inst

Bird
isa

inst
prop green

Man

Woman

Giraffe
prop

Cat
prop

inst
john

Parrot
prop
fur

skin, move

tall, long legs

Frame
Represents related knowledge about a subject

Frames are organized hierarchically


allows the use of inheritance

Lower level frames can inherit information from upper


level frames in network.
Nodes are connected using links viz.,

ako / subc (links two class frames, one of which is subclass of

other e.g., science_faculty class is ako of faculty class),


is_a / inst ( connects a particular instance of a class frame e.g.,
Renuka is_a science_faculty)
a_part_of (connects two class frames one of which is contained
in other e.g., faculty class is_part_of department class).
Property link of semantic net is replaced by SLOT fields

Overview of Frame Structure


two basic elements: slots and facets (fillers, values, etc.);

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
pointers to related frames/scripts - can be used to transfer control

to a more appropriate frame

Slots
each slot contains one or more facets

facets may take the following forms:


values
default
Range

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

Frame Network - Example


university

a_part_of

department

hostel

a_part_of

is_a

faculty

nilgiri hostel
ako

science_faculty

is_a
renuka

Detailed Representation of Frame Network


frame0
f_name: university
phone: (default: - 011686971)
address : (default - IIT Delhi)

frame1

frame2

f_name : department
a_part_of : frame0
programme : [Btech, Mtech, Ph.D]

f_name : hostel
a_part_of : frame0
room : (default - 100)

frame11

frame21

f_name: faculty
a_part_of : frame1
age :
range (25 - 60)
nationality: (default - Indian)
qual: (default - Post graduate)

f_name : nilgiri
is_a : frame2
phone : 0116862345

frame12

frame13

f_name : science faculty


ako : frame11
qual : (default - M.Sc)

f_name : renuka
is_a : frame12
qual : Ph.D
age: 45
adrress: Janak Puri

Description of Frames
Each frame represents either a class or an instance.
Class frame represents a general concept whereas
instance frame represents a specific occurrence of the
class instance.
Class frame generally have default values which can be
redefined at lower levels.
If class frame has actual value facet then decedent
frames can not modify that value.
Value remains unchanged for subclasses and instances.

Restaurant Frame Example


Generic template for restaurants
different types
default values

Script for a typical sequence of activities at a

restaurant

Generic RESTAURANT Frame

Types:
range:
(Cafeteria, Fast-Food, Seat-Yourself, Wait-To-Be-Seated)
default: Seat-Yourself
if-needed: IF reservations-made THEN Wait-To-Be-Seated,
OTHERWISE Seat-Yourself.
Name:
if-needed: (Look at the MENU)
Food-Style:
range:
(Burgers, Chinese, American, Seafood, French)
default:
American
Times-of-Operation:
range:
a Time-of-Day
default:
open evenings except Mondays
Payment-Form:
range:
(Cash, Credit Card, Check, Washing-Dishes-Script)
Event-Sequence:
default:
Eat-at-Restaurant Script
Alternatives:

Generic Restaurant Frame

Restaurant Script
EAT-AT-RESTAURANT Script
Props:
(Restaurant, Money, Food, Menu, Tables, Chairs)
Roles:
(Hungry-Persons, Wait-Persons)
Point-of-View:
Hungry-Persons
Time-of-Occurrence: (Times-of-Operation of Restaurant)
Place-of-Occurrence: (Location of Restaurant)
Event-Sequence:
first:
Enter-Restaurant Script
then:
if (Wait-To-Be-Seated-Sign or Reservations)
then Get- Waiters Attention Script
then:
Please-Be-Seated Script
then:
Order-Food-Script
then:
Eat-Food-Script unless (Long-Wait) when Exit-Restaurant-Angry
Script
then:
if (Food-Quality is good)
then Compliments-To-The-Chef Script
then:
Pay-For-It-Script
finally: Leave-Restaurant Script

Frame Advantages
important for many applications
similar to human knowledge organization
easier to understand than logic or rules

very flexible

Summary Knowledge Representation


knowledge

representation is very important for


knowledge-based system
popular knowledge representation schemes are
rules, semantic nets, schemata (frames, scripts), logic

the selected knowledge representation scheme should

have appropriate inference methods to allow reasoning


a balance must be found between
effective representation, efficiency, understandability

Você também pode gostar