You are on page 1of 25

Artificial Intelligence

Reasoning (Part 1)
Introduction to Different Mechanisms of Reasoning

Nauman Naseer

This Presentation Includes

Reasoning Reasoning Mechanisms Deterministic Reasoning Syllogism Boolean Logic Propositional and Predicate Logics Dynamic Reasoning Non Deterministic Reasoning Probability Theory Fuzzy Logic

Reasoning

One fundamental item of information required by every intelligent machine is what to do next? Reasoning is the process of going from what is unknown to what is known. Best Reasoning Machine ??? Humans !!!

Reasoning Mechanisms

Some Reasoning Mechanisms are: Deterministic Reasoning


Propositional Logic Predicate Logic

Dynamic Reasoning

Non-monotonic Reasoning

Non-deterministic Reasoning

Multi-valued Reasoning Probability theory and Bayesian Deduction Fuzzy Logic

Deterministic Reasoning

Deterministic Reasoning goes back to Greeks, and Platos (427-347 BC) student Aristotle (384-322 BC).

Aristotle abstracted a set of rules called Syllogism. Syllogism includes general Reasoning of the form if-then

Syllogism

It consists of Major Premise , Minor premise and deduction or conclusion e.g Major Premise : All men are mortal Minor Premise : Ali is a man Conclusion : Ali is mortal Mortal is the Major Term Ali is the Minor Term The common term is called Middle Term i.e in this case Man

Syllogisms - Another Example


Major Premise : All mortals die. Minor Premise : All men are mortals Conclusion : All men die In this case die is the Major Term Men is the minor term Mortal is the middle term

IF-Then

If-then is also syllogism argument e.g. If a moving vehicle sees an unknown object in its path then it should take action to avoid it

The rule

If the camera image contains an unknown object Then


take evasive action

If-Then Continued .

The first part is a rule containing a statement which can be True or False If it is true then the second part is activated

The second part is also a statement that can be either true or false i.e if evasive action is taken then its true else its false When the first part of the rule is true , the system containing the rule can initiate evasive action to make the second part of rule true

Continued .
This process is deduction The Known Fact

The

camera image contains an unknown object is

true

The Deduced Fact


Take

evasive action is true

Boolean Logic

George Boole (1815-1864) , the founder of Boolean Algebra , worked out a system in which new statements can be deducted from others using the connectives AND , OR and NOT. e.g in the previous example the object seen by camera is described as being unknown We can split it up :

The Known Facts The camera image contains an object AND The object cannot be matched in the database
If both these statements are true only then the deduced fact Take evasive action is true

Quantifiers

Although Boolean logic is very powerful , it does not contain one of the most powerful ideas in logic; that of quantifiers e.g.
There exists an object in the database and that object matches the object detected by the camera And

For all objects in the database, those objects match the object detected by the camera

The first one of these is called existential quantifier And the second one is called the universal quantifier These quantifiers are powerful devices because they save writing out proposition many times.

Example

e.g. a machines might need to switch off its motor for all those occasions on which the bar code begins with I II . Then instead of laboriously writing out

If the bar code is I II I then switch off the motor If the bar code is I II III then switch off the motor If the bar code is I III I then switch off the motor If the bar code is I IIII II then switch off the motor If the bar code is I II II I then switch off the motor

We can simply write

For all bar codes, if the bar code begins with I II then switch off the motor

Propositional Logic and Predicate Logic

Propositional logic allows us to deduce the truth values of component propositions made up from simple propositions and the Boolean connectives AND OR and NOT Predicate logic , developed mainly by Friedrich Frege (1848-1925) and Bertrand Russell (1872 1970), goes one step further by allowing us to deduce the truth values of component propostions which also involve the quantifiers for all and there exist.

Dynamic Reasoning

Although logical reasoning allows us to reason about things that will certainly happen, it still does not capture the richness of human thought that enables us function even in the changing environment Modern research in Artificial Intelligence has introduced Dynamic Reasoning , which addresses the cognitive ability of human beings to reason in the changing environments

Non-monotonic reasoning attempts to allow reasoning in which the truth value of a proposition is allowed to change.

Example
The commonly cited example is that Given : Tweety is a bird is true And We know that Birds Can Fly is true So the deduce fact (deterministic logic) must be Tweety Can Fly should be ture

However the environment can change what if the Tweety is a penguin ???? (New Evidence)

Explanation

In other words , since we said that Tweety is a bird , in absence of any other information we would assume that it could fly since typically birds can fly. In deterministic logic it is assumed that there is no default knowledge. So if we try to solve this problem using deterministic logic we will have to quantify a list of exceptions. Non-monotonic logic allows us to change the deduction as the new evidence arrives.

Non-Deterministic Reasoning

Propositional and predicate logic have been developed in modern form in 19th and 20th centuries However they dont capture all the techniques of reasoning which seems to be so efficient in human beings Non-deterministic logic , such as multi-valued logic allows us to use predicate logic but with the truth values such as unknown Instead of predicting future events on true-false basis, we often asses them in terms of its likelihood.

Probability Theory

Probability theory is an extension of the empirical notion of relative frequency e.g. if we observe that 89 identical components in a batch of 1000 fail with 1000 hours of use , the relative frequency of failure is 89/1000 = 0.089

We can use this empirical data as a measure of the abstract probability of the component failure p (failure) = 0.089
Although we can not predict that the component will certainly fail at any given instant , we can predict that in 1000 hours we expect about 89 failures in a thousand

Probability Theory Continued

Probability theory allows us to deduce other failure rates The known fact

89 components from 1000 fail with 1000 hours use


The probability of a component NOT failing with in 1000 hours is 1- p (failure) = 1 0.089 = 0.911

The deduced fact

Probability Theory Continued

Suppose a machine that depends on two such components, A and B , will fail if component A fail OR component B fails Put another way; the machine does not fail if component A does not fail AND component B does not fail Then the probability of the machine not failing within 1000 hours is P = (1000 - 89) / 1000 X (1000 - 89 ) / 1000 = 0.829921 i.e. the probability of machine failing within 1000 hours is appox 10.83 = 0.17 So we expect 17% of machines with components A and B to fail with 1000 hours.

Probability Theory Continued

How many of machines using 3 of those components will fail within 1000 hours ?? How many of machines using 4 of those components will fail within 1000 hours ?? So one can also use probability to reason about the likelihood of complex outcomes using AND , OR and NOT connectives

Probability Theory Continued

In general, machines constantly collect data that enables them to update their probability estimates of different events Ideally , one wants to use the new and old information in a way which optimizes the value of both. e.g , the experience that a robot found the correct part in a given bin may not guarantee that the part will always be available in that place But added to previous experience it may increase the expectation of finding the part in this place in future.

A result in probability theory, called Bayes Theorem, allows prior estimates of probability to be continually updated in the light of new observations

Probability Theory Continued


Mostly we combine deterministic logic and the probability theory to form rules e.g.

If
the probability of collision > 0.1 Take evasive action

Then

Thus once the system has decided that the likelihood of collision exceeds the threshold value of 0.1 , the rule definitely requires to take evasive action.

Fuzzy Logic

In 1965 Lotfi Askar Zadeh (1921-) proposed a form of reasoning using what has become known as fuzzy logic. One of the main ideas is that propositions need not to be classified as true or false, instead their truth and falsehood can be weighted. This differs from the probability theory by its dependence on fuzzy sets in which set membership is weighted. Fuzzy sets theory allows us to represent, say, the position of an autonomous vehicle in fuzzy way.

It may be more useful to reason on the basis that the machine is in the corner than to know the exact x,y coordinates

You might also like