0% found this document useful (0 votes)
50 views

Module 2

The document discusses different types of knowledge representation in artificial intelligence. It describes four main types: relational knowledge, inheritable knowledge, inferential knowledge, and procedural knowledge. It provides examples and explanations of each type of knowledge representation and how they can be used to represent knowledge and enable reasoning.

Uploaded by

V Neha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
50 views

Module 2

The document discusses different types of knowledge representation in artificial intelligence. It describes four main types: relational knowledge, inheritable knowledge, inferential knowledge, and procedural knowledge. It provides examples and explanations of each type of knowledge representation and how they can be used to represent knowledge and enable reasoning.

Uploaded by

V Neha
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 128

Module-2

Knowledge representation issues


Representations & Mappings: In order to solve complex problems in AI we need: - A
large amount of knowledge - Some mechanisms for manipulating that knowledge to
create solutions to new problem. A variety of ways of representing knowledge have
been exploited in AI problems. In this regard we deal with two different kinds of entities:
Facts: truths about the real world and these are the things we want to represent.
Representation of the facts in some chosen formalism. These are the things which we
will actually be able to manipulate.
One way to think of structuring these entities is as two levels:
Knowledge Level, at which facts are described.
Symbol Level, at which representations of objects at the knowledge level are defined
in terms of symbols that can be manipulated by programs.
Mappings between Facts and Representations:
Mutilated Checkerboard Problem:
• Problem: In a normal chess board the opposite corner squares have been
eliminated. The given task is to cover all the squares on the remaining board by
dominoes so that each domino covers two squares. No overlapping of dominoes
is allowed, can it be done?

• Consider three data structures


• The first representation does not directly suggest the answer to the problem.

• The second may suggest.

• The third representation does, when combined with the single additional facts
that each domino must cover exactly one white square and one black square.
• The puzzle is impossible to complete.

• A domino placed on the chessboard will always cover one white square and
one black square.

• Therefore a collection of dominoes placed on the board will cover an equal


numbers of squares of each color.

• If the two white corners are removed from the board then 30 white squares
and 32 black squares remain to be covered by dominoes, so this is impossible.

• If the two black corners are removed instead, then 32 white squares and 30
black squares remain, so it is again impossible.
• The solution is number of squares must be equal for positive solution.

• In the above figure, the dotted line across the top represents the abstract
reasoning process that a program is intended to model.
• The solid line across the bottom represents the concrete reasoning process that a
particular program performs

• This program successfully models the abstract process to the extent that, when
the backward representation mapping is applied to the program’s output, the
appropriate final facts are actually generated.

• If no good mapping can be defined for a problem, then no matter how good the
program to solve the problem is, it will not be able to produce answers that
correspond to real answers to the problem.
Using Knowledge
Let us consider to what applications and how knowledge may be used.

• Learning: acquiring knowledge. This is more than simply adding new facts to a
knowledge base.

➢New data may have to be classified prior to storage for easy retrieval, etc..
Interaction and inference with existing facts to avoid redundancy and replication in
the knowledge and also so that facts can be updated.

• Retrieval: The representation scheme used can have a critical effect on the
efficiency of the method. Humans are very good at it.

➢Many AI methods have tried to model human.

• Reasoning: Infer facts from existing data.


• If a system on only knows:

• Miles Davis is a Jazz Musician.

• All Jazz Musicians can play their instruments well.

• If things like Is Miles Davis a Jazz Musician? or Can Jazz Musicians play their
instruments well? are asked then the answer is readily obtained from the data
structures and procedures.

• However a question like “Can Miles Davis play his instrument well?” requires
reasoning.

• The above are all related. For example, it is fairly obvious that learning and
reasoning involve retrieval etc.
Approaches to Knowledge Representation
A good Knowledge representation enables fast and accurate access to Knowledge and understanding of

content. The goal of Knowledge Representation (KR) is to facilitate conclusions from knowledge.

The following properties should be possessed by a knowledge representation system.

• Representational Adequacy: the ability to represent all kinds of knowledge that are needed in that

domain;

• Inferential Adequacy: the ability to manipulate the knowledge represented to produce new

knowledge corresponding to that inferred from the original;

• Inferential Efficiency: the ability to incorporate into the knowledge structure additional information

that can be used to focus the attention of the inference mechanisms in the most promising directions.
• Acquisitional Efficiency: the ability to acquire new information easily. The
simplest case involves direct insertion, by a person of new knowledge into the
database. Ideally, the program itself would be able to control knowledge
acquisition.

No single system that optimizes all of the capabilities for all kinds of knowledge
has yet been found. As a result, multiple techniques for knowledge representation
exist.
Knowledge Representation Schemes
• There are four types of Knowledge Representation:

1. Relational Knowledge: – provides a framework to compare two objects


based on equivalent attributes – any instance in which two different objects
are compared is a relational type of knowledge

2. Inheritable Knowledge: – is obtained from associated objects – it prescribes


a structure in which new objects are created which may inherit all or a subset
of attributes from existing objects.
3. Inferential Knowledge – is inferred from objects through relations among
objects –

Example: a word alone is simple syntax, but with the help of other words in
phrase the reader may infer more from a word; this inference within linguistic is
called semantics.

4. Declarative Knowledge – a statement in which knowledge is specified, but the


use to which that knowledge is to be put is not given. – Example: laws, people’s
name; there are facts which can stand alone, not dependent on other knowledge
5. Procedural Knowledge – a representation in which the control information, to
use the knowledge is embedded in the knowledge itself. – Example: computer
programs, directions and recipes; these indicate specific use or implementation
Simple Relational Knowledge
• The simplest way of storing facts is to use a relational method where each fact
about a set of objects is set out systematically in columns.

• This representation gives little opportunity for inference, but it can be used as
the knowledge basis for inference engines.

1. Simple way to store facts.

2. Each fact about a set of objects is set out systematically in columns.

3. Little opportunity for inference.

4. Knowledge basis for inference engines


• Given the facts it is not possible to answer simple question such as "Who is the heaviest player?" but if a

procedure for finding heaviest player is provided, then these facts will enable that procedure to compute an

answer.

• We can ask things like who "bats - left" and "throws - right".
Inheritable Knowledge
• Here the knowledge elements inherit attributes from their parents.

• The knowledge is embodied in the design hierarchies found in the functional,


physical and process domains.

• Within the hierarchy, elements inherit attributes from their parents, but in
many cases not all attributes of the parent elements be prescribed to the child
elements.

• The inheritance is a powerful form of inference, but not adequate. The basic KR
needs to be augmented with inference mechanism.
• The KR in hierarchical structure, shown below, is called “semantic network” or a
collection of “frames” or “slot-and-filler structure”.

• The structure shows property inheritance and way for insertion of additional
knowledge.

• Property inheritance: The objects or elements of specific classes inherit


attributes and values from more general classes. The classes are organized in a
generalized hierarchy.
• The directed arrows represent attributes (isa, instance, team) originates at object
being described and terminates at object or its value

• The box nodes represent objects and values of the attributes.


• The directed arrows represent attributes (isa, instance, team) originates at object
being described and terminates at object or its value.

• The box nodes represent objects and values of the attributes.


Inferential Knowledge:
• This knowledge generates new information from the given information.

• This new information does not require further data gathering from source, but
does require analysis of the given information to generate new knowledge.

• In this, we represent knowledge as formal logic.

• Example: - given a set of relations and values, one may infer other values or
relations - a predicate logic (a mathematical deduction) is used to infer from a
set of attributes. - inference through predicate logic uses a set of logical
operations to relate individual data. - the symbols used for the logic operations
are:
Procedural Knowledge
• Procedural knowledge can be represented in programs in many ways. The
most common way is simply as for doing something.

• The machine uses the knowledge when it executes the code to perform a
task. Procedural Knowledge is the knowledge encoded in some procedures.

• Unfortunately, this way of representing procedural knowledge gets low scores


with respect to the properties of inferential adequacy (because it is very
difficult to write a program that can reason about another program’s behavior)
and acquisitional efficiency (because the process of updating and debugging
large pieces of code becomes unwieldy)
• The most commonly used technique for representing procedural knowledge in AI
programs is the use of production rules.

• Production rules, particularly ones that are augmented with information on how
they are to be used, are more procedural than are the other representation
methods.
• But making a clean distinction between declarative and procedural knowledge
is difficult.

• The important difference is in how the knowledge is used by the procedures


that manipulate it.

• Heuristic or Domain Specific knowledge can be represented using Procedural


Knowledge.
Issues in Knowledge Representation
• Introduce an explicit notation for temporal interval.
• If two different values are ever asserted for the same temporal interval, signal a contradiction
automatically.
• 1. Assume that the only temporal interval that is of interest is now. So if a new value is
asserted, replace the old value.
• 2. Provide no explicit support. Logic-based systems are in this category. But in these systems,
knowledge base builders can add axioms that state that if an attribute has one value then it is
known not to have all other values.
Definition: A CONCEPT LEARNING TASK
• “Inferring a Boolean-valued function from training examples of its input and
output”.
• Consider the example task of learning the target concept "Days on which John
enjoys his favorite water sport.
• TASK→ To learn to predict the value of EnjoySport for an arbitrary day, based on
the values of its other attributes?

• Approach:

• Let each hypothesis be a vector of six constraints, specifying the values of the six
attributes Sky, AirTemp, Humidity, Wind, Water, and Forecast.

For each attribute, the hypothesis will either - Indicate by a “?” that any value is
acceptable for this attribute, - Specify a “single required value” (e.g., Warm) for
the attribute, or - Indicate by a "∅" that no value is acceptable
• ➔ If some instance x satisfies all the constraints of hypothesis h, then h classifies
x as a positive example (h(x) = 1).

• ➔ The hypothesis that PERSON enjoys his favorite sport only on cold days with
high humidity is represented by the expression (?, Cold, High, ?, ?, ?)

• ➔ The most general hypothesis-that every day is a positive example-is


represented by (?, ?, ?, ?, ?, ?)

• ➔ The most specific possible hypothesis-that no day is a positive example-is


represented by (∅ , ∅, ∅, ∅ , ∅, ∅)
Notation
• X→ The set of items over which the concept is defined is called the set of instances.
• Example,
• X is the set of all possible days, each represented by the attributes: Sky, AirTemp,
Humidity, Wind, Water, and Forecast.
• The concept or function to be learned is called the target concept, which is denoted
by c. c can be any Boolean valued function defined over the instances X
• c : X → {0,1}
• The target concept corresponds to the value of the attribute EnjoySport c(x) = 1 if
EnjoySport = Yes, and c(x) = 0 if EnjoySport = No - Instances for which c(x) = 1 →
positive examples, or members of the target concept.
• GOAL of the learner→ To find a hypothesis h such that h(x) = c(x) for all x in X
• Given:
• Instances X: Possible days, each described by the attributes
• Sky (with possible values Sunny, Cloudy, and Rainy),
• AirTemp (with values Warm and Cold),
• Humidity (with values Normal and High),
• Wind (with values Strong and Weak),
• Water (with values Warm and Cool),
• Forecast (with values Same and Change).
• Hypotheses H → Each hypothesis is described by a conjunction of constraints on the
attributes Sky, AirTemp, Humidity, Wind, Water, and Forecast.
• →The constraints may be"?" (any value is acceptable), “∅” (no value is acceptable), or
a specific value
• Target concept c: EnjoySport : X → {0, l}
• Training examples D: Positive and negative examples of the target function
• To DETERMINE→ A hypothesis h in H such that h(x) = c(x) for all x in X

• The inductive learning hypothesis

• Any hypothesis found to approximate the target function well over a sufficiently
large set of training examples will also approximate the target function well over
other unobserved examples.
VERSION SPACES AND THE CANDIDATE-
ELIMINATION ALGORITHM
Predicate Logic
• Predicate logic is used to represent Knowledge. Predicate logic will be met in
Knowledge Representation Schemes and reasoning methods.

• There are other ways but this form is popular.


Resolution in Predicate Logic
Two literals are contradictory if one can be unified with the negation of the other.

• For example man(x) and man (Himalayas) are contradictory since man(x) and
man(Himalayas ) can be unified.

• In predicate logic unification algorithm is used to locate pairs of literals that


cancel out.

• It is important that if two instances of the same variable occur, then they must
be given identical substitutions
Resolution Graph
Representing Knowledge using Rule
1. Declarative representation
• The declarative representation is one in which the knowledge is specified but
how to use to which that knowledge is to be put is not given.

• Declarative knowledge answers the question 'What do you know?'

• It is your understanding of things, ideas, or concepts.

• In other words, declarative knowledge can be thought of as the who, what,


when, and where of information.

• Declarative knowledge is normally discussed using nouns, like the names of


people, places, or things or dates that events occurred.
2. procedural representation
• The procedural representation is one in which the control information i.e.,
necessary to use the knowledge is considered to be embedded in the
knowledge itself.

• Procedural knowledge answers the question 'What can you do?’

• While declarative knowledge is demonstrated using nouns,

• Procedural knowledge relies on action words, or verbs.

• It is a person's ability to carry out actions to complete a task.


• Matching.
• Indexing
• Matching with Variables
• RETE Matching Algorithm
• Approximate Matching:
• Conflict Resolution:
• Search Control Knowledge:

You might also like