unit3
unit3
unit3
Artificial Intelligence(AI)
UNIT-3
KNOWLEDGE
REPRESENTATION
Knowledge Representation
•It is responsible for representing information about the real world so that a
computer can understand and can utilize this knowledge to solve the
complex real world problems such as diagnosis a medical condition or
communicating with humans in natural language.
Object: All the facts about objects in our world domain. E.g., Guitars
contains strings, trumpets are brass instruments.
Declarative Knowledge:
•Declarative knowledge is to know about something.
•It includes concepts, facts, and objects.
•It is also called descriptive knowledge and expressed in declarative sentences.
•It is simpler than procedural language.
2. Procedural Knowledge
•It is also known as imperative knowledge.
•Procedural knowledge is a type of knowledge which is responsible for
knowing how to do something.
•It can be directly applied to any task.
•It includes rules, strategies, procedures, agendas, etc.
•Procedural knowledge depends on the task on which it can be applied.
Meta-knowledge:
Knowledge about the other types of knowledge is called Meta-knowledge.
4. Heuristic knowledge:
•Heuristic knowledge is representing knowledge of some experts in a filed or
subject.
•Heuristic knowledge is rules of thumb based on previous experiences,
awareness of approaches, and which are good to work but not guaranteed.
5. Structural knowledge:
•Structural knowledge is basic knowledge to problem-solving.
•It describes relationships between various concepts such as kind of, part of,
and grouping of something.
•It describes the relationship that exists between concepts or objects.
Approaches to knowledge representation:
•In the inheritable knowledge approach, all data must be stored into a hierarchy of
classes.
•All classes should be arranged in a generalized form or a hierarchal manner. In
this approach, we apply inheritance property. Elements inherit values from other
members of a class.
•This approach contains inheritable knowledge which shows a relation between
instance and class, and it is called instance relation.
•Every individual frame can represent the collection of attributes and its value. In
this approach, objects and values are represented in Boxed nodes.
•We use Arrows which point from objects to their values.
Inferential knowledge:
•Inferential knowledge approach represents knowledge in the
form of formal logics.
•This approach can be used to derive more facts.
•It guaranteed correctness.
man(Marcus)
∀x = man (x) ----------> mortal (x)s
Procedural knowledge:
•Procedural knowledge approach uses small programs and codes
which describes how to do specific things, and how to proceed.
1. Representational Accuracy:
KR system should have the ability to represent all kind of required
knowledge.
2. Inferential Adequacy:
KR system should have ability to manipulate the representational
structures to produce new knowledge corresponding to existing
structure.
3. Inferential Efficiency:
The ability to direct the inferential knowledge mechanism into the most
productive directions by storing appropriate guides.
There are mainly four ways of knowledge representation which are given as
follows:
Logical Representation
Semantic Network Representation
Frame Representation
Production Rules
Fig: Knowledge representation Technique
Logical Representation
•Logical representation is a language with some concrete rules which deals
with propositions and has no ambiguity in representation.
•Logical representation means drawing a conclusion based on various
conditions.
•This representation lays down some important communication rules.
•It consists of precisely defined syntax and semantics which supports the
sound inference.
•Each sentence can be translated into logics using syntax and semantics.
Syntax:
•Syntaxes are the rules which decide how we can construct legal sentences
in the logic.
•It determines which symbol we can use in knowledge representation.
•How to write those symbols.
Semantics:
•Semantics are the rules by which we can interpret the sentence in the
logic.
•Semantic also involves assigning a meaning to each sentence.
Statements:
•Jerry is a cat.
•Jerry is a mammal
•Jerry is owned by Priya.
•Jerry is brown colored.
•All Mammals are animal.
In the above diagram, we have represented the different type of
knowledge in the form of nodes and arcs. Each object is
connected with another object by some relation.
Drawbacks in Semantic representation:
•In production rules agent checks for the condition and if the
condition exists then production rule fires and corresponding
action is carried out.
• The condition part of the rule determines which rule may be
applied to a problem. And the action part carries out the
associated problem-solving steps.
•This complete process is called a recognize-act cycle.
First-order logic is also known as Predicate logic or First-order predicate logic (FOI).
First-order logic is a powerful language that develops information about the objects in a
more easy way and can also express the relationship between those objects.
First-order logic (like natural language) does not only assume that the world contains
facts like propositional logic but also assumes the following things in the world:
Objects: A, B, people, numbers, colors, wars, theories, squares, pits, wumpus, ......
Relations: It can be unary relation such as: red, round, is adjacent, or n-any relation
such as: the sister of, brother of, has color, comes between
Function: Father of, best friend, third inning of, end of, ......
As a natural language, first-order logic also has
two main parts: Syntax
Semantics
What is Unification?
•Unification is a process of making two different logical atomic expressions identical by finding a
substitution. Unification depends on the substitution process.
•It takes two literals as input and makes them identical using substitution.
•Let Ψ1 and Ψ2 be two atomic sentences and 𝜎 be a unifier such that, Ψ1𝜎 = Ψ2𝜎, then it can be
expressed as UNIFY(Ψ1, Ψ2).
•Example: Find the MGU for Unify{King(x), King(John)}
Let Ψ1 = King(x), Ψ2 = King(John),
Substitution θ = {John/x} is a unifier for these atoms and applying this substitution, and both
expressions will be identical.
•Substitution θ = {John/x} is a unifier for these atoms and applying this substitution,
and both expressions will be identical.
•The UNIFY algorithm is used for unification, which takes two atomic sentences and
returns a unifier for those sentences (If any exist).
•Unification is a key component of all first-order inference algorithms.
•It returns fail if the expressions do not match with each other.
•The substitution variables are called Most General Unifier or MGU.
•E.g. Let's say there are two different expressions, P(x, y), and P(a, f(z)).
•In this example, we need to make both above statements identical to each other. For
this, we will perform the substitution.
Substitute x with a, and y with f(z) in the first expression, and it will be represented
as a/x and f(z)/y.
With both the substitutions, the first expression will be identical to the second expression and
the substitution set will be: [a/x, f(z)/y].