Other Representation Schemas
Other Representation Schemas
Semantic Networks
A semantic network represents knowledge in the form of a graph in which the nodes represent
objects, situations, or events, and the arcs represent the relationships between them.
Note: Labels on the arcs specify what type of relationship exists
isa isa
Pompeian man
ruler
instance-of instance-of
instance-of
height tryassassinate
72 Marcus Caesar
Relationships
The most important relations between concepts are:
• Subclass – between classes i.e. The relationship "isa" asserts that a class, ("man"), is a
subclass of another class ("person") (Denotes inheritance).
• Instance – between a particular object (Marcus, Caesar) and its parent class i.e. the
relationship "instance-of" asserts that an individual is an instance (element) of a class.
Types of Nodes
• Generic node: This refers to a general node. e.g. Roman, Pompeian, etc
• Individual Nodes / Instance Nodes: This are nodes that explicitly state that they are
specific instances of a generic node
color
attracts
greater-than greater-than
revolves-
arround
Multiple inheritance
It is possible for a concept to have more than one parent. This enables to inherit properties from
multiple parents’ nodes and their ancestors in the network.
Default inheritance
There are some domains of knowledge in which exceptions to general rules exist. E.g. it is
usually useful to assume that all birds can fly. However certain birds such as the ostrich and the
kiwi cannot fly.
In such a case, it is reasonable to use a representation scheme in which properties associated with
concepts in a hierarchy are assumed to be true of all subclasses, unless specifically overridden by
a denial or modification associated with the subclass.
Example
In the figure below the fact that a woodpecker flies is inherited from bird. On the other hand, the
ostrich does not inherit this property from bird because it is explicitly represented that the ostrich
does not fly. This overrides the default which is further up in the tree.
animal
fly
mammal bird true
fly false
woodpecker wren ostrich
Exercises
1. Represent the following sentences into a semantic network.
Birds are animals.
Birds have feathers, fly and lay eggs.
Albatros is a bird.
Donald is a bird.
Tracy is an albatros.
3. Frames
It refers to a knowledge representation in which all relevant information about a particular a
particular concept is stored in a single complex entity called a frame.
Basically, frames are variants of semantic networks and they also support inheritance.
.
Objects Mammal:
Slots Subclass: Animal
Has_part: head
Elephant:
Subclass: Mammal
Color: grey Slot values
Size: large (facets)
Nellie:
Instance: Elephant
Likes: apple
Example
Animals eat, breath and have skin. Birds are special kind of animal which have
wings, feathers and normally can fly. Crows are black and can fly. Penguins are
black and white and ostriches are brown. Penguins and ostriches are birds but
they cannot fly. Tom, a human being, owns a pet crow called ‘black-head’.
Animals:
can_eat: true
can_breath: true
have_skin: true
Birds:
sub_class: Animals
have_wings: true
have_feathers: true
* can_fly: true
Crows:
sub_class: Birds
colour: black
4. Production systems
A production system is used to represent knowledge in the form of condition-action pairs called
production rules.
General format
If the condition C is satisfied, then the action A is appropriate
Example
i) If it is raining, then you should open the umbrella.
ii) IF the ‘traffic light’ is green
THEN the action is go
IF the ‘traffic light’ is red
THEN the action is stop
The action will be carried out if the condition is true and the condition and action can both be
composed of several parts.
Interpreter
condition 1 action 1
condition 2 action 2 Short
. . Term
. .
. . Memory
condition n action n
Rule Base
ii). Inference rules: - Both the antecedents and the consequents are assertions about the
data in the short-term memory.
The production systems based on situation-action rules can be run only in forward chaining and
are therefore called antecedent-driven systems.
The production systems based on inference rules may be run in either forward chaining or
backward chaining, since both sides of a production consist of the same constructs.
Note
i) Goal driven reasoning or backward chaining – an inference technique which uses IF
THEN rules to repetitively break a goal into smaller sub-goals, which are easier to prove;
ii) Data driven reasoning or forward chaining – an inference technique that uses IF THEN
rules to deduce a problem solution from initial data;
Note
A rule that would not modify the content of the short-term memory should not be fired (e.g. a
rule that would infer a fact that is already in the short term memory).
Exercises
Consider the following a production system characterized by
- Initial short term memory: C5, C1, C3
- Production rules: C1 & C2 --> C4
C3 --> C2
C1 & C3 --> C6
C4 --> C6
C5 --> C1
Show a possible sequence of two recognize-act cycles. Which will be the new content of the
short-term memory after these two cycles ?
Solution
1. Match: determines the rules that can be fired
C3 --> C2
C1 & C3 --> C6 conflict set.
C5 --> C1
2. Conflict resolution: select one rule from the conflict set (use rule order)
C3 --> C2
3. Apply the rule:
- new short term memory: C5, C1, C3, C2
Exercise
Suppose that you decide to develop a rule-based system to help someone to choose elective
courses. Accordingly, you create rules that award points to various courses. The course with the
highest number of points becomes the first choice. Here is a sample rule:
Hybrid Representation
• No single representation will be suitable for representing every problem domain i.e. every
representation schema has its own advantages and disadvantages. Therefore a hybrid
representation schema may be better than any single schema.
• A.I. programming tools containing rules, frames and logic are now available