You are on page 1of 65

Artificial Intelligence

Introduction

3/10/2018
References

• Artificial Intelligence by Elaine Rich & Kevin


Knight, Third Ed, Tata McGraw Hill

• P. H.Winston, “Artificial Intelligence”

• D.W.Patterson, Introduction to AI & Expert


Systems, Prentice Hall.

3/10/2018
If human beings can think then why not
machines?

If machines If machines
can think, How? can not think, Why?

Can they surpass human And what does this


performance? say about the mind?

3/10/2018
Artificial + Intelligent

3/10/2018
What is artificial intelligence?

• Intelligence (Oxford dictionary ):

• Ability to
• Learn
• Understand and
• Think.

3/10/2018
Artificial + Intelligence
• Designing of intelligence man made artifacts
• Artificial :
o fake, not real , man made
• Intelligence:
– “the capacity to learn and solve problems”
– in particular,
• the ability to solve novel problems
• the ability to act rationally
• the ability to act like humans

3/10/2018
INTELLIGENCE
• Intelligence is the computational part of the ability to
achieve goals in the world.

• Varying kinds and degrees of intelligence occur in people,


many animals and some machines.

• AI is the study of how to make computers make things


which at the moment people do better.
– Examples: Speech recognition, Smell and Face Objects, Intuition,
Inferencing, Learning new skills, Decision making, Abstract thinking

3/10/2018
What is involved in INTELLIGENCE

• Ability to interact with the real world


– to perceive, understand, and act
– e.g., speech recognition and understanding and synthesis
– e.g., image understanding
– e.g., ability to take actions, have an effect

• Reasoning and Planning


– modeling the external world, given input
– solving new problems, planning, and making decisions
– ability to deal with unexpected problems, uncertainties

• Learning and Adaptation


– we are continuously learning and adapting
– our internal models are always being “updated”
• e.g., a baby learning to categorize and recognize
ARTIFICIAL INTELLIGENCE
There are no clear agreement on the definition of AI

• It is the science and engineering of making


intelligent machines, especially intelligent
computer programs.
• It is related to the similar task of using computers
to understand human intelligence, but AI does not
have to confine itself to methods that are
biologically observable.
• AI is the study of how to make computers just like
humans. That means how to make computers to do
things that people do better.
3/10/2018
Other possible AI definitions
• AI is a collection of hard problems which can be
solved by humans and other living things, but for
which we don’t have good algorithms for solving.
– e. g., understanding spoken natural language, medical
diagnosis, circuit design, learning, self-adaptation,
reasoning, chess playing, proving math theories, etc.
• AI is a process of making a machine or a program
that
– Learn and understand like human
– Acts like human (Turing test)
– Thinks like human (human-like patterns of thinking
steps,Reasoning)
– Acts or thinks rationally (logically, correctly, Cognitive Science)
3/10/2018
Cont…
• Some problems used to be thought of as AI but are
now considered not
– e. g., compiling Fortran(suited to numeric
computation and scientific computing) in 1955,
– symbolic mathematics
(manipulate mathematical equations ) in 1965
– proving math theories

3/10/2018
Cont…
• AI is the study and design of intelligent agents

where,

an intelligent agent is a system that interact with its


environment and takes actions that maximize its
chances of success.

3/10/2018
Problems In AI
• Easy Problems in AI
• It’s been easier to mechanize many of the high level cognitive tasks
we usually associate with “intelligence” in people
– e. g., symbolic integration, proving theorems, playing chess,
some aspect of medical diagnosis, etc.
– Hard Problems in AI
• It’s been very hard to mechanize tasks that animals can do easily
– walking around without running into things (ASIMO)
– interpreting complex sensory information (visual, aural, …)
– working as a team (ants, bees)

3/10/2018
ASIMO (2000) at the Expo 2005
Humanoid robot created by Honda. Standing at 130
centi-meters (4 feet 3 inches) and weighing 54
kilograms

3/10/2018
Kismet now resides at the MIT Museum
inCambridge, Massachusetts
• Kismet is a robot made in
the late 1990s
at Massachusetts Institute of
Technology with auditory,
visual and expressive
systems intended to
participate in human social
interaction and to
demonstrate simulated
human emotion and
appearance.
3/10/2018
TOPIO, a human robot played table tennis at
Tokyo International Robot Exhibition (IREX) 2009

3/10/2018
Stanley Robot in Stanford Racing Team

3/10/2018
Robot holding the Bulb

3/10/2018
Factory Automation with industrial robots

3/10/2018
Intelligent Systems in Your Everyday Life
• Post Office
– automatic address recognition and sorting of mail
• Banks
– automatic check readers, signature verification systems
– automated loan application classification
• Customer Service
– automatic voice recognition

• The Web
– Identifying your age, gender, location, from your Web surfing
– Automated fraud detection

• Digital Cameras
– Automated face detection and focusing

• Computer Games
– Intelligent characters/agents

3/10/2018
Foundations of AI
Computer
Science &
Engineering
Mathematics Philosophy

Economics
AI Biology

Psychology Linguistics
Cognitive
Science

3/10/2018
Disciplines related to AI
• Philosophy :Logic, methods of reasoning, mind as physical system,
foundations of learning, language,rationality.
• Mathematics :Formal representation and proof, algorithms, computation,
(un)decidability, (in)tractability
• Probability/Statistics : modeling uncertainty, learning from data
• Economics : utility, decision theory, rational economic agents
• Neuroscience : neurons as information processing units.
• Psychology / Cognitive Science : how do people behave, perceive,
process cognitive information, represent knowledge.
• Computer : building fast computers engineering
• Control theory: design systems that maximize an objective function over
time
• Linguistics : knowledge representation, grammars

3/10/2018
History of AI
• AI has roots in a number of scientific disciplines
– computer science and engineering (hardware and software)
– philosophy (rules of reasoning)
– mathematics (logic, algorithms, optimization)
– cognitive science and psychology (modeling high level
human/animal thinking)
– neural science (model low level human/animal brain activity)
– linguistics
• The birth of AI (1943 – 1956)
– Pitts and McCulloch (1943): simplified mathematical model of
neurons (resting/firing states) can realize all propositional logic
primitives (can compute all Turing computable functions)
– Allen Turing: Turing machine and Turing test (1950)
– Claude Shannon: information theory; possibility of chess playing
computers
3/10/2018
• Early enthusiasm (1952 – 1969)
– 1956 Dartmouth conference
John McCarthy (Lisp);
Marvin Minsky (first neural network machine);
Alan Newell and Herbert Simon (GPS);
– Emphasize on intelligent general problem solving
GSP (means-ends analysis);
Lisp (AI programming language);
Resolution by John Robinson (basis for automatic theorem
proving);
heuristic search (A*, AO*, game tree search)
• Emphasis on knowledge (1966 – 1974)
– domain specific knowledge is the key to overcome existing
difficulties
– knowledge representation (KR) paradigms
– declarative vs. procedural representation
3/10/2018
• Knowledge-based systems (1969 – 1999)
– DENDRAL: the first knowledge intensive system (determining 3D
structures of complex chemical compounds)
– MYCIN: first rule-based expert system (containing 450 rules for
diagnosing blood infectious diseases)
EMYCIN: an ES shell
– PROSPECTOR: first knowledge-based system that made
significant profit (geological ES for mineral deposits)
• AI became an industry (1980 – 1989)
– wide applications in various domains
– commercially available tools
• Current trends (1990 – present)
– more realistic goals
– more practical (application oriented)
– distributed AI and intelligent software agents
– resurgence of neural networks and emergence of genetic
algorithms
3/10/2018
Programming languages for AI
• The programs for AI problems can be written with on procedural
languages like PASCAL or declaration languages like PROLOG.
• Generally relational languages like PROLOG or LISP are preferred
for symbolic reasoning in AI.
• However, if the program requires much arithmetic computation (say
for the purpose of uncertainty management), then procedural languages
would be preferred.
• Recently a number of shell are available, where the user needs to
submit knowledge only and the shall offers the implementation of both
symbolic processing simultaneously.

3/10/2018
Applications of AI
• Speech recognition : converts spoken words to
text
• Face Recognition : a computer application for
automatically identifying or verifying a person
from a digital image or a video
• Finger print scanning
• Optical character recognition : electronic
translation of printed text into machine-encoded
text
• Handwriting recognition
•3/10/2018
Many more……
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

3/10/2018
Possible Approaches in AI

Like
humans Well

Rational
GPS
Think agents
AI tends to work
mostly in this area

Heuristic
Act Eliza systems

3/10/2018
Like
humans Well
Think like humans Rational
Think GPS
agents

• Cognitive science approach


• Focus not just on behavior and I/O Eliza Heuristic
Act systems

but also look at reasoning process.


• Computational model should reflect “how” results were
obtained.

• GPS (General Problem Solver): Goal not just to produce


humanlike behavior (like ELIZA), but to produce a
sequence of steps of the reasoning process that was
similar to the steps followed by a person in solving the
same task.

3/10/2018
Like
Think well humans Well

Think Rational
GPS
agents

Heuristic
Act Eliza
systems

• Law of thoughts
• Develop formal models of knowledge representation,
reasoning, learning, memory, problem solving, that can be
result in algorithms.
• There is often an emphasis on a systems that are provably
correct, and guarantee finding an optimal solution.

3/10/2018
Like
humans Well

Act well Think GPS Rational


agents

Eliza Heuristic
Act systems

• For a given set of inputs, generate an


appropriate output that is not necessarily correct but gets the job done.

• A heuristic (heuristic rule, heuristic method) is a rule of thumb,


strategy, trick, simplification, or any other kind of device which
drastically limits search for solutions in large problem spaces.
• Heuristics do not guarantee optimal solutions; in fact, they do not
guarantee any solution at all:
• All that can be said for a useful heuristic is that it offers solutions
which are good enough most of the time.

3/10/2018
Like
Act like humans humans Well

Think Rational
GPS
agents

Heuristic
Act Eliza
systems

• Behaviorist approach.
• Not interested in how you get results, just the
similarity to what human results are.
• Exemplified by the Turing Test (Alan Turing,
1950).

3/10/2018
Acting Humanly: The Turing Test
• Alan Turing (1912-1954)
• “Computing Machinery and Intelligence” (1950)

Imitation Game
Human

Human Interrogator
AI System

3/10/2018
Turing Test(cont..)
• Three rooms contain a person, a computer, and an
interrogator.
• The interrogator can communicate with the other
two by teleprinter.
• The interrogator tries to determine which is the
person and which is the machine.
• The machine tries to fool the interrogator into
believing that it is the person.
• If the machine succeeds, then we conclude that the
machine can think.

3/10/2018
Turing Test
• The "standard
interpretation" of the
Turing Test, in which
player C, the interrogator,
is tasked with trying to
determine which player -
A or B - is a computer and
which is a human. The
interrogator is limited to
using the responses to
written questions in order
to make the
determination.
3/10/2018
Strengths of the test

• Tractability
Turing Test provides something that can actually be measured
philosophy of mind, psychology, and modern neuroscience unable to be
precise – intelligence & thinking

• Simplicity
• Breadth of subject matter
the format of the test allows the interrogator to give the machine a wide variety
of intellectual tasks.
Can include any field during test

3/10/2018
Weaknesses of the test

• Human intelligence vs intelligence in general


• The Turing test does not directly test whether the
computer behaves intelligently - it tests only
whether the computer behaves like a human being.
• human behaviour and intelligent behaviour are not
same

3/10/2018
• Some human behaviour is unintelligent
Turing Test even tests for behaviours that we may not
consider intelligent at all, such as the susceptibility to
insults, the temptation to lie or, simply, a high
frequency of typing mistakes.
If a machine cannot imitate human behaviour in detail
it fails the test.

3/10/2018
Some intelligent behaviour is inhuman

The Turing test does not test for highly intelligent


behaviours, such as the ability to solve difficult
problems or come up with original insights
if the machine is more intelligent than a human being it
must deliberately avoid appearing too intelligent.
If it were to solve a computational problem that is
impossible for any human to solve, then the
interrogator would know the program is not human,
and the machine would fail the test.

3/10/2018
3/10/2018
Naivete of interrogators

• the test's results can easily be dominated not only


by the computer's intelligence
• Skill of the questioner
• average interrogator would not have more than 70
per cent chance of making the right identification
after five minutes of questioning".
• "average interrogator"

3/10/2018
Real intelligence vs simulated intelligence

• the Turing test is a good operational definition of


intelligence, it may not indicate that the machine has
a mind, consciousness
• behaviour cannot be used to determine if a machine is
"actually" thinking or merely "simulating thinking.

3/10/2018
Eliza

• ELIZA: A program that simulated a psychotherapist interacting with a


patient and successfully passed the Turing Test.
• Coded at MIT during 1964-1966 by Joel Weizenbaum.
• First script was DOCTOR.
– The script was a simple collection of syntactic patterns not unlike
regular expressions
– Each pattern had an associated reply which might include bits of
the input (after simple transformations (my  your)

3/10/2018
The Loebner Contest

• A modern version of the Turing Test, held annually, with a $100,000 cash
prize.
• http://www.loebner.net/Prizef/loebner-prize.html
• Restricted topic (removed in 1995) and limited time.
• Participants include a set of humans and a set of computers and a set of
judges.
• Scoring
– Rank from least human to most human.
– Highest median rank wins $2000.
– If better than a human, win $100,000. (Nobody yet…)

3/10/2018
What can AI systems do

Here are some example applications


• Computer vision: face recognition from a large set
• Robotics: autonomous (mostly) automobile
• Natural language processing: simple machine translation
• Expert systems: medical diagnosis in a narrow domain
• Spoken language systems: ~1000 word continuous speech
• Planning and scheduling: Hubble Telescope experiments
• Learning: text categorization into ~1000 topics
• Games: Grand Master level in chess (world champion), checkers, etc.

3/10/2018
What can’t AI systems do yet?

• Understand natural language robustly (e.g., read and


understand articles in a newspaper)
• Surf the web
• Interpret an arbitrary visual scene
• Learn a natural language
• Construct plans in dynamic real-time domains
• Refocus attention in complex environments
• Perform life-long learning

3/10/2018
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 must provide it
– It can be easily modified to correct errors.
– It can be used in variety of situations

3/10/2018
Tic Tac Toe
• Three programs are presented :
Series increase
– Their complexity
– Use of generalization
– Clarity of their knowledge
– Extensability of their approach

3/10/2018
Introductory Problem: Tic-Tac-Toe

X X
o

3/10/2018
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
• Move-Table: 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.

3/10/2018
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.

Thus not a good AI Technique

3/10/2018
Introductory Problem: Tic-Tac-Toe

1 2 3
4 5 6
7 8 9

3/10/2018
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 centre square is blank. Else any other blank square
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))
.......
3/10/2018
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. Any bug in programmer tic-tac-toe playing skill
will show up in program’s play.

3. Hard to generalize.

3/10/2018
Introductory Problem: Tic-Tac-Toe

8 3 4
1 5 9
6 7 2
15 - (8 + 5)
3/10/2018
New appraoch
• All row, column and diagonal sum is 15
• Make a list, for each player , of the squares in which he/she has played.
• Consider each pair of square owned by that player
• Computer difference between 15 and sum of two square. If difference
is -ve or if greater then 9, then the original two square were not
collinear and thus can be ignored.
• If square representing the difference is blank, a move there will
produce a win.
• No player cant have more then 4 square at a time, so fewer square to
compared to.

3/10/2018
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.

3/10/2018
Introductory Problem: Tic-Tac-Toe
Program 3:
Structure with 9-element vector representing the board, a list of board
positions that could result from the next move, estimate how likely
the board position lead to ultimate win for the player to move.

Algorithm:
To decide to the next move , look ahead at the board position that result
from each possible move. Decide which position is best.

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.
3/10/2018
Introductory Problem: Tic-Tac-Toe

Comments:
Algo look ahead at various moves that leads to win.
It attempts to maximize the likelihood of winning
and opponent will try to minimize that ---
minimax procedure.

1. Require much more time to consider all possible


moves.

2. Could be extended to handle more complicated


games.
3/10/2018
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?


3/10/2018
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 shoppin


for?”

“Mary go shopping for Z”

Z = a new coat
3/10/2018
Introductory Problem: Question Answering

Program 2:
Convert the input text into a structured internal form that attempts to capture
the meaning of the sentences.

Structured representation of sentences:

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

3/10/2018
Introductory Problem: Question Answering

Program 3:
Background world knowledge:
C finds M

C leaves L C buys M

C leaves L

C takes M
3/10/2018
Conclusion
• The subject of AI deals more with symbolic
reasoning that conventional number crusting
problems.
• Knowledge representation, learning, speech and
uncertainty management of data and knowledge
are the common areas covered under AI.
• LISP and PROLOG are the used for programming
AI problems.

3/10/2018

You might also like