Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Unit 1 AI Chapter1 SAV 2022

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 31

Artificial Intelligence

1
outline

• What is AI?
• The foundations of AI
• A brief history of AI
• The state of the art
• Introductory problems

2
What is AI?

3
What is AI?

• Intelligence: “ability to learn, understand and


think” (Oxford dictionary)

• AI is the study of how to make computers think


which at the moment people do better.

• Examples: Speech recognition, game playing,


theorm proving ,medical diagnostics etc

4
Intelligence Vs Artificial Intelligence
1. Natural 1. Programmed by human
2. Increase with experience being
and also hereditary. 2. Nothing called hereditary
3. Highly refined and no but systems do learn from
electricity from outside is experience.
required to generate 3. It is in computer system and
output. Rather knowledge we need electrical energy
is good for intelligence. to get output. knowledge
base is required to generate
4. No one is an expert. we output
can always get better 4. Experts systems are made
solution from another which have the capability of
human being. many individual person’s
5. Intelligence increase by experiences and ideas.
supervised and 5. We can increase AI
unsupervised learning. capabilities by other means
AI-Class

• Strong AI • Weak AI
Machines that act Machines can be made
intelligently have to act as if they were
real, conscious intelligent.
minds. “Helping” is called
“Doing is called strong weak AI
AI” Solve problem in
Thinking level at least limited domain
equal to humans.
What is AI?

Thinking humanly Thinking rationally

Acting humanly Acting rationally

7
Acting Humanly: The Turing Test

• Alan Turing (1912-1954)


• “Computing Machinery and Intelligence”
(1950)
Imitation Game
Huma
n

Human
AI
Interrogator
System
8
Acting Humanly: The Turing Test

• Predicted that by 2000, a machine might have


a 30% chance of fooling a lay person for 5
minutes.

• Anticipated all major arguments against AI in


following 50 years.

• Suggested major components of AI:


knowledge,
reasoning, language, understanding, learning.

9
Thinking Humanly: Cognitive Modelling

• Not content to have a program correctly


solving a problem.
More concerned with comparing its reasoning
steps
to traces of human solving the same problem.

• Requires testable theories of the workings of


the
human mind: cognitive science.

10
Thinking Rationally: Laws of Thought

• Aristotle was one of the first to attempt to


codify “right thinking”, i.e., irrefutable
reasoning processes.

• Formal logic provides a precise notation and


rules for representing and reasoning with all
kinds of things in the world.

• Obstacles:
 Informal knowledge representation.
 Computational complexity and resources.
11
Acting Rationally

• Acting so as to achieve one’s goals, given


one’s beliefs.

• Does not necessarily involve thinking.

• Advantages:
 More general than the “laws of thought”
approach.
 More amenable to scientific development than human-
based approaches.

12
Task Domains of AI
• Mundane Tasks:
– Perception
• Vision
• Speech
– Natural Languages
• Understanding
• Generation
• Translation
– Common sense reasoning
– Robot Control
• Formal Tasks
– Games : chess, checkers etc
– Mathematics: Geometry, logic,Proving properties of programs
• Expert Tasks:
– Engineering ( Design, Fault finding, Manufacturing planning)
– Scientific Analysis
– Medical Diagnosis
– Financial Analysis

13
AI Technique
• Intelligence requires Knowledge
• Knowledge posesses less desirable properties such as:
– Voluminous
– Hard to characterize accurately
– Constantly changing
– Differs from data that can be used
• 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 provide it
– It can be easily modified to correct errors.
– It can be used in variety of situations

14
The State of the Art

• Computer beats human in a chess game.


• Computer-human conversation using speech
recognition.
• Expert system controls a spacecraft.
• Robot can walk on stairs and hold a cup of water.
• Language translation for webpages.
• Home appliances use fuzzy logic.
• ......
15
Tic Tac Toe

• Three programs are presented. The programs


in this series increase in:
– Their complexity
– Their Use of generalization
– Clarity of their knowledge
– Extensibility of their approach

16
Introductory Problem: Tic-Tac-Toe

X X
o

17
Introductory Problem: Tic-Tac-Toe
Program 1:
Data Structures:
• Board: 9 element vector representing the board, with 1-9 for
each square. An element contains the value 0 if it is blank, 1
if it is filled by X, or 2 if it is filled with a O
• Movetable: A large vector of 19,683 elements ( 3^9), each
element is 9-element vector.
Algorithm:
1. View the vector as a ternary number (base 3). Convert it to a
decimal number.
2. Use the computed number as an index into Move-Table and
access the vector stored there.
3. Set the new board to that vector.

18
Introductory Problem: Tic-Tac-Toe

Comments:
This program is very efficient in time.

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

2. A lot of work to specify all the entries in the


Move-Table.

3. Difficult to extend as in 3d the move table


entries will rise to 3^27
4. It is unlikely to enter all the entries in a
movetable without making any mistake.
19
Introductory Problem: Tic-Tac-Toe

1 2 3
4 5 6
7 8 9

20
Introductory Problem: Tic-Tac-Toe
Program 2:
Data Structure: A nine element vector representing the board. But
instead of using 0,1 and 2 in each element, we store 2 for blank,
3 for X and 5 for O
Turn: An integer indicating which move of the game is about to be
played; 1 indicates the first move and 9 indicates the last move.
Algorithm: three sub procedures.
Make2: returns 5 if the centre square is blank. Else any non corner
blank sq. (2,4,6,8)
Posswin(p): Returns 0 if the player p cannot win on his next move;
otherwise it returns the number of the square that constitutes a
winning move. If the product is 18 (3x3x2), then X can win. If the
product is 50 ( 5x5x2) then O can win.
Go(n): Makes a move in the square n
Strategy:
Turn = 1 Go(1)
Turn = 2 If Board[5] is blank, Go(5), else Go(1)
Turn = 3 If Board[9] is blank, Go(9), else Go(3)
Turn = 4 If Posswin(X)  0, then Go(Posswin(X)) else Go( Make 2)
Turn =5 If Passwin(O) 0, then Go(Posswin(O)) else If Posswin(X) 
0, then Go(Posswin(X)) else Go( Make 2).............
21
Introductory Problem: Tic-Tac-Toe

Comments:

1. Not efficient in time, as it has to check several


conditions before making each move.

2. Easier to understand the program’s strategy.

3. Hard to generalize.

22
Introductory Problem: Tic-Tac-
Toe
Program 3:

8 3 4
1 5 9
6 7 2
15  (8 +
5) 23
Introductory Problem: Tic-Tac-Toe

Comments:

1. Checking for a possible win is quicker.

2. Human finds the row-scan approach easier,


while
computer finds the number-counting
approach more
efficient.

24
Introductory Problem: Question
Answering
“Mary went shopping for a new coat. She found a red
one she really liked. When she got it home, she
discovered that it went perfectly with her favourite
dress”.

Q1: What did Mary go shopping for?

Q2: What did Mary find that she liked?

Q3: Did Mary buy anything?

25
Introductory Problem: Question
Answering
Program 1:

1. Match predefined templates to questions to


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

“What did X Y” “What did Mary go shopping


for?”

“Mary go shopping for Z”

Z = a new coat
26
Introductory Problem: Question
Answering
Program 2:
Structured representation of sentences:

Event2: Thing1:
instance: Finding instance: Coat
tense: Past colour: Red
agent: Mary
object: Thing 1

27
Introductory Problem: Question
Answering
Event2: Thing1:
instance: Liking instance: Coat
tense: Past colour: Red
modifier:Much
object: Thing 1

28
Introductory Problem: Question
Answering
Program 3:
Background world knowledge:

Shopping Script

Roles: C (Customer), S (salesperson)


Props: M (Merchandise), D (Dollars)
Location: L (a store)

For example:
M: Coat
M`: Red Coat 29
30
31

You might also like