Presentation is loading. Please wait.

Presentation is loading. Please wait.

Artificial Intelligence

Similar presentations


Presentation on theme: "Artificial Intelligence"— Presentation transcript:

1 Artificial Intelligence
Lecture 2 Department of Computer Science, International Islamic University Islamabad, Pakistan

2 In Today’s Lecture What is knowledge? What do we mean by reasoning? Deduction / abduction / induction? Why do we need a structured knowledge representation The Frame Problem Propositional calculus

3 What is Knowledge ? Before we can begin to consider the topic of Knowledge Representation it would be wise to first come to a definition of what knowledge is. The word data is often used as synonymous with knowledge but in the field of A.I. research the two have different meanings. Traditionally the term 'data' is used to describe simple raw facts such as numbers, strings and Boolean values. To deal with the real world we need more complex information such as processes, procedures, actions, time, motivations, goals, and common sense reasoning. The term 'knowledge' is used to describe this sort of information of which data is merely a subset. More formally knowledge can be described as “A symbolic description (or model) of a domain (or universe of discourse)”.

4 What is knowledge? A symbolic description (or model) of a domain (or universe of discourse). How does this differ from data or information? DATA Passive Simple structure and format KNOWLEDGE Active Complex structure, multiple formats - includes data.

5 Reasoning It is fair to say that to be intelligent requires two things: a) Knowledge b) Reasoning skills Intelligent behavior implies the linking of these two together and hence being able to deduce facts that are not explicit in the Knowledge and produce sensible reactions to these facts. In humans there is a consciousness that enables us to understand concepts such as what and why, that is intentionality. With this ability we are able to make reasoned judgments and act accordingly. Of course the "reason" within our decisions is often subjective (and in the same way, our definition of intelligent behavior is largely subjective). So what forms of reasoning are there? Here are the three main types: Deduction Abduction Induction We shall now go through these in more detail.

6 Deduction A, A=>B conclude B
This is read as: A is true. If A is true then B is true. Therefore conclude that B is true Example: I hit the glass with a hammer Hitting a glass with a hammer => glass breaks Conclude: The glass is broken This can also work backwards in the negative sense: ~B, A=>B conclude ~A (B is not true. If A is true then B is true. As B is not true then A cannot be true either) Example The glass is not broken Hitting a glass with a hammer => glass breaks Conclude: I didn't hit the glass with a hammer This is a sound form of reasoning. Given that proposition A is true and that the truth of proposition B is based only on whether A is true or not, B can be very reliably inferred from the truth or otherwise of A.

7 Abduction B, A=>B conclude A
This is read as: B is true. If A is true then B is true. Therefore conclude that A is true. Taking the previous example this states: The glass is broken Hitting a glass with a hammer => glass breaks Conclude: I hit the glass with a hammer This is a reasonable deduction but not necessarily true. Someone else may have hit the glass with a hammer or maybe I threw the glass onto the floor. This is "jumping to conclusions" which is not sound though we do it all the time. There are many situations where more than one reason for something happening could be true and we have to choose the most likely one. In other words, we perform "informed guesswork"!

8 Induction A E S ^ red(A) D E S ^ red(D) F E S ^ red(F) Conclude: For all x where x is an element of set S x is red These read as: A is an element of the set S and A is red, D is an element of the set S and D is red, F is an element of the set S and F is red. Example: (Fred, Derek and Charles are all men.) Fred is a man and Fred is TALL. Derek is a man and Derek is TALL. Charles is a man and Charles is TALL. Conclude from the three examples: All men are TALL. This is not sound. Making such a deduction from so small a sample is statistically unsound yet we do this all the time too! Induction is only safe if it is statistically sound, that is, there is a sufficiently large sample and that set of samples is truly randomly selected.

9 The Need for Structured Knowledge Representation
The second requirement for intelligent behavior is the knowledge itself. So all we do is stuff some facts into a computer system, put a reasoning program into action, we have an intelligent machine! Well it's not quite that simple. Many A.I. structures show themselves to work well in simple "toy" domains but once they are presented with real world domain problems they suddenly begin to collapse. The problem is that they don't have enough knowledge about the domain and so can't respond to it. If we attempt to simply solve this problem by stuffing more information into the system we quickly come across the problem of speed. The specific piece of information in the database of knowledge cannot be accessed fast enough for a reasonable response using simple search techniques. One of the major keys to AI then is being able to store knowledge in an efficient fashion and in such a way that it is possible to compose programs that can access it in a reasonable time.

10 The Frame Problem For any situation it's difficult to predict in advance exactly what knowledge you'll need, that is knowledge that's relevant to a given problem; this is known as the frame problem. Consider the simple case of the representation of a bird, as Minsky says: Let's take a very simple fact like all birds can fly. Well that's true in a certain dictionary context but it's not true of all birds, so if you try to put this information in a rule based system you'd have a little trouble. First you'd have to say if Tweetie is a bird it can fly unless it is an ostrich or unless it's a penguin so now you're starting to get exceptions. Then somebody might say "What if you clipped its feathers?" and you'd say "If something is a bird and it has normal feathers and it is not an ostrich or a penguin then it can fly". Then someone might say "Well what if it's dead?" so you'd reply "If it's ... and it's not dead then it can fly." Someone else might say "What if it's in a cage?", "What if it got its feet stuck in concrete?".

11 The Frame Problem You see it's almost impossible to think of any fact about the real world that's true. As you can see it seems to go on and on forever, "What's concrete?" It's difficult to know where to stop. Ideally we would represent all the knowledge in the world that everybody knows, but to do this would result in an enormous data structure. It would be absolutely vast and the access time would be enormously slow. The upshot is that we don't know how to build such a structure and how to index it rapidly. What is more, we don't know how to acquire all the knowledge. A number of methods have been proposed for representing knowledge some more appropriate in certain situations than others but none ideal. These include first order predicate calculus, semantic nets, conceptual graphs, frames, scripts and rules (which shall lead us onto Expert Systems). Lets begin with the Propositional & First Order Predicate Calculus….

12 Propositional Calculus
Propositional calculus is based on propositions which are statements that may or may not be true. You make a list of statements and assign them a value true or false. So you might make the proposition "The moon is made of cheese" which you would assign the value false. The proposition "Neil Armstrong was the first man to walk on the moon" would be assigned the value true. To use in later examples we shall now define some simple propositions and give them a truth value: "Circles are round" is true "Circles aren't round" is false "Squares have straight edges" is true "Squares don't have straight edges" is false

13 Propositional Calculus
Once you have your set of propositions you can use simple connectives to link them and from the truth values you can infer whether the new compound proposition (sentence) is true or false. There are five operators to allow you to do this. AND (CONJUNCTION) : The proposition X^Y is true only if proposition X is true and proposition Y is true, otherwise X^Y is false. Circles are round ^ Squares have straight edges is true. Circles aren't round ^ Squares have straight edges is false. Circles are round ^ Squares don't have straight edges is false. Circles aren't round ^ Squares don't have straight edges is false.

14 Propositional Calculus
INCLUSIVE OR (DISJUNCTION): If either proposition X is true or proposition Y is true or both proposition X is true and proposition Y is true then XvY is true. Only if proposition X is false AND proposition Y is false is XvY false. Circles are round v Squares have straight edges is true. Circles aren't round v Squares have straight edges is true. Circles are round v Squares don't have straight edges is true. Circles aren't round v Squares don't have straight edges is false.

15 Propositional Calculus
NOT (NEGATION): If proposition X is true then the propostion ~X is false, if proposition X is false then proposition ~X is true. ~Circles are round is false. ~Circles aren't round is true. IMPLIES (IMPLICATION): If proposition X is true and proposition Y is true then X=>Y is true. If proposition X is false and proposition Y is either true or false then X=>Y is defined to be true. However if proposition Y is false and proposition X is true then X=>Y is false. More rigidly, this connective is defined to only be false if Y is false and X is true. Circles are round => Squares have straight edges is true. Circles aren't round => Squares have straight edges is true. Circles are round => Squares don't have straight edges is false. Circles aren't round => Squares don't have straight edges is true.

16 Propositional Calculus
EQUIVALENT OR (EQUIVALENCE): If proposition X has the same truth value as proposition Y then X=Y is true. If they are different then it is false. Circles are round = Squares have straight edges is true. Circles aren't round = Squares don't have straight edges is true. Circles are round = Squares don't have straight edges is false. Circles aren't round = Squares have straight edges is false.

17 Propositional Calculus
The semantics of a connective may be defined using truth tables. Two expressions in the propositional calculus are equivalent if they have the same value under all truth value assignments. This may be proved using truth tables. For example a proof of the equivalence of P=>Q and ~PvQ is given by the following truth table: The truth assignment of implication, a , is F only when the premise is T and the truth value of the consequent is F; otherwise it is always T. P Q ~P ~PvQ P=>Q (~PvQ)=(P=>Q) T F


Download ppt "Artificial Intelligence"

Similar presentations


Ads by Google