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

Artificial Intelligence

1
Introduction
• What is AI?
• The foundations of AI
• A brief history of AI
• Introductory problems

2
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,


Intuition, Inferencing, Learning new skills, Decision
making, Abstract thinking.

3
But What is Intelligence?
• Simple things turn out to be the hardest to automate:
– Recognising a face.
– Navigating a busy street.
– Understanding what someone says.
• All tasks require reasoning on knowledge.

4
Why do AI?

• Two main goals of AI:


– To understand human intelligence better. We test theories of
human intelligence by writing programs which emulate it.
– To create useful “smart” programs able to do tasks that would
normally require a human expert.

5
Typical AI Problems
• Intelligent entities (or “agents”) need to be able to do both
“mundane” and “expert” tasks:
• Mundane tasks - consider going shopping:
– Planning a route, and sequence of shops to visit!
– Recognising (through vision) buses, people.
– Communicating (through natural language).
– Navigating round obstacles on the street, and
manipulating objects for purchase.
• Expert tasks are things like:
– medical diagnosis.
– equipment repair.

6
Academic Disciplines important to AI.
• Philosophy Logic, methods of reasoning, mind as physical
system, foundations of learning, language, rationality.
• Mathematics Formal representation and proof, algorithms,
computation, probability.
• Economics utility, decision theory, rational economic agents
• Neuroscience neurons as information processing units.
• Psychology/ how do people behave, perceive, process Cognitive Science
information, represent knowledge.
• Computer building fast computers
engineering
• Control theory design systems that maximize an objective
function over time
• Linguistics knowledge representation, grammar

7
Honda Humanoid Robot

Walk

Turn

http://world.honda.com/robot/
Stairs 8
Sony AIBO

http://www.aibo.com 9
History of AI
• 1943 McCulloch & Pitts: Boolean circuit model of brain
• 1950 Turing's "Computing Machinery and Intelligence"
• 1956 Dartmouth meeting: "Artificial Intelligence" adopted
• 1950s Early AI programs, including Samuel's checkers
program, Newell & Simon's Logic Theorist,
Gelernter's Geometry Engine
• 1965 Robinson's complete algorithm for logical reasoning
• 1966—73 AI discovers computational complexity
Neural network research almost disappears
• 1969—79 Early development of knowledge-based systems
• 1980-- AI becomes an industry
• 1986-- Neural networks return to popularity
• 1987-- AI becomes a science
• 1995-- The emergence of intelligent agents

10
Consider what might be involved in
building a “intelligent” computer….
• What are the “components” that might be useful?
– Fast hardware?
– Foolproof software?
– Chess-playing at grandmaster level?
– Speech interaction?
• speech synthesis
• speech recognition
• speech understanding
– Image recognition and understanding ?
– Learning?
– Planning and decision-making?

11
Task Domains of AI
• Mundane Tasks:
– Perception
• Vision
• Speech
– Natural Languages
• Understanding
• Generation
• Translation
– Robot Control
• Formal Tasks
– Games : chess, checkers etc
• Expert Tasks:
– Engineering ( Design, Fault finding, Manufacturing planning)
– Scientific Analysis
– Medical Diagnosis
– Financial Analysis

12
Can Computers play Humans at
• Chess?
Chess Playing is a classic AI problem
– well-defined problem
– very complex: difficult for humans to play well

3000
Garry Kasparov (current World Champion) Deep Blue
2800
2600
Deep Thought
2400
Points Ratings

2200
Ratings
2000
1800
1600
1400
• Conclusion:
1200 YES: today’s computers can beat even the best human
1966 1971 1976 1981 1986 1991 1997

13
Can we build hardware as complex as

the brain?
How complicated is our brain?
– a neuron, or nerve cell, is the basic information processing unit
– estimated to be on the order of 10 11 neurons in a human brain
– many more synapses (10 14) connecting these neurons
– cycle time: 10 -3 seconds (1 millisecond)

• How complex can we make computers?


– 106 or more transistors per CPU
– supercomputer: hundreds of CPUs, 10 9 bits of RAM
– cycle times: order of 10 - 8 seconds

• Conclusion
– YES: in the near future we can have computers with as many basic processing elements as our brain, but with
• far fewer interconnections (wires or synapses) than the brain
• much faster updates than the brain
– but building hardware is very different from making a computer behave like a brain!

14
Can Computers Learn and Adapt?
• Learning and Adaptation
– consider a computer learning to drive on the freeway
– we could code lots of rules about what to do
– and/or we could have it learn from experience
Darpa’s Grand Challenge. Stanford’s “Stanley” drove
150 without supervision in the Majove dessert

– machine learning allows computers to learn to do things


without explicit programming

• Conclusion: YES, computers can learn and adapt, when


presented with information in the appropriate way

15
Can Computers “see”?
• Recognition v. Understanding (like Speech)
– Recognition and Understanding of Objects in a scene
• look around this room
• you can effortlessly recognize objects
• human brain can map 2d visual image to 3d “map”

• Why is visual recognition a hard problem?

• Conclusion: mostly NO: computers can only “see” certain types of objects under
limited circumstances: but YES for certain constrained problems (e.g., face recognition)

16
In the computer vision community
research compete to improve recognition
performance on standard datasets

17
Conclusion
• AI is about building intelligent agents (robots)

• There are many very interesting sub-problems to solve:


– Learning, vision, speech, planning, …

• Surprising progress has been made (autonomous cars,


chess computers) but surprising lack of progress is also
a fact (visual object recognition).
• There is no doubts that AI has a bright future:
technology is increasingly getting smart.

18
Tic Tac Toe

• Three programs are presented :


– Series increase
– Their complexity
– Use of generalization
– Clarity of their knowledge
– Extensibility of their approach

19
Introductory Problem: Tic-Tac-Toe

X X
o

20
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. 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.

21
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.

22
Introductory Problem: Tic-Tac-Toe

1 2 3
4 5 6
7 8 9

23
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
Functions:
Make2: returns 5 if the center sqaure is blank. Else any other balnk sq
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))
.......

24
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.

25
Introductory Problem: Tic-Tac-Toe

8 3 4
1 5 9
6 7 2
15  (8 + 5)
26
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.

27
Introductory Problem: Tic-Tac-Toe

Program 3:

1. If it is a win, give it the highest rating.

2. Otherwise, consider all the moves the opponent


could make next. Assume the opponent will make
the move that is worst for us. Assign the rating of
that move to the current node.

3. The best node is then the one with the highest


rating.
28
Introductory Problem: Tic-Tac-Toe

Comments:

1. Require much more time to consider all possible


moves.

2. Could be extended to handle more complicated


games.

29
Introductory Problem: Question Answering

“Amna 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 Amna go shopping for?

Q2: What did Amna find that she liked?

Q3: Did Amna buy anything?


30
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 Amna go shopping for?”

“Amna go shopping for Z”

Z = a new coat
31
Introductory Problem: Question Answering

Program 2:
Structured representation of sentences:

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

32
Introductory Problem: Question Answering

Program 3:
Background world knowledge:
C finds M

C leaves L C buys M

C leaves L

C takes M

33

You might also like