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

Methods of Inference: Chapter - 4

The document discusses various types of reasoning processes used in artificial intelligence, including deductive reasoning, inductive reasoning, abductive reasoning, common sense reasoning, and monotonic reasoning. It also describes different inference methods like forward chaining, backward chaining, rule-based systems, and case-based reasoning. The key types of reasoning discussed are deductive reasoning, which derives logical conclusions, and inductive reasoning, which makes generalizations based on examples.

Uploaded by

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

Methods of Inference: Chapter - 4

The document discusses various types of reasoning processes used in artificial intelligence, including deductive reasoning, inductive reasoning, abductive reasoning, common sense reasoning, and monotonic reasoning. It also describes different inference methods like forward chaining, backward chaining, rule-based systems, and case-based reasoning. The key types of reasoning discussed are deductive reasoning, which derives logical conclusions, and inductive reasoning, which makes generalizations based on examples.

Uploaded by

kennatolosa
Copyright
© © All Rights Reserved
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 59

Methods of Inference

Chapter – 4
Reasoning
• The reasoning is the mental process of deriving logical conclusion and
making predictions from available knowledge, facts, and beliefs.
• "Reasoning is a way to infer facts from existing data.”
• It is a general process of thinking rationally, to find valid conclusions.
• The reasoning is essential so that the machine can also think rationally as a
human brain, and can perform like a human.
The Process of Reasoning
• Reasoning: The process of drawing inferences or conclusions; moving from
what is known (fact) to what is unknown (inference).
• Types of Reasoning:
1. Reasoning from signs:
2. Cause and effect:
3. Reasoning by analogy:
4. Reasoning by example
Reasoning from signs

• Assuming that a sign or symbol represents or indicates something specific


thing .
Example: making a phone call and receiving a busy signal.

The assumption is that someone is already on the line.

• The sign, busy signal is used to infer (conclude) that someone is on the
phone.

• There should be enough information to relate the sign to the inference


Cause and effect
• Inferring that one event causes another
“I was late because my alarm didn’t go off.”
• or reasoning with the result in mind
• “If I don’t study, I will fail the test.”
• Important that there is enough information to link the events.
• Beware of assuming that things that happen sequentially are causally related
“I got HIV/AIDS because I had unprotected sex”
Reasoning by analogy
• Drawing a parallel between two similar events, people, or traits.
• Based on comparisons.
Example: If all mothers are women, and Ann is a mother, then Ann must be a
woman.
• Care should be taken to always check analogies for validity, because these
don’t always work backwards.
Example: Because Ann is a woman doesn’t mean she’s a mother.
Reasoning by example:

• Basing conclusions on facts, illustrations, or cases.


Example: Conclusions drawn from the results of polls or surveys.

Example: Mende has an approval rating of 40%, which is 15% more them his
closest challenger so he will be elected in the next election.”

• When drawing conclusions, always ask, “Do I have enough facts to


support this?”
Inference engine

• The inference engine is the component of the intelligent system in artificial


intelligence, which applies logical rules to the knowledge base to infer new
information from known facts.

• The first inference engine was part of the expert system.

• Inference engine commonly proceeds in two modes, which are:


• Forward chaining
• Backward chaining
Forward Chaining
• Forward chaining is also known as a forward deduction or forward
reasoning method when using an inference engine.
• Forward chaining is a form of reasoning which start with atomic sentences
in the knowledge base and applies inference rules (Modus Ponens) in the
forward direction to extract more data until a goal is reached.
• The Forward-chaining algorithm starts from known facts, triggers all rules
whose premises are satisfied, and add their conclusion to the known facts.
• This process repeats until the problem is solved.
Properties of Forward-Chaining

• It is a down-up approach, as it moves from bottom to top.

• It is a process of making a conclusion based on known facts or data, by


starting from the initial state and reaches the goal state.

• Forward-chaining approach is also called as data-driven as we reach to the


goal using available data.

• Forward -chaining approach is commonly used in the expert system, such as


CLIPS, business, and production rule systems.
Backward Chaining

• Backward-chaining is also known as a backward deduction or


backward reasoning method when using an inference engine.

• A backward chaining algorithm is a form of reasoning, which starts


with the goal and works backward, chaining through rules to find
known facts that support the goal.
Properties of backward chaining
• It is known as a top-down approach.
• Backward-chaining is based on modus ponens inference rule.
• In backward chaining, the goal is broken into sub-goal or sub-goals to prove the
facts true.
• It is called a goal-driven approach, as a list of goals decides which rules are
selected and used.
• Backward -chaining algorithm is used in game theory, automated theorem proving
tools, inference engines, proof assistants, and various AI applications.
• The backward-chaining method mostly used a depth-first search strategy for
proof.
Rule-based expert systems

• A rule-based system is a way of encoding a human expert's knowledge in a


fairly narrow area into an automated system.

• A rule-based system can be simply created by using a set of assertions and


a set of rules that specify how to act on the assertion set.

• Rules are expressed as a set of if-then statements (called IF-THEN rules or


production rules)
Elements of a Rule-Based System
• Any rule-based system consists of a few basic and simple elements as follows:
1. A set of facts.
• These facts are actually the assertions and should be anything relevant to the
beginning state of the system.
2. A set of rules.
• This contains all actions that should be taken within the scope of a problem specify
how to act on the assertion set.
• A rule relates the facts in the IF part to some action in the THEN part.
• The system should contain only relevant rules and avoid the irrelevant ones because
the number of rules in the system will affect its performance.
3. A termination criterion.
• This is a condition that determines that a solution has been found or that none exists.
• This is necessary to terminate some rule-based systems that find themselves in
infinite loops otherwise.
Case-Based Reasoning
• Case-based reasoning (CBR) is a paradigm of artificial intelligence and cognitive
science that models the reasoning process as primarily memory based.
• Case-based reasoning imitates a human reasoning and tries to solve new problems
by reusing solutions that were applied to past similar problems.
• Case-based reasoners solve new problems by retrieving stored ‘cases’ describing
similar prior problem-solving episodes and adapting their solutions to fit new
needs.
• CBR research studies the CBR process both as a model of human cognition and as
an approach to building intelligent systems.
• Principles from CBR research serve as a foundation for applied computer systems
for tasks such as supporting human decision-making, aiding human learning, and
facilitating access to electronic information repositories.
Inference Methods

• Knowledge Representation allows encoding or formalization of quantitative


facts and knowledge.

• Reasoning and inference allows generation of new and useful knowledge,


conclusions and recommendation.

• Inference methods fall into two general categories.


• Deductive Reasoning.
• Inductive Reasoning
Deductive Reasoning
• Deductive reasoning is deducing new information from logically related known
information.
• It is the form of valid reasoning, which means the argument's conclusion must be
true when the premises are true.
• Deductive reasoning is a type of propositional logic in AI, and it requires various
rules and facts.
• It is sometimes referred to as top-down reasoning, and contradictory to inductive
reasoning.
• In deductive reasoning, the truth of the premises guarantees the truth of the
conclusion.
• Deductive reasoning mostly starts from the general premises to the specific
conclusion, which can be explained as below example
Example:

Premise-1: All the human eats veggies


Premise-2: Suresh is human.
Conclusion: Suresh eats veggies.

The general process of deductive reasoning is given below


Inductive Reasoning
• Inductive reasoning is a form of reasoning to arrive at a conclusion using
limited sets of facts by the process of generalization.
• It starts with the series of specific facts or data and reaches to a general
statement or conclusion.
• Inductive reasoning is a type of propositional logic, which is also known as
cause-effect reasoning or bottom-up reasoning.
• In inductive reasoning, we use historical data or various premises to
generate a generic rule, for which premises support the conclusion.
• In inductive reasoning, premises provide probable supports to the
conclusion, so the truth of premises does not guarantee the truth of the
conclusion.
Example:

Premise: All of the pigeons we have seen in the zoo are white.
Conclusion: Therefore, we can expect all the pigeons to be white.

The general process of Inductive reasoning is given below


Abductive reasoning
• Abductive reasoning is a form of logical reasoning which starts with single or multiple
observations then seeks to find the most likely explanation or conclusion for the observation.
• Abductive reasoning is an extension of deductive reasoning, but in abductive reasoning, the
premises do not guarantee the conclusion.

Example:

Implication: Cricket ground is wet if it is raining

Axiom: Cricket ground is wet.

Conclusion It is raining.
Common Sense Reasoning
• Common sense reasoning is an informal form of reasoning, which can be gained
through experiences.
• Common Sense reasoning simulates the human ability to make presumptions
about events which occurs on every day.
• It relies on good judgment rather than exact logic and operates on heuristic
knowledge and heuristic rules.
Example:
1. One person can be at one place at a time.
2. If I put my hand in a fire, then it will burn.
• The above two statements are the examples of common sense reasoning which a
human mind can easily understand and assume.
Monotonic Reasoning
• In monotonic reasoning, once the conclusion is taken, then it will remain the same
even if we add some other information to existing information in our knowledge
base.
• In monotonic reasoning, adding knowledge does not decrease the set of
prepositions that can be derived.
• To solve monotonic problems, we can derive the valid conclusion from the
available facts only, and it will not be affected by new facts.
• Monotonic reasoning is not useful for the real-time systems, as in real time, facts
get changed, so we cannot use monotonic reasoning.
• Monotonic reasoning is used in conventional reasoning systems, and a logic-based
system is monotonic.
• Any theorem proving is an example of monotonic reasoning.
Cont.
Example
• Earth revolves around the Sun.
• It is a true fact, and it cannot be changed even if we add another sentence in
knowledge base like, "The moon revolves around the earth" Or "Earth is not round,"
etc.
• Advantages of Monotonic Reasoning:
• In monotonic reasoning, each old proof will always remain valid.
• If we deduce some facts from available facts, then it will remain valid for always.
• Disadvantages of Monotonic Reasoning:
• We cannot represent the real world scenarios using Monotonic reasoning.
• Hypothesis knowledge cannot be expressed with monotonic reasoning, which means
facts should be true.
• Since we can only derive conclusions from the old proofs, so new knowledge from
the real world cannot be added.
Non-monotonic Reasoning
• In Non-monotonic reasoning, some conclusions may be invalidated if we
add some more information to our knowledge base.
• Logic will be said as non-monotonic if some conclusions can be invalidated
by adding more knowledge into our knowledge base.
• Non-monotonic reasoning deals with incomplete and uncertain models.
• "Human perceptions for various things in daily life, "is a general example of
non-monotonic reasoning.
Non-monotonic Reasoning
• In Non-monotonic reasoning, some conclusions may be invalidated if we
add some more information to our knowledge base.
• Logic will be said as non-monotonic if some conclusions can be invalidated
by adding more knowledge into our knowledge base.
• Non-monotonic reasoning deals with incomplete and uncertain models.
• "Human perceptions for various things in daily life, "is a general example of
non-monotonic reasoning.
Example
• Let suppose the knowledge base contains the following knowledge:
• Birds can fly
• Penguins cannot fly
• Pitty is a bird
• So from the above sentences, we can conclude that Pitty can fly.
• However, if we add one another sentence into knowledge base "Pitty is a
penguin", which concludes "Pitty cannot fly", so it invalidates the above
conclusion.
Cont.
• Advantages of Non-monotonic reasoning
• For real-world systems such as Robot navigation, we can use non-monotonic
reasoning.
• In Non-monotonic reasoning, we can choose probabilistic facts or can make
assumptions.
• Disadvantages of Non-monotonic Reasoning
• In non-monotonic reasoning, the old facts may be invalidated by adding new
sentences.
• It cannot be used for theorem proving.
Rules of Inference
• Inference rules are the templates for generating valid arguments.
• Inference rules are applied to derive proofs in artificial intelligence, and the proof is
a sequence of the conclusion that leads to the desired goal.
• In inference rules, the implication among all the connectives plays an important role.
• Implication: It is one of the logical connectives which can be represented as P → Q. It is a
Boolean expression.
• Converse: The converse of implication, which means the right-hand side proposition goes to
the left-hand side and vice-versa. It can be written as Q → P.
• Contrapositive: The negation of converse is termed as contrapositive, and it can be represented
as ¬ Q → ¬ P.
• Inverse: The negation of implication is called inverse. It can be represented as ¬ P → ¬ Q.
Cont..

Hence from the above truth table, we can prove that P → Q is equivalent to
¬ Q → ¬ P and Q→ P is equivalent to ¬ P → ¬ Q.
Types of Inference rules
1. Modus Ponens:
• The Modus Ponens rule is one of the most important rules of inference, and it states that
if P and P → Q is true, then we can infer that Q will be true. It can be represented as:

Example:
Statement-1: "If I am sleepy then I go to bed" ==> P→ Q
Statement-2: "I am sleepy" ==> P
Conclusion: "I go to bed." ==> Q.
Hence, we can say that, if P→ Q is true and P is true then Q will be true.
Cont.

Proof by Truth table:


Cont.
Modus Tollens:
• The Modus Tollens rule state that if P→ Q is true and ¬ Q is true, then ¬ P will
also true. It can be represented as:

• Rules of Inference in Artificial intelligence


• Statement-1: "If I am sleepy then I go to bed" ==> P→ Q
• Statement-2: "I do not go to the bed."==> ~Q
• Statement-3: Which infers that "I am not sleepy" => ~P
Cont.

Proof by Truth table:


Cont.
3. Hypothetical Syllogism:
• The Hypothetical Syllogism rule state that if P→R is true whenever P→Q is
true, and Q→R is true. It can be represented as the following notation:
P → Q,Q → R
∴P→R
• Example:
• Statement-1: If you have my home key then you can unlock my home. P→Q
• Statement-2: If you can unlock my home then you can take my money. Q→R
• Conclusion: If you have my home key then you can take my money. P→R
Cont.
Proof by truth table
Cont.
4. Disjunctive Syllogism
• The Disjunctive syllogism rule state that if P∨Q is true, and ¬P is true, then
Q will be true. It can be represented as:
P ∨ Q, ¬P
Q
Example:
Statement-1: Today is Sunday or Monday. ==>P∨Q
Statement-2: Today is not Sunday. ==> ¬P
Conclusion: Today is Monday. ==> Q
Cont.

Proof by truth table


Cont.
5. Addition:
• The Addition rule is one the common inference rule, and it states that If P is
true, then P∨Q will be true

Example:
• Statement: I have a vanilla ice-cream. ==> P
• Statement-2: I have Chocolate ice-cream.
• Conclusion: I have vanilla or chocolate ice-cream. ==> (P∨Q)
Cont.
Proof by truth table
Cont.
6. Simplification:
• The simplification rule state that if P∧ Q is true, then Q or P will also be
true. It can be represented as

Proof by Truth-Table
Cont.
7. Resolution:
• The Resolution rule state that if P∨Q and ¬ P∧R is true, then Q∨R will
also be true. It can be represented as

Proof by Truth-Table:
Predicate Logic (First Order Logic)
• First-order logic is also known as Predicate logic or First-order predicate logic.
• Predicate Logic allows more flexible and compact representation of knowledge.
• 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: people, houses, numbers, colors, wares
• Relations: brother of , bigger than, inside, part of
• Properties: red, round, long, short,,,
• Functions: father of, best friend, one more than
Cont.
Example
• “One Plus Two Equals Three “
Objects: One, Two, Three, One Plus Two
Relations: Equals
Functions: Plus
• “Congratulation Letter written with Blue Pen“
Objects: Letter, Pen
Relations: written with
Properties: Blue, Congratulation
Basic Elements of First-order logic

Sentence Atomic sentences, Complex


Sentences
Constant 1, 2, A, John, Mumbai, cat,....
Variables x, y, z, a, b,....
Predicates Brother, Father, >,....
Function sqrt, LeftLegOf, ....
Connective ∧, ∨, ¬, ⇒, ⇔
s
Quantifier ∀, ∃
Equality ==
Atomic sentences
• Atomic sentences are the most basic sentences of first-order logic.
• These sentences are formed from a predicate symbol followed by a
parenthesis with a sequence of terms.
• We can represent atomic sentences as Predicate (term1, term2, ......, term n).
• Example:
Mohammed and Sara are brothers: => Brothers(Mohammed, Sara).
Wero is a cat: => cat (Wero).
Complex Sentences
• Complex sentences are made by combining atomic sentences using
connectives.
• First-order logic statements can be divided into two parts:
• Subject: Subject is the main part of the statement.
• Predicate: A predicate can be defined as a relation, which binds two
atoms together in a statement.
Quantifiers in First-order logic:
• A quantifier is a language element which generates quantification, and
quantification specifies the quantity of specimen in the universe of discourse.
• These are the symbols that permit to determine or identify the range and scope
of the variable in the logical expression.
• There are two types of quantifier:
• Universal Quantifier, (for all, everyone, everything)
• The Universal quantifier is represented by a symbol ∀, which resembles an inverted A.
• Existential quantifier, (for some, at least one).
• It is denoted by the logical operator ∃, which resembles as inverted E.
• When it is used with a predicate variable then it is called as an existential quantifier.
Example
• ∀x man(x) → drink (x, coffee).
• It will be read as: There are all x where x is a man who drink coffee.

• ∃x: boys(x) ∧ intelligent(x)


• It will be read as: There are some x where x is a boy who is intelligent.

• The main connective for universal quantifier ∀ is implication →.


• The main connective for existential quantifier ∃ is and ∧.
Properties of Quantifiers
• In universal quantifier, ∀x∀y is similar to ∀y∀x.
• In Existential quantifier, ∃x∃y is similar to ∃y∃x.
• ∃x∀y is not similar to ∀y∃x.
Some Examples of FOL using quantifier
1. All birds fly.
In this question the predicate is "fly(bird)."
And since there are all birds who fly so it will be represented as follows.
∀x bird(x) →fly(x).
2. Every man respects his parent.
In this question, the predicate is "respect(x, y)," where x=man, and y= parent.
Since there is every man so will use ∀, and it will be represented as follows:
∀x man(x) → respects (x, parent).
Some Examples of FOL using quantifier
3. Some boys play cricket.
In this question, the predicate is "play(x, y)," where x= boys, and y= game.
Since there are some boys so we will use ∃, and it will be represented as:
∃x boys(x) → play(x, cricket).
4. Not all students like both Mathematics and Science.
In this question, the predicate is "like(x, y)," where x= student, and y= subject.
Since there are not all students, so we will use ∀ with negation, so following
representation for this:
¬∀ (x) [ student(x) → like(x, Mathematics) ∧ like(x, Science)].
Some Examples of FOL using quantifier
5. Only one student failed in Mathematics.
In this question, the predicate is "failed(x, y)," where x= student, and y=
subject.
Since there is only one student who failed in Mathematics, so we will use
following representation for this:
∃(x) [ student(x) → failed (x, Mathematics) ∧∀ (y) [¬(x==y) ∧
student(y) → ¬failed (x, Mathematics)].
Reasoning under uncertainty
• Reasoning for real-world problems involves missing knowledge, inexact
knowledge, inconsistent facts or rules, and other sources of uncertainty.
• while traditional logic in principle is capable of capturing and expressing
these aspects, it is not very intuitive or practical
• explicit introduction of predicates or functions
• many expert systems have mechanisms to deal with uncertainty.
Sources of Uncertainty
• Data
data missing, unreliable, ambiguous,
representation imprecise, inconsistent, subjective, derived from defaults,
• Expert knowledge
• inconsistency between different experts
• plausibility
 “best guess” of expert
• Quality
• causal knowledge
deep understanding
• statistical associations
observations
Sources of Uncertainty
• Scope
• only current domain, or more general
• Knowledge representation
• restricted model of the real system
• limited expressiveness of the representation mechanism
• Inference process
• deductive
• the derived result is formally correct, but inappropriate
• derivation of the result may take very long
Sources of Uncertainty
• Inductive
new conclusions are not well-founded
not enough samples
samples are not representative
• Unsound reasoning methods
 induction, non-monotonic, default reasoning
Uncertainty in Individual Rules
• Errors
domain errors
representation errors
inappropriate application of the rule
• likelihood of evidence
for each premise
for the conclusion
combination of evidence from multiple premises
Uncertainty and Multiple Rules
• Conflict resolution
if multiple rules are applicable, which one is selected
explicit priorities, provided by domain experts
implicit priorities derived from rule properties
 specificity of patterns, ordering of patterns creation time of rules, most recent usage , …

• Compatibility
contradictions between rules
subsumption
 one rule is a more general version of another one
redundancy
missing rules
data fusion
 integration of data from multiple sources

You might also like