UNIT2
UNIT2
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).
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:
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.
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.
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.
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.
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.
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.
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