You are on page 1of 48

Unit – 4

Representing Knowledge

pmshiva@gmail.com Dr. P M Shivamurthy


Introduction
• It is a way of representing knowledge with the help of rules
• It combines the search control knowledge along with and the
knowledge about the world
• It not only describes the world, but also represents the ways of
solving problems
• There are two types
• Procedural Knowledge
• Declarative Knowledge

pmshiva@gmail.com Dr. P M Shivamurthy


Procedural vs Declarative Knowledge
• Declarative knowledge of logical assertions did not specify the way it
has to be used.
• It has to be associated with a program, i.e., the assertions need to be
combined with resolution theorem
• Among the assertions the implication indicate the reasoning path and
atomic assertion indicate the starting or ending points
• In procedural knowledge, the control information of using the
knowledge is embedded within.

pmshiva@gmail.com Dr. P M Shivamurthy


Procedural vs Declarative Knowledge
• Answer the question given the knowledge
• One way to consider the knowledge in the order it is arranged and
specify the search as depth first search
• Given the following knowledge, viewed declaratively does not make
any difference

• In the first case , we get Cleopatra as the answer, but in second case
we get Marcus
• The interpreter to the procedural knowledge should recognize the
control information

pmshiva@gmail.com Dr. P M Shivamurthy


Forward and Backward Reasoning
• Reasoning from start state is forward and from goal state is backward

• A samples set of rules are specified to solve 8-puzzle game

pmshiva@gmail.com Dr. P M Shivamurthy


Forward and Backward Reasoning
• Reason forward from the initial state by building tree with LHS of the rule
as the root and substitute the RHS as children nodes
• Reason backward is vice versa
• Four question need to be answered to chose among forward and backward
• What is count of start and end states? →Move from lesser number of start states
towards larger set of end states
• In which direction the branching factor is more? → choose the one with less
• How to justify the reasoning process to the user? → User should be convinced
• How does the problem solving proceed?→ New fact : forward, New question :
backward

pmshiva@gmail.com Dr. P M Shivamurthy


Forward and Backward Reasoning
• Eg. Commuting between home and unfamiliar place, the start states
would be fewer if we reason backward (unfamiliar to home)
• In other cases, the start state would be a integral formula, end state is
also a formula without integral, we proceed by differentiating towards
larger set
• Proving larger set of theorem form smaller axioms, move from larger
branching factor towards lesser (backward)
• A disease diagnosis program moves backward to provide justifications
to doctors

pmshiva@gmail.com Dr. P M Shivamurthy


Forward and Backward Reasoning
• Sometimes combined bidirectional reasoning is acceptable as a divide
and conquer strategy, but fails sometimes
• In this case, the set of rules need to be bifurcated for both forward
and backward reasoning
• Backward chaining rule leads to a goal or answering a question
• Forward chaining rule responds to input configurations, i.e.,
recognize-act cycle
• In combination, 9 out of 10 steps can be forward and 10th can be
backward.

pmshiva@gmail.com Dr. P M Shivamurthy


Weak Slot-filler structure
• In contrast with logic, they are used for inheritance representation
along with isa and instance
• It enables easy access to attributes by indexing of predicts based on
attributes
• It easily describes the properties of relations
• It supports OO programming
• Two types are
• Semantic nets
• frames

pmshiva@gmail.com Dr. P M Shivamurthy


Semantic Nets
• It is a set of conceptual nodes connected to each other with a
relationship

• Intersection search is to send activation between entities to see how


they are related
• These activations meet at some point, where the relationship
between entities are explained

pmshiva@gmail.com Dr. P M Shivamurthy


Sematic Nets
• Most of the binary predicates can be easily represented using
semantic nets
• The previous semantic net can be represented as following binary
predicates

• If they are non-binary, then they are converted to binary and


represented

pmshiva@gmail.com Dr. P M Shivamurthy


Sematic Nets
• E.g. of Declarative

• E.g. of Procedural

pmshiva@gmail.com Dr. P M Shivamurthy


Distinctions in Nets
• Procedural Distinction can be brought between entities through
conceptual relations between newly created nodes
• Following Eg shows how distinction can be expanded at different
levels

• The notion of node, link and value need to be represented to bring in


suitable distinction

pmshiva@gmail.com Dr. P M Shivamurthy


Partitioned Nets
• To represent quantified expressions, the Nets are partitioned into
hierarchical spaces with the scope of one or more variables
• Simple Net without partitioning

• Using Partitioning,

pmshiva@gmail.com Dr. P M Shivamurthy


Partitioned Nets
• In the above example, the universal quantifiers can be shown using g
as a GS.
• GS is a general statement, representing form and connections for
many d instances
• b and m are existentially quantified for every d instances
• Another Example shows how partitioning makes quantification
explicit

pmshiva@gmail.com Dr. P M Shivamurthy


Partitioned Nets
• In the above example, the node constable and town stands out of the
scope of quantification

• In this example, both m and d are existentially quantified


• SA and S1 are spaces of partitions which indicates hierarchy of search
process
• Choosing Dogs or d will indicate different hierarchy in different spaces
pmshiva@gmail.com Dr. P M Shivamurthy
Evolutions to frames
• More complex structures to nodes and links enable large range of
problem solving tasks
• More complex structure in semantic nets will be treated a frames

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• A frame is a collection of attributes associated with values describing
a real world entity
• A collection of frames represent the real world facts, which are
connected to each other conceptually
• In the example shown in next slide, some frame represent
classes/sets and some represent instances/members of set
• Except all others are classes/sets
• Isa relation can be used to represent a subclass/subset of a parent
class/set
• Instance relation represent the membership of an instance in a set.

pmshiva@gmail.com Dr. P M Shivamurthy


Frames

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• The attributes assigned to overall sets are different from attributes
assigned to each member of set, which is indicated by a “*”
• A frame can be either a set or an instances, Eg. Brooklyn-Dodger is an
instance in the eg and hence the players are sets
• Suppose, if it is a class by itself, then the players would become
instances
• But, if it is a subclass, then we cannot inherit its properties as a whole
instance.
• Isa and Instance both support these properties
• Either way a class can be individual classes or meta-classes

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• Here Class is a meta-class

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• Here Class is set of sets, where some
others are instances.
• Every class is a set, but not vice versa

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• Apart from meta-classes and subclasses, we have mutually-disjoint-
with relation between classes, i.e., nothing in common
• Is-covered-by relates a class with its subclasses
• If the subclasses are mutually disjoint, then the parent class is a
partition

pmshiva@gmail.com Dr. P M Shivamurthy


Frames

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• Some of the properties of the attributes attached to objects of classes
are as follows:
• Relevance of the attributes attached to each class
• Constraints on the value or type of the attributes
• A value/a default value attached to each attribute
• Rules for inheriting the values for attributes
• Rules for computing the values for attributes
• An inverse attribute, if it exists
• Whether the slot is single valued or multivalued
• An attribute is considered to be a slot of frame, a set of slots are
represented as Slot class.

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• A Slot as a meta-class and slots are represented as frames, which are
ordered pairs of relations

pmshiva@gmail.com Dr. P M Shivamurthy


Frames

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• Considering the attributes of a slot, the frame interpreter has
following reasoning abilities
• Consistency checking for slot value added to the frame based on domain
• Consistency between the values to slots and their inverses using range
• Propagation of definition values along isa and instance
• Inheritance of default values along isa and instance
• Computation of value of a slot using to-compute and through-transfer
• Checking that only one value is asserted using single-valued slots
• Associating defaults with slots showing specializations

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• The eg shown here indicates how defaults defined across two
specialization slots

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• Some notational short hands are used to represent the four
important properties, domain, range, default and definition
• Domain is the class where the slot appears and range uses a MUST BE
clause to specify the values of inherited slot

• Definition and default are specified as per the values associated with
particular slot using a ‘*’
• To-compute uses a dot operations to specify the values ‘x’
corresponding that slot as shown bats and my-manager frames

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• In manager slot, the range-constraint specify that manager also
should have baseball experience
• Color and uniform-color are different in their description hierarchy
and the have high visual salience
• Transfer-through describes the parts to the whole
• The relations between two frames can be asserted by viewing the
slots as objects with values

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• Usually, the inheritance is represented using a DAG, a directed acyclic
graph, but the inheritance which is not a tree can be represented
using Tangled hierarchy

• Here, this leads to multiple assertions on a question


pmshiva@gmail.com Dr. P M Shivamurthy
Frames
• To overcome this problem, one is to traverse upward and stop in the
path where nearest value is found as in birds e.g.
• But the same case fails below, hence inferential length need to be
considered than the path length

pmshiva@gmail.com Dr. P M Shivamurthy


Frames
• Hence, the correct values to the slots in a frames can be derived from
• Some frame X, which is above in the isa hierarchy to the given frame
• Some frame X, which has shorter inferential distance from the given frame
• There is a property inheritance algorithm for the same
• Next we shall explore Strong Slot-Filler structure
• Conceptual dependency
• Sripts

pmshiva@gmail.com Dr. P M Shivamurthy


Conceptual dependency
• Represent knowledge contained in events described in Natural
language sentences
• Facilitate
• Drawing inferences from sentences
• Independent of original language in which it is specified
• It consists of specific set of primitives/symbols and also provides a
suitable structure
Eg: I gave the man a book

pmshiva@gmail.com Dr. P M Shivamurthy


Conceptual dependency
• Various Symbols have following meaning

• Some of the typical primitives are

pmshiva@gmail.com Dr. P M Shivamurthy


Conceptual dependency
• Four primitive conceptual categories are

• Common dependencies used and their usage eg and its English


translation is given below

pmshiva@gmail.com Dr. P M Shivamurthy


Conceptual dependency

pmshiva@gmail.com Dr. P M Shivamurthy


Conceptual dependency

pmshiva@gmail.com Dr. P M Shivamurthy


Conceptual dependency
• A set of conceptual tenses used with events are

pmshiva@gmail.com Dr. P M Shivamurthy


Conceptual dependency
• Three ways it facilitates the reasoning of knowledge
• Fewer inference rule are enough to handle reasoning if the knowledge is not
broken down to primitives
• Many inferences are contained in the representation
• Initial structure will always have holes that need to be filled while elaborating
• First, A higher level primitive ACT ATRANS can represent lower
primitives as give, take, steal and donate
• Second, the rule applied in past can be represented as a structure for
further processing, no need to repeat the rules again

pmshiva@gmail.com Dr. P M Shivamurthy


Conceptual dependency

pmshiva@gmail.com Dr. P M Shivamurthy


Conceptual dependency
• Conceptual dependency is treated as only a theory of events, but
have limitations in providing descriptive knowledge about an object
• Also it fails to represent the sequence of events, which can be
represented using scripts

pmshiva@gmail.com Dr. P M Shivamurthy


Scripts
• It is used to describe a stereotyped sequence of events in a particular
context
• Scripts have slots to be filled with values just similar to the frames,
but it associates contextual sequences
• Important components of scripts are
• Entry conditions: Initial state or precondition satisfied
• Result: Final state or post event outcomes
• Props: Objects involved in the events specified in the script
• Roles: The particular roles played by the objects
• Track: Different scenes of the scripts sharing common objects
• Scenes: The actual sequence of events that occur

pmshiva@gmail.com Dr. P M Shivamurthy


pmshiva@gmail.com Dr. P M Shivamurthy
Scripts
• Scripts represent a particular pattern to the occurrence of events
using giant causal chain.
• This chain begins with entry conditions and end with Results
• Scripts are useful in predicting the events and the sequence of
events/connection between events
• Scripts can be activated whenever necessary with suitable pointer
• Fleeting scripts are those which are unexpanded but have a mention

• Non-fleeting scripts need to be activated, elaborated and expanded


pmshiva@gmail.com Dr. P M Shivamurthy
Scripts
• The scripts provide the ability to predict events, which are not
explicitly observed

• We need to predict on the event


• These structures are stereotyped similar to frames and can help in
predicting unobserved events
• This also assist in building a single coherent interpretation from a
collection of observations

pmshiva@gmail.com Dr. P M Shivamurthy


Scripts

• There are two answers for this question


• If you reason backwards in the script, the answer is” because she asked for it”
• If reasoned forward, the answer is “ So that susan decide what to order”
• Scripts focuses attention on unusual events

pmshiva@gmail.com Dr. P M Shivamurthy

You might also like