AI UNIT-3-PPT

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 103

UNIT - III

Advanced Knowledge Representation and Reasoning:


Knowledge Representation Issues, Nonmonotonic
Reasoning, Other Knowledge Representation Schemes
Reasoning Under Uncertainty: Basic probability, Acting
Under Uncertainty, Bayes’ Rule, Representing
Knowledge in an Uncertain Domain, Bayesian Networks
• Introduction:
Human beings are good at understanding, reasoning, and interpreting
knowledge and using this knowledge, they could be able to perform
various actions in the real world.
But,
How do machines perform the same?
How it helps machine in reasoning and interpretation?
KNOWLEDGE REPRESENTATION AND
REASONING
Knowledge representation in AI describes the representation of any
knowledge.
Knowledge representation also known as KR/KRR represents
information from the real world from a computer to understand and
then utilize this knowledge to solve complex real life problems like
communication with human beings in natural language.
Different Kinds of Knowledge Need to Represent the Following Things:
Objects, events, performance, facts, metaknowledge, and
knowledgebase.
Different types of knowledge:
• Declarative knowledge: This includes concepts, facts, and objects.
• Structural knowledge: It defines basic problem solving knowledge
that describes the relationship between the concepts and objects.
• Procedural knowledge: It is responsible for knowing how to define
something and includes rules, strategies, and procedures.
• Meta knowledge: Defines the knowledge about other types of
knowledge or data.
• Heuristic knowledge: This represents some experts knowledge in the
field or subject.
Cycle of Knowledge representation
Artificial Intelligent system usually consist of various concepts to display
intelligent behaviour.
Learning
Perception -----------------------------------------------------------------
Knowledge
Representation Reasoning

-----------------------------------------------------------------

Planning
This diagram shows interaction of AI with real world and
components involved in showing intelligent.
Execution
• PERCEPTION: It retrieves the data or information from the environment and
finds the source of noises and also checks if the AI was damaged by
anything and also sends to respond when any sense has been detected.
• LEARNING: Learns from the captured data by perception, focuses on self
improvement to learn new things, requires knowledge acquisition, past
searches, and inferences.
• KNOWLEDGE REPRESENTATION: Human likes intelligent in machine.
Simply, it represents all about understanding intelligent.
• REASONING: Instead of understanding knowledge or building from bottom-
up, the main goal is to understand intelligent behaviour from top-down and
focuses on what an intelligent system need to know in order to behave
intelligently.
• PLANNING & EXECUTION: This depend on the analysis of knowledge
representation and reasoning. (Planning includes initial state and finding
the every conditions and facts)
Relationship Between Knowledge and
Intelligence
• Knowledge plays a vital role in the real world.

Sensing Knowledge

Decision
maker

Whose actions are justified by sensing the


Action environment and using knowledge

• But assume what happens if we remove knowledge part. (It could not be able to display any
intelligent behaviour)
Techniques (other knowledge representation
schemes)
• 4 techniques:
1.Logic representation
2.Semantic network programming
• IS-A relation (inheritance)
• Kind of relation
3.Frame representation
4.Production rules
Requirements of Knowledge Representation:
1. Representation Accuracy: It is defined as that it should represent all
kind of required knowledge.
2. Inferential Adequacy: It is described as that it should be able to
manipulate the representation structure to produce new knowledge
corresponding to the existing structure.
3. Inferential Efficiency: It is the ability to direct the inferential
knowledge mechanism into the most productive system.
4. Acquisitional Efficiency: It is the ability to acquire new knowledge
easily using automatic methods.
Knowledge Representation
Issues
• The main goal is to facilitate the knowledge.
• The following are the some of the issues where represents the
knowledge.
1. Important attributes.
2. Relationship among attributes.
3. Choosing granularity.
4. Set of objects.
5. Finding the structure.
Important Attributes:
• In this any attributes of object that may occur in every problem
domain?
• There might be a chance of occurring 2 attributes namely
1. Instance.
2. Is-of
The above 2 attributes are important to represent the knowledge
because they help in inheritance.
Relationship Among Attributes:
This type of attributes may suspect that is there any important relation
between different attributes of objects?
There are four properties define to have relation between different attribute
of objects:
1. Inverse
2. Existence in an hierarchy
This defines in terms of generalization and specialization.
3. Reasoning for a value.
4. Single value attribute.
Choosing Granularity:
In this we define up to what level the knowledge can be represented
and what are the primitives?
Set of Objects
In this we define how set of objects can be represented?
Using universal quantifiers objects can be represented.
If the data
doesn’t exist in
Finding the Structure: the knowledge

It is defined how to search for relevant data structure or according to


particular situation, fetch or get the knowledge.
Example:
In the knowledge base if one of the data that does not exist, then how we
are going to find the structure to add the data or to get the data.

So, generally in order to find the structure of any data it includes:


1. How to perform an initial selection.
2. How to fill the appropriate details in current situation.
3. How to find better structure.
4. When to create and remember new structure.
Inductive reasoning
6. Non-Monotic Reasoning:
Other Knowledge Representation Schemes
• Logic representation (prepositional and predicate)
LR is a language with some definite rules which deal with proposition and has
no ambiguity in representation. It represents a conclusion based on various
conditions and place down some important common rules and also it consists
of precisely defined syntax and semantics which supports the sound inference.

Each sentence can be translated into sentence using syntax and semantics.

• Semantic Network
When do you say a particular sentence or statement is meaningful?
• A sentence is meaningful when we can really understand it and map it
to some of the known concepts of the real world in which we live or
see or can visualize or realize.

• Knowledge can be represented as a network of different concepts.

• If we consider semantic net as a knowledge representation method or


scheme then it must also have some particular inference mechanism
by which it can utilize this representation to infer new things to
answer different questions.
Nodes and Arcs
Components of semantic network
• In simple words semantic network representation works as an alternate for
predicate logic for known representations.
• In this we can represent the knowledge in the form of graphical networks.
• Consists of 2 types of relations:
IS-A relation (inheritance)
Other kind of relation (Non binary relation)
• Frame Representation
Example:
Example for Frame of car
• Instance frame: Instance frame inherits information from class frame.
We can give unique properties for instance.
• Inherits the behavior: one instance also inherits action
• Production rules:
A production system is based on a set of rules about behavior. These
rules are a basic representation found helpful in expert systems,
automated planning, and action selection. It also provides some form
of artificial intelligence.
What is Production System?
Production system or production rule system is a computer program
typically used to provide some form of artificial intelligence, which
consists primarily of a set of rules about behavior but it also includes
the mechanism necessary to follow those rules as the system responds
to states of the world.
Components of Production System
• The major components of Production System in Artificial Intelligence are:

• Global Database: The global database is the central data structure used by the
production system in Artificial Intelligence.

• Set of Production Rules: The production rules operate on the global database.
Each rule usually has a precondition that is either satisfied or not by the global
database. If the precondition is satisfied, the rule is usually be applied. The
application of the rule changes the database.

• A Control System: The control system then chooses which applicable rule
should be applied and ceases computation when a termination condition on
the database is satisfied. If multiple rules are to fire at the same time, the
control system resolves the conflicts.
Features of Production System
The main features of the production system include:
1. Simplicity: The structure of each sentence in a production system is unique and
uniform as they use the “IF-THEN” structure. This structure provides simplicity in
knowledge representation. This feature of the production system improves the
readability of production rules.

2. Modularity: This means the production rule code the knowledge available in discrete
pieces. Information can be treated as a collection of independent facts which may be
added or deleted from the system with essentially no deleterious side effects.

3. Modifiability: This means the facility for modifying rules. It allows the development of
production rules in a skeletal form first and then it is accurate to suit a specific
application.

4. Knowledge-intensive: The knowledge base of the production system stores pure


knowledge. This part does not contain any type of control or programming information.
Each production rule is normally written as an English sentence; the problem of
semantics is solved by the very structure of the representation.
Control/Search Strategies
• How would you decide which rule to apply while searching for a solution for any problem?
There are certain requirements for a good control strategy that you need to keep in mind, such
as:
• The first requirement for a good control strategy is that it should cause motion.
• The second requirement for a good control strategy is that it should be systematic.
• Finally, it must be efficient in order to find a good answer.

Production System Rules


Production System rules can be classified as:
• Deductive Inference Rules
• Abductive Inference Rules
• You can represent the knowledge in a production system as a set of rules along with a control
system and database. It can be written as:
• If(Condition) Then (Condition)
• The production rules are also known as condition-action, antecedent-consequent, pattern-
action, situation-response, feedback-result pairs.
Classes of Production System
There are four major classes of Production System in Artificial
Intelligence:
• Monotonic Production System
• Partially Commutative Production System
• Non-Monotonic Production Systems
• Commutative Systems
Reasoning under uncertainty
Handling uncertain knowledge
Uncertainty and rational decisions
Basic probability notation
Probability model
Prior probability
Random variables
Probability Distribution
Conditional probability
Axioms of probability
Joint probability distribution
Bayes' Rule
Applying Bayes' rule: Example

What is the probability of the disease that he has a stiff neck?


Using Bayes’ rule: combining
evidence
Representing Knowledge in an
uncertain domain
• There are various ways of representing uncertainty. Here we consider
three different approaches, representing three different areas of
uncertainty:
1. Probability theory
2. Fuzzy logic
3. Truth maintenance System
Probability theory:
• Probabilistic assertions and queries are not usually about particular possible worlds, but
about sets of them.
• In probability theory, the set of all possible worlds is called the sample space. The Greek
letter Ω (uppercase omega) is used to refer to the sample space, and ω (lowercase omega)
refers to elements of the space, that is, particular possible worlds.
• A fully specified probability model associates a numerical probability P (ω) with each
possible world.1 the basic axioms of probability theory say that every possible world has a
probability between 0 and 1 and that the total probability of the set of possible worlds is 1:
• 0 ≤P(ω) ≤1 for every ω and _ω∈Ω
• P(ω) = 1

i. If a coin is flipped there is an equal chance of it landing on head side or tail side, consider
H1 is for heads and H2 for tails. This scenario is expressed as P(H1)=0.5 and P(H2)=0.5.
ii. The probability of 1st and 2nd toss both landing on heads is 0.5*0.5=0.25.
iii. We can write this as P(H1^H2)-0.25 and in general two independent events P and Q,
P(P^Q)=P(P)*P(Q).
Fuzzy logic:
• In the existing expert systems, uncertainty is dealt with through a
combination of predicate logic and probability-based methods.
• An alternative approach to the management of uncertainty is based
on the use of fuzzy logic, which is the logic underlying approximate or,
equivalently, fuzzy reasoning.
• e.g., most, many, few, not very many, almost all, infrequently, about
0.8, etc.
• In this way, fuzzy logic subsumes both predicate logic and probability
theory, and makes it possible to deal with different types of
uncertainty within a single conceptual framework.
The term fuzzy refers to things which are not clear or are vague.
In the real world many times we encounter a situation when we
can’t determine whether the state is true or false, their fuzzy logic
provides a very valuable flexibility for reasoning. In this way, we
can consider the inaccuracies and uncertainties of any situation.
In boolean system truth value, 1.0 represents absolute truth value
and 0.0 represents absolute false value. But in the fuzzy system,
there is no logic for absolute truth and absolute false value. But in
fuzzy logic, there is intermediate value too present which is
partially true and partially false.
ARCHITECTURE

Its Architecture contains four parts :


• RULE BASE: It contains the set of rules and the IF-THEN conditions provided by
the experts to govern the decision making system, on the basis of linguistic
information. Recent developments in fuzzy theory offer several effective
methods for the design and tuning of fuzzy controllers. Most of these
developments reduce the number of fuzzy rules.
• FUZZIFICATION: It is used to convert inputs i.e. crisp numbers into fuzzy sets.
Crisp inputs are basically the exact inputs measured by sensors and passed into
the control system for processing, such as temperature, pressure, rpm’s, etc.
• INFERENCE ENGINE: It determines the matching degree of the current fuzzy
input with respect to each rule and decides which rules are to be fired according
to the input field. Next, the fired rules are combined to form the control actions.
• DEFUZZIFICATION: It is used to convert the fuzzy sets obtained by inference
engine into a crisp value. There are several defuzzification methods available
and the best suited one is used with a specific expert system to reduce the
error.
Truth maintenance System:
• To choose their actions, reasoning programs must be able to make
assumptions and subsequently revise their beliefs when discoveries
contradict these assumptions.
• The Truth Maintenance System (TMS) is a problem solver subsystem for
performing these functions by recording and maintaining the reasons for
program beliefs. Such recorded reasons are useful in constructing
explanations of program actions and in guiding the course of action of a
problem solver
• TMS are another form of knowledge representation which is best
visualized in terms of graphs.
• It stores the latest truth value of any predicate. The system is developed
with the idea that truthfulness of a predicate can change with time, as new
knowledge is added or exiting knowledge is updated.
• It keeps a record showing which items of knowledge is currently believed
or disbelieved.
Bayesian Networks:
• Representing knowledge in an uncertain domain:
1) Joint probability distribution
2)Bayes' rules allows unknown probabilities to be computed from
known

What is Bayesian network (belief network)?


A Bayesian network falls under the category of probabilistic graphical
modelling (PGM) technique that is used to compute uncertainties by
using the concept of probabilities
• They are used to module uncertainties by using DAG
What is DAG (Directed Acyclic Graph)
A DAG is used to represent Belief/Bayesian/casual networks and like
any other statistical graphs.
It contains nodes and links which shows relation between nodes.
Bayesian network applications
Nodes and values
Preliminary choices: Nodes and
values
Bayesian network structure
Lung cancer diagnosis:
CPT: (conditional probability table)
The Markov Property
Conditional independence

You might also like