AI-ML Module 1-2022

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 79

Arti cial Intelligence

and
Machine Learning (18CS71)
Module 1

By,

Chaitra M

Asst. Professor,

Dept. Of CSE

SJBIT
fi

Introduction
• Arti cial Intelligence (AI) is a branch of Science which deals with
helping machines nding solutions to complex problems in a
more human-like fashion.

• This generally involves borrowing characteristics from human


intelligence, and applying them as algorithms in a computer
friendly way.

• AI is generally associated with Computer Science, but it has


many important links with other elds such as Maths, Psychology,
Cognition, Biology and Philosophy, among many others.

• Our ability to combine knowledge from all these elds will


ultimately bene t our progress in the quest of creating an
intelligent arti cial being.
fi
fi
fi
fi
fi
fi
What is AI?
• Intelligence ability to learn, understand and think
(Oxford dictionary)
• AI is the study of how to make computers make things
which at the moment people do better.
• Examples Speech recognition, Smell, Face, Object,
Inferencing, Learning new skills, Decision making,
Abstract thinking

● How to make computers do things which at the moment people


do better.
(Solution: computers must be fast at exploring large number of
solution paths and then selecting the best one)

Tasks Domain of AI
AI tasks are categorized as-
Mundane Tasks
• Perception Expert Tasks
• Vision
• Engineering ( Design, Fault nding, Manufacturing
• Speech
planning)
• Natural Languages
• Scienti c Analysis
• Understanding
• Medical Diagnosis
• Generation
• Financial Analysis
• Translation
• Commonsense reasoning
• Robot Control
MT: Common things humans do everyday.
FT: Tasks having xed rules, here logics are applied.
Formal Tasks ET: Task that requires an expert person in every different
domain.
• Games
• Chess, checkers etc
• Mathematics
• Geometry, logic,Integral calculus, Proving properties
of programs

fi

fi

fi

Mundane Tasks
• Humans learn mundane (ordinary) tasks since their
birth.(They learn by perception, speaking, using • Perception
language)
• Vision
• Speech
• For humans, the mundane tasks are easiest to learn.
• Natural Languages
• Understanding
• The same was considered true before trying to • Generation
implement mundane task domain.
• Translation
• Commonsense
• Later, it turned out that the machine requires more reasoning
knowledge, complex knowledge representation and • Robot Control
complicated algorithms for handling mundane tasks.

Natural language processing(NLP) also has a challenge I.e understanding


the unstated assumption.

Formal Tasks
• Games
• Chess, checkers etc
• Mathematics
• Geometry, logic,Integral calculus, Proving properties
of programs

• Games: To solve these problems we must explore a large number of


solutions quickly and choose the best one.

• Mathematics: perform complicated integration and di erentiation.


Manipulate symbols and reduce problem, until the answer is obvious.

ff
Expert Tasks
• Engineering ( Design, Fault nding, Manufacturing
planning)
• Scienti c Analysis
• Medical Diagnosis
• Financial Analysis

• To create expert systems- The systems exhibit intelligent


behaviour, learn, demonstrate, explain and advice it’s
users.

• Ex. Flight tracking systems, clinical system.


fi

fi
Arti cial Intelligence Underlying Assumptions:
Making assumptions to simplify the problem.
Elaine Rich et al. and Newell and Simon [1976] believe that arti cial intelligence
believe in Physical symbol System hypothesis. They de ned Physical symbol
system hypothesis as follows:

“Physical symbol system includes set of incorporated entities generally known


as symbols that represent physical patterns which can occur as components of
another type of entity known as expression. A symbol structure comprises a
number of instances of symbols, related physically somehow. At a given point of
time the system contains collection of these symbols structure. The system also
incorporates a collection of processes that are operated on expressions to
complete process of creation, modi cation, reproduction and alteration.”

Elaine Rich et al. and Newell and Simon de ne Physical symbol system
hypothesis as a physical symbol system that has necessary and su cient means
for general intelligent action.
fi
fi
fi
fi
fi
ffi

AI Technique
AI needs Intelligence, Intelligence needs knowledge.
• Intelligence requires Knowledge

• Knowledge posesses less desirable properties such as

• Voluminous

• Hard to characterize accurately


These are the challenging
aspects of properties of
• Constantly changing
knowledge AI
• Di ers from data that can be used

Techniques manipulate symbols to obtain


solution to problem.
• AI technique is a method that exploits knowledge that
should be represented in such a way that:

• Knowledge captures generalization

• It can be understood by people who must provide it

• It can be easily modi ed to correct errors.

• It can be used in variety of situations


ff
fi
Application of AI Techniques

Tic-Tac-Toe

Tic-Tac-Toe Game Playing
• Two players - human, computer.

• The objective is to write a computer program in such a way that computer wins most of the
time.

• Three approaches are presented to play this game which increase in

• Complexity

• Use of generalization

• Clarity of their knowledge

• Extensibility of their approach

• These approaches will move towards being representations of what we will call AI techniques
Problem-Tic-Tac-Toe
Program 1

The game Tic Tac Toe is also known as Noughts and Crosses or Xs and Os ,the player
needs to take turns marking the spaces in a 3x3 grid with their own marks,if 3 consecutive
marks (Horizontal, Vertical,Diagonal) are formed then the player who owns these moves
get won.

Assume ,

Player 1 - X
Player 2 - O

So,a player who gets 3 consecutive marks first,they will win the game .

Let's have a discussion about how a board's data structure looks and how the Tic Tac Toe
algorithm works.

Contd.
The cells could be represent as Center
• Board Data Structure
square,Corner,Edge as like below

Number each square starts from 1 to 9 like following image


Program 1
Data Structures: Board and Movetable
Consider a Board having nine elements vector.Each element will
contain
• 0 for blank
• 1 indicating X player move
• 2 indicating O player move
Computer may play as X or O player. First player is always X.

Move Table
It is a vector of 3^9 elements, each element of which is a nine element vector
representing board position.
Total of 3^9(19683) elements in move table 1 2 3 456 7 8 9
Move Table
Index Current Board position New Board position 1
0             000000000                 000010000 2
1             000000001                 020000001 …
2             000000002                 000100002
3             000000010                 002000010 19683
.
.

Algorithm
To make a move, do the following:
1. View the vector (board) as a ternary number
and convert it to its corresponding decimal
number.
2. Use the computed number as an index into the
move table and access the vector stored there.
3. The vector selected in step 2 represents the way
the board will look after the move that should
be made. So set board equal to that vector.

Contd.
Let's start with empty board
 

 
 
Step 1:Now our board looks like 000 000 000 (tenary number) convert it into
decimal no.The decimal no is 0
Step 2:Use the computed number ie 0 as an index into the move table and access
the vector stored in
New Board Position.
The new board position is 000 010 000
Step 3:The vector selected in step 2(000 010 000 ) represents the way the board
will look after the move that should be made. So set board equal to that vector.
After complete the 3rd step your board looks like\

Flow chart:
This process continues until the player get win or tie.
• This program is very e cient in time.

Comments
• Disadvantages:

• A lot of space to store the Move-Table.

• A lot of work to specify all the entries in the Move-Table.

• Di cult to extend

• Highly error prone as the data is voluminous. Poor


extensibility

• ● 3D tic-tac-toe = 3^27 board position to be stored.

• Not intelligent at all.


ffi
ffi
Program 2

Integer indicating next move


Program 2 for Tic-Tac-Toe:Subprocedures

▪Three subprocedures used are:


❑ Make2: if Board[5]=2
returns 5
otherwise
returns any blank non-corner square
(2,4,6,8)
❑ Posswin(p): Possibility of player p winning
if player p can not win on his next move
returns 0
else
returns the number of the square
which will be the winning move
(How is the move found?->next
slide)













































Program 2 for Tic-Tac-Toe:Subprocedures
Posswin(p): How to find the next move?
Multiply the 3 values (on the data structure Board) of each of a row or a
column or a diagonal and check for specific values:
e.g.
1. If product = 18 = 3*3*2 then X can win
X X B

2. If product = 50 = 5*5*2 then O can win


O O B

If a winning row is found, the blank element is determined and the


number of that square is returned.

22



Program 2 for Tic-Tac-Toe:Subprocedures

❑ Go(n): - Go to square n
- If Turn is odd, makes Board[n] = 3 (X)
If Turn is even, makes Board[n] = 5 (O)
- Increments Turn by 1

23














Program 2 for Tic-Tac-Toe:Algorithm


▪ Initially, all the values on Board are
2 (blank)
▪ Turn=1(X)
X
1
Go(1) (upper left corner).
▪ Turn=2(O)
If Board[5] is blank, Go(5), else
Go(1).
▪ Turn=3(X)
O 2

If Board[9] is blank, Go(9), else


Go(3).
X
3



Program 2 for Tic-Tac-Toe:Algorithm


▪ Turn=4(O)
I f Po s sw i n ( X ) i s n o t 0 , t h e n
Go(Posswin(X)) [i.e., block
opponent’s win], else Go(Make2).
X O
1 4

Here Posswin(X)=0 then Go(Make2).


Suppose Make2 returns 2, so Go(2).
▪ Turn=5(X)
If Posswin(X) is not 0 then
O 2
Go(Posswin(X)) [i.e., win]
else if Posswin(O) is not 0, then
Go(Posswin(O)) [i.e., block win]
else if Board[7] is blank, Go(7)
else Go(3).
X X
5 3
Here Posswin(O) <> 0, Go(8).

25





Program 2 for Tic-Tac-Toe:Algorithm


▪ Turn=6(O)
I f Po s s w i n ( O ) i s n o t 0
Go(Posswin(O)),
else if Posswin(X) is not 0
then

then
X O X
1 4 7

Go(Posswin(X))
else Go(Make2)
Here Posswin(X)<>0, Go(7).
▪ Turn=7(X)
O 2
If Posswin(X) is not 0 then
Go(Posswin(X)),
else if Posswin(O) is not 0
Go(Posswin(O))
else go anywhere that is blank
then
O X X
6 5 3

Here Posswin(O)<>0, Go(3).

26






Program 2 for Tic-Tac-Toe:Algorithm


▪ Turn=8(O)
If Posswin(O) is not 0 then
Go(Posswin(O)),
else if Posswin(X) is not 0 then
X O X
1 4 7

Go(Posswin(X))
else go anywhere that is blank
Here Posswin(X)<>0, Go(6).
▪ Turn=9(X) (same as Turn 7)
X
9 O O
2 8
If Posswin(X) is not 0 then
Go(Posswin(X)),
else if Posswin(O) is not 0 then
Go(Posswin(O))
else go anywhere that is blank
O X X
6 5 3

Here Posswin(O)<>0, Go(4).


GAME OVER
27







Algorithm:
Example
Algorithm - Computer plays rst
- C plays odd moves

fi
Algorithm - Human plays rst -
C plays even moves

fi
Complete Algorithm - odd moves or
even moves for C playing rst or second

fi
Comments
• Not as e cient as rst one in terms of time.

• Several conditions are checked before each move.

• It is memory e cient.

• Easier to understand & complete strategy has been


determined in advance

• Still can not generalize to 3-D.


ffi
ffi
fi
Program 2: Tic-Tac-Toe solved using
Magic Square Method

8 3 4

1 5 9

6 7 2

-Here, we assign board positions to vector elements.


-Sum of all rows, columns and diagonals must me 15.

Note: Machine-First it will check, chance to win, or it will check the opponent of winning and
block the chances of winning. Here, machine will win.
8 3 4

1 5 9

6 7 2
Program 3 for Tic-Tac-Toe:Data Structures

▪BoardPosition is a structure containing


❑ A 9-element array representing the board
❑ A list of board positions that could result from the next move
❑ A number or rating representing an estimate of how likely
the board position is to lead to an ultimate win for the player
to move.

Program 3 for Tic-Tac-Toe:Algorithm


Steps:
1. For the next move, look ahead at the board
positions that result from each possible move.
2. Decide which position is best
3. Make the move that leads to that position
4. Assign the rating of that best move to the current
position
In Step 2, to decide which of a set of board positions is
best, do the following for each of them:
2(a) See if it is a win. If so, call it the best by giving it
the highest rating.
(continued…)

Program 3 for Tic-Tac-Toe:Algorithm


2(b) Otherwise, consider all the moves the opponent would make
next.
See which is worst by recursively calling the first step. Assume the
opponent will make that move.
Whatever rating that move has, assign it to the node being
considered.
2(c) The best node is then the one with the highest rating.
This algorithm will look ahead at various sequences of moves in order to find
a sequence that leads to a win.
It attempts to maximize the likelihood of winning, while assuming that the
opponent will try to minimize that likelihood.
This algorithm is called the MINIMAX Procedure.
● Tic tac toe using heuristic search.
● ∈(heuristic function)
● ∈=X’s probability to win-O’s probability to win.
● ∈=0(draw) ; ∈=1(win)









Draw=0–will return zero to
parent.
Win=1–will return one to
parent

Note: Backtrack and decide which


alternative is best move to win.
Comments
• This program will require more time than two others
as

• it has to search a tree representing all possible


move sequences before making each move.

• This approach is extensible to handle

• 3-dimensional tic-tac-toe and

• it could be extended to handle games but more


complicated than tic-tac-toe
Comments on the Three Programs
❑ Program 1: Fast but takes up lot of memory
If it is to be extended to 3D Tic-Tac-Toe,
it would require 327 entries in MoveTable
(not possible)
❑ Program 2: Slower and less efficient
But requires much less space
Strategy is simpler but is predetermined
Cannot be generalized to any sequence
of moves.
❑ Program 3: Slower
Can be extended to games more
complex than Tic-Tac-Toe

41






























What is Question Answering?


Type of information retrieval. Given a collection of
documents, the system should be able to retrieve
answers to questions posed in natural language.

-Wikipedia
Applying BERT(Neural Network) to Question Answering

The Google BERT update is an arti cial intelligence language model, a pre
trained model, that Google now applies to search query results and featured
snippets. BERT stands for Bidirectional Encoder Representations from
Transformers.
fi
START

(SynTactic Analysis using Reversible Transformations)




Facts
■ Was developed by Boris Katz at MIT's
Artificial Intelligence Laboratory

■ Was first connected to the World Wide


Web in December, 1993

■ Key technique is "natural language


annotation"

Motivation
Google Search
Question Answering System
http://start.csail.mit.edu/index.php
QA Different From Search
QA Search

Input Natural Language Query


Question containing
keywords
Output Concise answer List of
documents
Uses Quick references Extensive
research
Question Answering
● Program
(Matches text fragments in the questions against the i/p
text;Template and pattern match

● Program
(Converts i/p text into a structure internal form that attempts
to capture the meaning of sentences

● Program
(Here we not only consider the structured form of i/p text, but
also a structured form which describes objects and situations
involved in the text)
1

Question Answering
Let us consider Question Answering systems that accept
input in English and provide answers also in English.
For example, suppose that the input text were just the single sentence

Russia massed troops on the Czech border.

• Then either of the following question-answering dialogues might occur

Dialogue 1
• Q: Why did Russia do this?

• A: Because Russia thought that it could take political control of Czechoslovakia by sending
troops.

• Q: What should the United States do?


• Another area of di culty concerns
deciding whether the answer obtained
• A: The United States should intervene militarily.
is correct, or not, and further what is
Dialogue 2 meant by ‘correct’.
• Q: Why did Russia do this?

• A: Because Russia wanted to increase its political in uence over Czechoslovakia.

• Q: What should the United States do?

• A: The United States should denounce the Russian action in the United Nations.
ffi
fl
Problem: Question Answering
• Let us now see three variants of programs to question
answering. For example, consider the following
situation:

• Text

• Mary went shopping for a new Coat. She found a red


one she really liked. When she got home, she found
that it went perfectly with her favourite dress.

We will attempt to answer each of the following questions with each program.

• Question

• 1. What did Mary go shopping for?

• 2. What did Mary nd that she liked?

• 3. Did Mary buy anything?


fi
Method 1- Using Templates and Patterns.
This program attempts to answer questions using the literal input text. It simply
matches text fragments in the questions against the input text.

• 1. Match prede ned templates to questions to generate text patterns.

• 2. Match text patterns to input texts to get answers.

Data Structures

• A set of templates that match common questions and produce patterns used to match
against inputs.

• In this algorithm, templates and patterns are paired, so that if a template matches
successfully against an input question then it’s associated text pattern are used to nd
the appropriate answer in the input text.

For example, the template what did x y generates x y z if a match occurs and z is the
answer to the question. The given text and the question are both stored as strings.
What did X Y What did Mary go shopping for?
Mary go shopping for Z
Z a new coat
fi
fi
Method 1
Algorithm

Answering a question requires the following steps to be followed:

• Compare the template against the questions and store all successful
matches to produce a set of text patterns.

• Pass these text patterns through a substitution process to change the


person or voice and produce an expanded set of text patterns. (For
example: “go” in a question might match “went” in the text.)

NOTE: The machine passes each of these pattern through a substitution


process that generates alternative forms of verbs.

• Apply each of these patterns to the text; collect all the answers and then
print the answers.
Contd.
Example

• In question 1 we use the template WHAT DID X Y which generates


Mary go shopping for z and after substitution we get Mary goes
shopping for z and Mary went shopping for z giving z [equivalence] a
new coat

• In question 2 we need a very large number of templates and also a


scheme to allow the insertion of ‘ nd’ before ‘that she liked’; the
insertion of ‘really’ in the text; and the substitution of ‘she’ for ‘Mary’
gives the answer ‘a red one’.

• Question 3 cannot be answered.


fi
Contd.
Comments

It is di cult to answer questions based on unstated information.

• This is a very primitive approach basically not matching the criteria we set for

intelligence and worse than that, used in the game. Surprisingly this type of

technique was actually used in ELIZA.

Eliza, a natural language processing computer, was the rst chatbot. Developed at
MIT's Arti cial Intelligence Lab, it is a direct ancestor of the Siri, Alexa and other digital
assistants. Eliza could not talk like Alexa but communicated via text and was not capable
of learning from human conversations.
ffi
fi
fi
ELIZA
In brief: Method 1
Method 2- Using Linguistic Knowledge
Linguistic knowledge is represented as a system of constraints, a grammar, which
de nes all and only the possible sentences of the language
This program rst converts the input text into a structured internal form (It captures the
meaning of the sentence) that attempts to capture the meaning of the sentences. It also
converts questions into that form. It nds answers by matching structured forms against
each other.
Data Structures
EnglishKnow
A description of the words, grammar, and appropriate semantic interpretations of a large
enough subset of English to account for the input texts that the system will see.

InputText
The input text in character form.

StructuredText

A structured representation of the content of the input text.

InputQuestion
The input question in character form.

StructQuestion
A structured representation of the content of the user's question.
fi
fi
fi
Contd.
The structure attempts to capture the essential knowledge contained in the text.
• 3 knowledge representation systems.

• Production rule (of the form “if x then y”).

• Slot-and- ller structure

• Statements in mathematical logic

Data Structures

• This data structure provides the knowledge to convert English


text into a storable internal form and also to convert the response
back into English. The structured representation of the text is a
processed form and de nes the context of the input text by
making explicit all references such as pronouns.

• The system used here will be the slot and ller system.
fi
fi
fi
Method 2

(might be represented as shown below:)

Mary

One of the key ideas in this sort of


representation is that -entities in the
representation derive their meaning
from the connection to other entities.

Slot and ller structure

Structured Representation of a Sentence


fi
Contd.
Algorithm
Convert the InputText into structured form using the knowledge contained
in EnglishKnow. Then, to answer a question, do the following:

1. Convert the question to structured form, again using the knowledge


contained in EnglishKnow.

Note: use a marker to indicate the substring (like ‘who’ or ‘what’) of the
structure, that should be returned as an answer. If a slot and ller system is
used a special marker can be placed in more than one slot.

2. Match this structured form against StructuredText.

3. Return as the answer those parts of the text that match the requested
segment of the question.
Examples

• Both questions 1 and 2 generate answers via a new coat and a


red coat respectively. Question 3 cannot be answered, because
there is no direct response.
fi
Comments
• This approach is more meaningful than the previous one and so is more
e ective.

• The extra power given must be paid for by additional search time in the
knowledge bases.

• A warning must be given here: that is – to generate unambiguous


English knowledge base is a complex task and must be left until later in
the course.

• The problems of handling pronouns are di cult.


ff
ffi
Comments
For example:

• Mary walked up to the salesperson: she asked where the toy


department was.

• Mary walked up to the salesperson: she asked her if she needed any
help.

• Whereas in the original text the linkage of ‘she’ to ‘Mary’ is easy,


linkage of ‘she’ in each of the above sentences to Mary and to the
salesperson requires additional knowledge about the context via the
people in a shop.
In Detail:
• It is not possible to determine what the word "she" refers to without
knowledge about the roles of customers and salespeople in stores.

• In the simple case illustrated in our coat-buying example, it is possible to


derive correct answers to our rst two questions without any additional
knowledge about stores or coats, and the fact that some such additional
information may be necessary to support question answering has already
been illustrated by the failure of this program to nd an answer to question
3.

• Thus we see that although extracting a structured representation of the


meaning of the input text is an improvement over the meaning-free
approach of Program 1, it is by no means su cient in general. So we need
to look at an even more sophisticated (i.e., knowledge-rich) approach, which
is what we do next
fi
ffi
fi
In brief: Method 2

• Question

• 1. What did Mary go shopping for?

• 2. What did Mary nd that she liked?

• 3. Did Mary buy anything?


fi
Method 3-Using Linguistic Knowledge and
World Knowledge
Linguistic knowledge is represented as a system of constraints, a grammar, which
de nes all and only the possible sentences of the language

World knowledge is having an understanding and awareness of many di erent


subjects and disciplines or knowledge domains. This kind of knowledge is often
called background or prior knowledge.

• This program converts the input text into a structured form that contains the meanings
of the sentences in the text, and then it combines that form with other structured
forms that describe prior knowledge about the objects and situations involved in the
text.

• It answers questions using this augmented knowledge structure.

Augmented Knowledge = Structured form1 + Structured form2.

Here, two structured form are generated.


1. Structured form1-of input text.
2. Structured form2-that describes prior knowledge about the object and situations
involved in the text.
Match between structured information of input questions and integrated text to
obtain answer.
fi
ff
Data Structures
WorldModel
• A structured representation of background world knowledge. This structure contains
knowledge about objects, actions, and situations that are described in the input text.

• This structure is used to construct IntegratedText from the input text.

• This structure is used to create IntegratedText from input text.

• The diagram shows how the system’s knowledge of shopping might be represented and
stored. This information is known as a script ( stereotypical events) and in this case is a
shopping script (See gure).

EnglishKnow
Same as in Program 2.

InputText
The input text in character form.

IntegratedText
A structured representation of the knowledge contained in the input text (similar to the
structured description of Program 2) but combined now with other background, related
knowledge.

InputQuestion
The input question in character form.

StructQuestion

A structured representation of the question.


fi
Method 3
Algorithm
• Convert the InputText into structured form using both the knowledge contained in
EnglishKnow and that contained in WorldModel.

• The number of possible structures will usually be greater now than it was in Program
2 because so much more knowledge is being used.

• Sometimes, though, it may be possible to consider fewer possibilities by using the


additional knowledge to lter the alternatives.

Filters are introduced to prune the possible answers.

M (coat), M’ (red coat)


fi
Program 3- A Shopping Script

M (coat), M’ (red coat)


Contd.
To answer a question, do the following:

1.Convert the question to structured form as in Program 2 but use WorldModel if


necessary to resolve any ambiguities that may arise.

2.Match this structured form against IntegratedText. (Here the question which is
converted to a structured form is compared with the integrated text to nd
answer.)

3.Return as the answer those parts of the text that match the requested segment
of the question.

fi
Examples
Q1: Same as Program 2.

Q2: Same as Program 2.

Q3: Now this question can be answered.

• The shopping script is instantiated for this text, and because of the last sentence, the
path through step 14 of the script is the one that is used in forming the representation of
this text. When the script is instantiated M' is bound to the structure representing the red
coat

• After the script has been instantiated, IntegratedText contains several events that are
taken from the script but that are not described in the original text, including the event
"Mary buys a red coat" (from step 10 of the script).

• Thus, using the integrated text as the basis for question answering allows the program
to respond "She bought a red coat."

‘Mary buys a red coat’ comes from step 10 and the


integrated text generates that she bought a red coat.
Comments
• This program is more powerful than both the previous programs because it has
more knowledge. Thus, like the last game program it is exploiting AI techniques.

• However, we are not yet in a position to handle any English question.

• The major omission is that of a general reasoning mechanism known as inference to


be used when the required answer is not explicitly given in the input text.

• But this approach can handle, with some modi cations, questions of the following
form with the answer

• Example:—Saturday morning Mary went shopping. Her brother tried to call her
but she did not answer.
• Question: Why couldn’t ‘Mary’s brother reach her?

• Answer: Because she was not in. (The machine with reasoning ability must reply)

• This answer is derived because we have supplied an additional fact that a person
cannot be in two places at once. This patch is not su ciently general so as to
work in all cases and does not provide the type of solution we are really looking for.
fi
ffi
In brief: Method 3

• Question
• 1. What did Mary go shopping for?
• 2. What did Mary nd that she liked?
• 3. Did Mary buy anything?
fi
Conclusion
We have just examined two series of programs to solve two very di erent problems. The
two programs are slower to execute than the earlier ones in their respective series, but
they illustrate three important Al techniques:

• Search—Provides a way of solving problems for which no more direct approach is


available as well as a framework into which any direct techniques that are available can
be embedded.

• Use of Knowledge—Provides a way of solving complex problems by exploiting the


structures of the objects that are involved.

• Abstraction—Provides a way of separating important features and variations from the


many unimportant ones that would otherwise overwhelm any process.

ff
Level of AI Model
How should your model perform?
Preferably it should match human performance.
-Model the program that computer could easily solve.
-Model human performance.
To decide this we must ask questions-
• ‘What is our goal in trying to produce programs that do the intelligent things that people do?’

• Are we trying to produce programs that do the tasks the same way that people do?

OR

• Are we trying to produce programs that simply do the tasks the easiest way that is possible?

• Programs in the rst class attempt to solve problems that a computer can easily solve and do not
usually use AI techniques. AI techniques usually include a search, as no direct method is available,
the use of knowledge about the objects involved in the problem area and abstraction on which
allows an element of pruning to occur, and to enable a solution to be found in real time; otherwise,
the data could explode in size. Examples of these trivial problems in the rst class, which are now
of interest only to psychologists are EPAM (Elementary Perceiver and Memorizer) which
memorized garbage syllables.
fi
fi
Contd.
The second class of problems attempts to solve problems that are non-trivial for a
computer and use AI techniques. We wish to model human performance on these:

1. To test psychological theories of human performance. Ex. PARRY [Colby, 1975] – a


program to simulate the conversational behavior of a paranoid person.

2. To enable computers to understand human reasoning – for example, programs that


answer questions based upon newspaper articles indicating human behavior.

3. To enable people to understand computer reasoning. Some people are reluctant to


accept computer results unless they understand the mechanisms involved in arriving
at the results.

4. To exploit the knowledge gained by people who are best at gathering information.
This persuaded the earlier workers to simulate human behavior in the SB part of AISB
simulated behavior. Examples of this type of approach led to GPS (General Problem
Solver).
Contd.
• The second class of problems attempts to solve problems that are non-trivial for a
computer and use AI techniques. We wish to model human performance on
these:

• 1. To test psychological theories of human performance. Ex. PARRY [Colby, 1975]


– a program to simulate the conversational behavior of a paranoid person.

• 2. To enable computers to understand human reasoning – for example, programs


that answer questions based upon newspaper articles indicating human behavior.

• 3. To enable people to understand computer reasoning. Some people are


reluctant to accept computer results unless they understand the mechanisms
involved in arriving at the results.

• 4. To exploit the knowledge gained by people who are best at gathering


information. This persuaded the earlier workers to simulate human behavior in the
SB part of AISB simulated behavior. Examples of this type of approach led to
GPS (General Problem Solver).
Criteria for success
Alan Turing proposed ‘Turing Test’ method for determining whether a
machine can think.

Turing test
● Three participants
(Two humans and one machine)

Human 1: interrogator.

Human 2: participant.

Machine: participant.

One Final word and beyond


• An AI system must contain a lot of knowledge if it is to handle
anything.

• But as the amount of knowledge grows, it becomes harder to


access the appropriate things when needed, so more knowledge
must be added to help.

• Our goal in AI is to construct working programs that solve the


problems we are interested in.

• AI programs are easiest to build using language. Eg: LISP,


PROLOG.
Chapter 1

End

79

You might also like