0% found this document useful (0 votes)
73 views17 pages

UNIT2

The document discusses knowledge representation in artificial intelligence. It describes what knowledge representation is, the types of knowledge that need to be represented, and different techniques for knowledge representation including logical representation, semantic networks, frames, and production rules.

Uploaded by

Ayush Nighot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
73 views17 pages

UNIT2

The document discusses knowledge representation in artificial intelligence. It describes what knowledge representation is, the types of knowledge that need to be represented, and different techniques for knowledge representation including logical representation, semantic networks, frames, and production rules.

Uploaded by

Ayush Nighot
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 17

Introduction to Knowledge Representation

Humans are best at understanding, reasoning, and interpreting knowledge. Human knows
things, which is knowledge and as per their knowledge they perform various actions in the real
world. But how machines do all these things comes under knowledge representation and
reasoning. Hence we can describe Knowledge representation as following:

 Knowledge representation and reasoning (KR, KRR) is the part of Artificial intelligence
which concerned with AI agents thinking and how thinking contributes to intelligent
behavior of agents.
 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.
 It is also a way which describes how we can represent knowledge in artificial
intelligence. Knowledge representation is not just storing data into some database, but
it also enables an intelligent machine to learn from that knowledge and experiences so
that it can behave intelligently like a human.
What to Represent: Following are the kind of knowledge which needs to be represented in AI
systems:

 Object: All the facts about objects in our world domain. E.g., Guitars contains strings,
trumpets are brass instruments.
 Events: Events are the actions which occur in our world.
 Performance: It describe behavior which involves knowledge about how to do things.
 Meta-knowledge: It is knowledge about what we know.
 Facts: Facts are the truths about the real world and what we represent.
 Knowledge-Base: The central component of the knowledge-based agents is the
knowledge base. It is represented as KB. The Knowledgebase is a group of the
Sentences (Here, sentences are used as a technical term and not identical with the
English language).
Knowledge: Knowledge is awareness or familiarity gained by experiences of facts, data, and
situations. Following are the types of knowledge in artificial intelligence:

1. 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.
3. 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.
Techniques of knowledge representation:
There are mainly four ways of knowledge representation which are given as follows:
1. Logical Representation 3. Frame Representation.
2. Semantic Network Representation. 4. Production Rules
1. 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?
Two types of logic: proposition and predicate.
2. Semantic Network Representation: Semantic networks are alternative of predicate logic
for knowledge representation. In Semantic networks, we can represent our knowledge
in the form of graphical networks. This network consists of nodes representing objects
and arcs which describe the relationship between those objects. Semantic networks can
categorize the object in different forms and can also link those objects. Semantic
networks are easy to understand and can be easily extended.
This representation consists of mainly two types of relations:
a. IS-A relation (Inheritance)
b. Kind-of-relation
Example: Following are some statements which we need to represent in the form of
nodes and arcs.
Statements: a. Jerry is a cat. b. Jerry is a mammal c. Jerry is owned by Priya. d. Jerry is
brown colored. e. All Mammals are animal.
3. Frame Representation: A frame is a record like structure which consists of a collection
of attributes and its values to describe an entity in the world. Frames are the AI data
structure which divides knowledge into substructures by representing stereotypes
situations. It consists of a collection of slots and slot values. These slots may be of any
type and sizes. Slots have names and values which are called facets.
4. Production Rules: Production rules system consist of (condition, action) pairs which
mean, "If condition then action".
It has mainly three parts:
o The set of production rules
o Working Memory
o The recognize-act-cycle
Example: o IF (at bus stop AND bus arrives) THEN action (get into the bus) o IF (on the bus AND
paid AND empty seat) THEN action (sit down).

Knowledge Representation Using Logic:


 Logic is concerned with the truth of statements about the world.
 A science that deals with the principles and criteria of validity of inference and
demonstration. In other words, the science of the formal principles of reasoning.
 Generally, each statement is either TRUE or FALSE.
 Logic includes: Syntax, semantics and Inference Procedure.
o Syntax: specifies the symbol in the language about how they can be combined
to form sentences in logic.
o Semantic: Specifies how to assign a truth value to a sentence based on its
meaning in the world. It specifies what facts a sentence based on its meaning in
the world. It specifies what facts a sentence refers to. A fact is a claim about the
world, and it may be TRUE or FALSE
o Inference Procedure: Specifies methods for computing new sentences from the
existing sentences.
 Logic is a language for reasoning.
 A collection of rules used while doing logical reasoning.
 Logic can be used to represent simple facts.
 The facts are claims about the world that are True or False.
 To build a Logic-based representation:
 User defines a set of primitive symbols and the associated semantics.
 Logic defines ways of putting symbols together so that user can define legal
sentences in the language that represent TRUE facts.
 Logic defines ways of inferring new sentences from existing ones.
Two types Logic in Knowledge Representation:
1.Propositional Logic:
Propositional logic (PL) is the simplest form of logic where all the statements are made by
propositions. A proposition is a declarative statement which is either true or false.
It is a technique of knowledge representation in logical and mathematical form.
Example: a) It is Sunday.
b) The Sun rises from West (False proposition)
c) 3+3= 7(False proposition)
d) 5 is a prime number.
2.Predicate Logic: Predicate logic is an extension of Propositional logic. It adds the concept of
predicates and quantifiers to better capture the meaning of statements that cannot be
adequately expressed by propositional logic.
A predicate is an expression of one or more variables determined on some specific domain. A
predicate with variables can be made a proposition by either authorizing a value to the variable
or by quantifying the variable.
The following are some examples of predicates.
Consider E(x, y) denote "x = y".
Consider X(a, b, c) denote "a + b + c = 0".
Consider M(x, y) denote "x is married to y.".

Propositional Logic:
Propositional logic (PL) is the simplest form of logic where all the statements are made by
propositions. A proposition is a declarative statement which is either true or false. It is a
technique of knowledge representation in logical and mathematical form.
Example: a) It is Sunday.
b) The Sun rises from West (False proposition)
c) 3+3= 7(False proposition)
d) 5 is a prime number.
Following are some basic facts about propositional logic:

 Propositional logic is also called Boolean logic as it works on 0 and 1.


 In propositional logic, we use symbolic variables to represent the logic, and we can use
any symbol for a representing a proposition, such A, B, C, P, Q, R, etc.
 Propositions can be either true or false, but it cannot be both.
 Propositional logic consists of an object, relations or function, and logical
connectives,These connectives are also called logical operators.
 The propositions and connectives are the basic elements of the propositional logic.
 Connectives can be said as a logical operator which connects two sentences.
 A proposition formula which is always true is called tautology, and it is also called a valid
sentence.
 A proposition formula which is always false is called Contradiction.
 A proposition formula which has both true and false values is called Contingency.
 Statements which are questions, commands, or opinions are not propositions such as
"Where is Rohini", "How are you", "What is your name", are not propositions.
Syntax of propositional logic: The syntax of propositional logic defines the allowable sentences
for the knowledge representation.
There are two types of Propositions: a) Atomic Propositions b) Compound propositions
Atomic Proposition: Atomic propositions are the simple propositions. It consists of a single
proposition symbol. These are the sentences which must be either true or false.
Example: a) 2+2 is 4, it is an atomic proposition as it is a true fact.
b) "The Sun is cold" is also a proposition as it is a false fact.
Compound proposition: Compound propositions are constructed by combining simpler or
atomic propositions, using parenthesis and logical connectives.
Example: a) "It is raining today, and street is wet."
b)"Ankit is a doctor, and his clinic is in Mumbai."

Semantics of Propositional Logic:


The semantics of formulas in a logic, are typically defined with respect to a model, which
identifies a “world” in which certain facts are true. In the case of propositional logic, this world
or model is a truth valuation or assignment that assigns a truth value (true/false) to every
proposition.
In propositional Logic the semantics of connectives are specified by truth table:
There are mainly five connectives, which are given as follows:
1. Negation: A sentence such as ¬ P is called negation of P. A literal can be either Positive literal
or negative literal.
2. Conjunction: A sentence which has ∧ connective such as, P ∧ Q is called a conjunction.
Example: Rohan is intelligent and hardworking. It can be written as,
P= Rohan is intelligent, Q= Rohan is hardworking. → P∧ Q.
3. Disjunction: A sentence which has ∨ connective, such as P ∨ Q. is called disjunction, where P
and Q are the propositions. Example: "Ritika is a doctor or Engineer", Here P= Ritika is Doctor.
Q= Ritika is Doctor, so we can write it as P ∨ Q.
4. Implication: A sentence such as P → Q, is called an implication. Implications are also known
as if-then rules. It can be represented as If it is raining, then the street is wet. Let P= It is raining,
and Q= Street is wet, so it is represented as P → Q
5. Biconditional: A sentence such as P⇔ Q is a Biconditional sentence, example If I am
breathing, then I am alive P= I am breathing, Q= I am alive, it can be represented as P ⇔ Q.
Following is the summarized table for Propositional Logic Connectives:

Truth Table:

In propositional logic, we need to know the truth values of propositions in all possible
scenarios. We can combine all the possible combination with logical connectives, and the
representation of these combinations in a tabular format is called Truth table. Following are
the truth table for all logical connectives.
Truth table with three propositions:

We can build a proposition composing three propositions P, Q, and R. This truth table is made-
up of 8n Tuples as we have taken three proposition symbols.

Properties of Propositional Logic Statements:

Satisfiable
An atomic propositional formula can be considered satisfiable if an interpretation exists for
which it is true.

Tautology
A propositional formula is valid or a tautology only if it holds true for every possible
interpretation.

Contradiction
A propositional formula is considered to be contradictory or unsatisfiable if there no
interpretation exists for which it is true.

Contingent
It is possible for a propositional logic to be contingent. This basically means that it can be
neither a tautology nor a contradiction.
Knowledge based System:
 A knowledge based system is a computer program that uses AI to solve problems
within a specialized domain that ordinarily required human expertise.
 Typical tasks for expert system involves classification, monitoring, design scheduling
and planning for specialized tasks.
 Knowledge based system is more general that expert system
 Knowledge based system use explicit representation of knowledge in the form of
words and symbols.
 Knowledge based system includes techniques such as rule based, model based and
case based reasoning. They were among first forms of investigation into AI and
remain a major theme
Types of knowledge-based systems:
Some example types of knowledge-based systems include the following:
Blackboard systems: These systems enable multiple sources to input new information into a
system to help create solutions to potential problems. Blackboard systems rely heavily on
updates from human experts.
Case-based systems: These systems use case-based reasoning to create solutions to a problem.
This system works by reviewing past data of similar situations.
Classification systems: These systems analyze different data to understand its classification
status.
Eligibility analysis systems: These systems are used to determine a user's eligibility for a
specific service. A system asks a user guided questions until it receives a disqualifying answer.
Expert systems: These are a common type of KBS that simulate human expert decision-making
in a particular field. Expert systems provide solutions for problems as well as the explanations
behind them. For example, they could be used for calculations and predictions.
Intelligent tutoring systems: These systems are designed to support human learning and
education. Intelligent tutoring systems provide users with instructions and give feedback based
on performance or questions.
Medical diagnosis systems: These systems help diagnose patients by inputting data or having a
patient answer a series of questions. Based on the responses, the KBS identifies a diagnosis and
makes recommendations medical professionals can use to determine a patient's treatment.
Rule-based systems: These systems rely on human-specified rules to analyze or change data to
reach a desired outcome. For example, rule-based systems might use if-then rules.

Structure of knowledge based system:


Knowledge-based systems usually contain three components: a human-computer interface, a
knowledge base, and an inference engine program.
User interface:
 The user interface is the most crucial part of the knowledge base system.
 This component takes the user’s query in a readable form and passes it to inference
engine.
 After that, it displays the results to the user, in other words, it’s an interface that helps
the user communicate with the knowledge base system
The user interface may include features such as:
Search functionality: Allows users to enter queries and retrieve relevant knowledge items
from the knowledge base.
Navigation menus: Provide options for browsing or selecting specific categories, topics, or
subcategories within the knowledge base.
Filters and sorting: Enable users to refine search results based on specific criteria or sort
knowledge items based on relevance, date, or other attributes.
Display of knowledge items: Present retrieved knowledge items in a readable and
structured format, including text, images, diagrams, or multimedia content.
Interactive elements: Allow users to provide feedback, rate articles, comment on content,
or engage in discussions with other users.
The inference engine:
 It is the brain of the knowledge base system it contains rules to solve a specific problem.
 It selects facts and rules to apply when try to answer the user’s query.
 It provides reasoning about the information in the knowledge base.
 Inference engine helps in analyzing the problem to find the solution.
 This component is also helpful for formulating conclusions.
The inference engine typically performs the following tasks:
Query processing: Analyzes user queries, identifies the intent, and determines the
appropriate knowledge items or rules to apply.
Knowledge retrieval: Accesses the knowledge base to retrieve relevant information based
on the user's query.
Reasoning and inference: Applies logical rules, inference techniques, or machine learning
algorithms to draw conclusions or make recommendations based on the retrieved
knowledge.
Answer generation: Constructs responses or outputs based on the analysis and reasoning
performed on the user query and the knowledge available in the knowledge base.
The knowledge base:
 It contains the domain specific and high quality knowledge.
 A knowledge base is an organized collection of facts about the system's domain.
 An inference engine interprets and evaluates the facts in the knowledge base in order to
provide an answer.
 Knowledge is required to exhibit intelligence.
 The success of knowledge base system highly depends upon the collection of highly
accurate and precise knowledge.
The knowledge base typically includes the following elements:
Knowledge items: Articles, documents, or individual units of knowledge that provide
information or solutions to specific problems or questions.
Categorization and organization: The knowledge base is structured using taxonomies or
categorization schemes to classify and organize knowledge items into relevant categories,
topics, or subtopics.
Metadata: Additional information about knowledge items, such as titles, tags, keywords,
authors, dates, and version numbers, to facilitate search, retrieval, and management.
Relationships and connections: Links or associations between related knowledge items to
create a network of interconnected knowledge within the knowledge base.
Updates and maintenance: Mechanisms to regularly update and maintain the knowledge
base, including content creation, editing, version control, and quality assurance processes.

Semantics Networks: Types and Components


A semantic network is a graphic notation for representing knowledge in patterns of
interconnected nodes. Semantic networks became popular in artificial intelligence and natural
language processing only because it represents knowledge or supports reasoning. These act as
another alternative for predicate logic in a form of knowledge representation.
The structural idea is that knowledge can be stored in the form of graphs, with nodes
representing objects in the world, and arcs representing relationships between those objects.
 Semantic nets consist of nodes, links and link labels. In these networks diagram, nodes appear
in form of circles or ellipses or even rectangles which represents objects such as physical
objects, concepts or situations.
 Links appear as arrows to express the relationships between objects, and link labels specify
relations.
 Relationships provide the basic needed structure for organizing the knowledge, so therefore
objects and relations involved are also not needed to be concrete.
 Semantic nets are also referred to as associative nets as the nodes are associated with other
nodes.
Nodes representing objects:
Circle – physical object
Ellipse-Concept
Rectangle-situation
Semantic Networks Are Majorly Used for:
 Representing data.
 Revealing structure (relations, proximity, relative importance).
 Supporting conceptual edition.
 Supporting navigation.
Main Components of Semantic Networks:
 Lexical component {Nodes, Links and labels}: nodes denoting physical objects or links are
relationships between objects; labels denote the specific objects and relationships
 Structural component {Directed (Links and Nodes)}: the links or nodes from a diagram which
is directed.
 Semantic component {Definition related to link or nodes (facts)}: Here the definitions are
related only to the links and label of nodes, whereas facts depend on the approval areas.
 Procedural part {(Constructor: creation of new links) (Destructor: removal of links and
nodes)}: constructors permit the creation of the new links and nodes. The removal of links and
nodes are permitted by destructors.
Six Mostly Used Types of Semantic Networks

 Definitional Networks- These networks emphasizes and deals with only the subtype or is a
relation between a concept type and a newly defined subtype. A producing network is referred
to as generalization hierarchy. It supports the inheritance rule for duplicating attributes.

Fig: Definitional Networks

 Assertion Networks– Are designed to assert propositions.Unlike definitional network, the


information in an assertional network is assumed to be contingently true, unless it is explicitly
marked with a modal operator.

Fig: Assertion Networks

 Implicational Networks – Uses Implication as the primary connection for connecting nodes.
These networks are also used to explain patterns of convictions, causality and even deductions.
Fig: Implicational Networks

 Executable Network- Contains mechanisms that can cause some changes to the network
itself by incorporating some techniques, for example, such as attached procedures or marker
passing which can perform path messages, or associations and searches for patterns.

Fig: Executable Network

 Learning Networks – These are the networks that build and extend their representations by
acquiring knowledge through examples. Contain mechanisms in such networks brings changes
within the network itself through representation by securing information. A classic example
could be like, the changing of new information from the old system by including and excluding
nodes and arcs, or by changing numerical qualities called weights, and connected with the arcs
and nodes.

Fig: Learning Networks

 Hybrid Networks – Networks that combine two or more of previous techniques, either in a
single network or in a separate, but closely interacting network Hybrid network has been clearly
created to implement ideas regarding human cognitive mechanisms, while some are created
generally for computer performance. Since Semantic networks in artificial intelligence also
come in many other varied forms, we mentioned only a few major ones, there are many more
nearly 40. While these tools have greater potential for supporting not only machines but also
human users in their quest for processing ideas, language, they cannot replace the cognitive
capabilities of a human brain.

Fig: Hybrid Networks

Semantic Relationships: Of the fifty-four semantic relationships the primary link between
most semantic types is the isa relationship. The 'isa' relationship establishes the hierarchy of
types within the Semantic Network and is used for deciding on the most specific semantic type
available for assignment to a Metathesaurus concept.
Some examples of the 'isa' relationship:
Animal isa Entity
Carbohydrate isa Chemical
Human isa Mammal
There are five major, non-hierarchical relationships:
Physically related to
Spatially related to
Temporally related to
Functionally related to
Conceptually related to

You might also like