Fundamentals of Artificial Intelligence
Introduction to AI
Shyamanta M Hazarika
Indian Institute of Technology Guwahati
s.m.hazarika@iitg.ac.in
http://www.iitg.ac.in/s.m.hazarika/
Quest for Artificial Intelligence
The quest for Artificial Intelligence began with
dreams as all quests do.
People have long imagined machines endowed with
human abilities automata that move and devices that reason.
Human-like automatons are described in many stories
and are pictured in sculptures, paintings, and
drawings.
© Shyamanta M Hazarika, ME, IIT Guwahati
1
Dreams and Dreamers
For suppose thatevery tool we had
could perform its task, either at our
bidding or itself perceiving the need,
and if like… self-moved they enter the
shuttles in a loom
assembly of gods;
could fly to and fro and a plucker play a
lyre of their own accord, then master
craftsmen would have no need of servants
nor masters of slaves.
Aristotle (384 - 322 BC) Aristotle (384 - 322 BC)
The Politics The Politics
© Shyamanta M Hazarika, ME, IIT Guwahati
Dreams and Dreamers
Leonardo Da Vinci sketched designs
for a humanoid robot in the form of a
medieval knight around the year 1495.
No one knows whether Leonardo Da Vinci or
his contemporaries tried to build his
design. Leonardo’s knight was supposed to be
sit up, move
able to its arms and head,
and open its jaw.
© Shyamanta M Hazarika, ME, IIT Guwahati
2
Dreams and Dreamers
In 1651, Thomas Hobbes published his book Leviathan about
the social contract and the ideal state.
Hobbes seems to say
In the introduction that it might be
possible to build artificial animal.
George Dyson refers to
For this reason, science historian
Hobbes as the patriarch of artificial intelligence.
© Shyamanta M Hazarika, ME, IIT Guwahati
Dreams and Dreamers
For seeing life is but a motion of
limbs, the beginning whereof is in some
why may we not
principal part within,
say that all automata (engines that
move themselves by springs and wheels as doth
a watch) have an artificial life? For
what is the heart, but a spring; and the nerves,
but so many strings; and the joints, but so many
Thomas Hobbes (1588-1679) wheels, giving motion to the whole body.
Leviathan Thomas Hobbes (1588-1679)
Leviathan
© Shyamanta M Hazarika, ME, IIT Guwahati
3
Dreams and Dreamers
constructed actual automata
Several people that
moved in startlingly lifelike ways.
The most sophisticated of these was the mechanical
duck which could quack, flap its wings, paddle,
drink water, and eat and “digest" grain.
© Shyamanta M Hazarika, ME, IIT Guwahati
Dreams and Dreamers
In 1738, French inventor and engineer
Jacques de Vaucanson
(1709-1782) displayed the duck his
masterpiece.
Frederic Vidoni's ANAS, inspired by Vaucanson's duck.
© Shyamanta M Hazarika, ME, IIT Guwahati
4
Dreams and Dreamers
1801 - French silk weaver and
inventor Joseph Marie
Jacquard invents an
automated loom that is
controlled by punch cards.
Within a decade it is being mass-
produced, in great use across
Europe.
© Shyamanta M Hazarika, ME, IIT Guwahati
Robots in Fiction
Frank Baum in 1900 invented
one of the literary world’s most
beloved robots in The
Wonderful Wizard of Oz.
It is Tin Woodsman, a
mechanical man in search
of a heart!
© Shyamanta M Hazarika, ME, IIT Guwahati
5
Robots in Fiction
Some 17 years after Frank Baum, JosephCapek wrote
the short story Opilec describing automatons.
Joseph Capek’s brother Karel
Capek introduced the
term robot in the play R.U.R (Rossum’s Universal
Robots).
© Shyamanta M Hazarika, ME, IIT Guwahati
Rossum’s Universal Robots
RUR centers around a mad-
scientist who tries to usurp the
powers of God for man has
acquired the technology
and intelligence to create
life.
© Shyamanta M Hazarika, ME, IIT Guwahati
6
Elmer and Elsie
In 1948, Dr. W. Grey
Walter was interested if robots
could model brain
functions.
He built two small robots; called
tortoises and named them
Elmer and Elsie; a marvel of
the day.
© Shyamanta M Hazarika, ME, IIT Guwahati
Elmer and Elsie
The most revolutionary
thing about Elmer and Elsie is that
they did not have any brains
or pre-programming.
Had basic analog circuits,
vacuum tubes, a touch and light
sensor, could recharge their
own batteries.
© Shyamanta M Hazarika, ME, IIT Guwahati
7
What is Artificial Intelligence?
Artificial Intelligence is the ability of machines to seemingly
think for themselves.Artificial Intelligence is
demonstrated when a task performed by a human
and thought of as requiring the ability to learn,
reason and solve problems can be done by a
machine.
© Shyamanta M Hazarika, ME, IIT Guwahati
What is Artificial Intelligence?
This is itself a deep philosophical question, and
attempts to systematically answer it fall within
the foundations of Artificial Intelligence as a
rich topic for analysis and debate.
Nonetheless, a provisional answer can be given:
© Shyamanta M Hazarika, ME, IIT Guwahati
8
What is Artificial Intelligence?
AI is the field devoted to building artifacts capable
of displaying, in controlled, well-understood environments,
and over sustained periods of time, behaviors that we
consider to be intelligent, or more generally,
behaviors that we take to be at the heart of what it
is to have a mind.
© Shyamanta M Hazarika, ME, IIT Guwahati
What is Artificial Intelligence?
This gives rise to further questions.
1. What exactly constitutes intelligent behavior?
2. What it is to have a mind?
3. How humans actually manage to behave intelligently?
© Shyamanta M Hazarika, ME, IIT Guwahati
9
What is Artificial Intelligence?
How humans actually manage to behave intelligently?
question is empirical. It is predominantly for
This
psychology and cognitive science to answer.
insight
However, this question is pertinent! This is because any
into human thought might help build machines
that work similarly.
© Shyamanta M Hazarika, ME, IIT Guwahati
What is Artificial Intelligence?
What it is to have a mind?
This question on what is the mark of the mental, is
philosophical. Thrust on Artificial Intelligence has
lent significant urgency to it. Careful philosophical
contemplation of this question has influenced the
course of Artificial Intelligence itself.
© Shyamanta M Hazarika, ME, IIT Guwahati
10
What is Artificial Intelligence?
What exactly constitutes intelligent behavior?
specifying precisely what is to
The first question of
count as intelligent behavior, has traditionally been met
by proposing particular behavioral tests whose
successful passing would signify the presence of
intelligence.
© Shyamanta M Hazarika, ME, IIT Guwahati
Dimensions of Artificial Intelligence
Thinking
Thinking Humanly Thinking Rationally
Rationally
Humanly
Acting Humanly Acting Rationally
Acting
© Shyamanta M Hazarika, ME, IIT Guwahati
11
Dimensions of Artificial Intelligence
1. Think like Human
– model human cognition
2. Think Rationally
– formalize the inference process.
3. Act Rationally
– doing the right thing
4. Act like Human
– exhibit human behaviour
© Shyamanta M Hazarika, ME, IIT Guwahati
Dimensions of Artificial Intelligence
1. Think like Human
– model human cognition
1960s "cognitive revolution": information-processing
psychology
Requires scientific theories of internal activities
of the brain
Example: Newell & Simon’s GPS (General Problem Solver)
© Shyamanta M Hazarika, ME, IIT Guwahati
12
Thinking Humanly
The General Problem Solver, developed in 1957 by
Alan Newell and Herbert Simon, embodied a grandiose
vision: a single computer program that could
solve any problem, given a suitable description of the problem.
caused quite a stir when it
The General Problem Solver
was introduced, and some people in AI felt it would sweep in
a grand new era of intelligent machines.
© Shyamanta M Hazarika, ME, IIT Guwahati
Dimensions of Artificial Intelligence
2. Think Rationally
– formalize the inference process.
Several Greek schools developed various forms of
logic: notation and rules of derivation for
thoughts; may or may not have proceeded to the idea of
mechanization
Direct line through mathematics and philosophy to modern AI
© Shyamanta M Hazarika, ME, IIT Guwahati
13
Thinking Rationally
Aristotle considered rationality to be an essential
characteristic of the human mind. Perhaps the
deepest contribution of Aristotle to artificial intelligence
was the idea of formalism ….. notion that
remains at the heart of the contemporary computational
theory of the mind and what is strong AI. The very idea of an intelligent
machine was often tantamount to a machine that can
perform logical inference.
© Shyamanta M Hazarika, ME, IIT Guwahati
Thinking Rationally
Aristotle was one of the firsts to attempt to codify
"thinking". His syllogisms provided patterns of
argument structure that always gave correct
conclusions, given correct premises.
Example:
All computers use energy.
Using energy always generates heat.
Therefore, All computers generate heat.
© Shyamanta M Hazarika, ME, IIT Guwahati
14
Thinking Rationally
Main obstacles to the logistic approach in building
programs to create intelligence
1. Not all intelligent behavior is mediated by logical
deliberation.
2. What is the purpose of thinking? What thoughts should I
have?
3. Informal knowledge is not precise; Difficult to model
uncertainty.
4. Theory and practice, hard to put together.
© Shyamanta M Hazarika, ME, IIT Guwahati
Dimensions of Artificial Intelligence
3. Act Rationally
– doing the right thing
Rational behavior: doing the right thing - one which is
expected to maximize goal achievement, given the available
information
Does not necessarily involve thinking
– e.g., bionic reflex.
© Shyamanta M Hazarika, ME, IIT Guwahati
15
Acting Rationally
It is more general than the logical approach.
Amenable to scientific development than approaches
based on human behavior or human thought
perfect rationality in complex environments is
Achieving
not possible because the computational demands are too
high.
© Shyamanta M Hazarika, ME, IIT Guwahati
Dimensions of Artificial Intelligence
4. Act like Human
– exhibit human behaviour
machines that perform functions
Creating
that require intelligence when the same
tasks are performed by people.
© Shyamanta M Hazarika, ME, IIT Guwahati
16
Acting Humanly
A number of capabilities need to be incorporated
Natural language processing
Knowledge Representation
Automated Reasoning
Machine Learning
Computer Vision
Robotics
© Shyamanta M Hazarika, ME, IIT Guwahati
Machines with True Intelligence
In 1950 Alan Turing published a
landmark paper in which he speculated
about the possibility of creating
machines with true intelligence. He
noted that "intelligence" is difficult to define and
devised his famous Turing Test.
The Turing Test was the first serious
proposal in the philosophy of
artificial intelligence.
A. M. Turing (1950) Computing Machinery and Intelligence. Mind 49: 433-460.
© Shyamanta M Hazarika, ME, IIT Guwahati
17
Can machines think?
Alan Turing, laying
the ground for what later became known
as artificial intelligence, starts his landmark paper
Computing Machinery and Intelligence with the words:
I propose to consider the question, ‘Can machines think?’
.
A. M. Turing (1950) Computing Machinery and Intelligence. Mind 49: 433-460.
© Shyamanta M Hazarika, ME, IIT Guwahati
Imitation Game
Turing test or Imitation Game as it was called in the paper, was
put forth as a simple test that could be used to prove that machines
could think.
Human
Human Interrogator
AI System
© Shyamanta M Hazarika, ME, IIT Guwahati
18
Turing and Heuristic Search
code-breakers were pitted against
When Turing and fellow
the Nazi code machine Enigma. Turing broke the previously
inviolable indicator system of Enigma, and helped design
electromechanical machines to read thousands of German radio
intercepts.
employed heuristic searching, which is now a
These devices
central idea of AI. They found the right answer -often enough and fast
enough to be read in real time. Without such machines, German U-boats would
have decimated the North Atlantic convoys providing a lifeline to Britain.
© Shyamanta M Hazarika, ME, IIT Guwahati
Early Days of AI
In late 1955, Allen Newell and
Herbert Simon developed The
Logic Theorist, considered by
many to be the first AI program.
The program, representing
each problem as a tree
model, would attempt to solve it by
selecting the branch that would most
result in the correct
likely
conclusion.
© Shyamanta M Hazarika, ME, IIT Guwahati
19
Early Days of AI
In 1956 John McCarthy organized
a conference to draw the talent and
expertise in machine intelligence for a
month of brainstorming. He invited them
to Vermont for The Dartmouth
Summer Research Project on
Artificial Intelligence. From that
point on, the field would be known as
Artificial intelligence. The Dartmouth
conference served lay the
to
groundwork for the future of AI
research.
© Shyamanta M Hazarika, ME, IIT Guwahati
Term ‘Artificial Intelligence’
We propose that a 2 month, 10 man study ofartificial intelligence be
carried out during the summer of 1956 at Dartmouth College in
Hanover, New Hampshire. The study is to proceed on the basis of the
conjecture that every aspect of learning or any other feature of
intelligence can in principle be so precisely described that a
machine can be made to simulate it.
J. McCarthy, M. L. Minsky, N. Rochester, and C.E. Shannon. August 31, 1955.
John McCarthy is one of the "founding fathers" of artificial intelligence,
together with Marvin Minsky, Allen Newell, and Herbert A. Simon.
© Shyamanta M Hazarika, ME, IIT Guwahati
20
Weak vs. Strong AI
Weak AI aims at building machines that act
intelligently, without taking a position on whether or not the
machines actually are intelligent.
Strong AI is the field devoted to building persons!
Charniak and McDermott (1985) concede in their classic introduction
to AI that we are very far from achieving strong AI.
© Shyamanta M Hazarika, ME, IIT Guwahati
Weak vs. Strong AI
Theultimate goal of AI, which we are very far from
achieving, is to build a person, or, more humbly, an animal.
Charniak & McDermott 1985
Charniak and McDermott don’t
say that the ultimate goal
is to build something that appears to be a person. Their
brand of AI is so-called strong AI, an ambitious form of the field aptly
summed up by Haugeland.
© Shyamanta M Hazarika, ME, IIT Guwahati
21
Weak vs. Strong AI
The fundamental goal [of AI research] is not merely to
mimic intelligence or produce some clever fake. Not at all. AI
wants only the genuine article: machines with minds, in the
full and literal sense. This is not science fiction, but real science,
based on a theoretical conception as deep as it is
daring: namely, we are, at root, computers
ourselves.
Haugeland 1985
© Shyamanta M Hazarika, ME, IIT Guwahati
Weak vs. Strong AI
The goal of work in artificial intelligence is to build machines
that perform tasks normally requiring human
intelligence.
Nilsson, Nils J. (1971)
Problem-Solving Methods in Artificial Intelligence
© Shyamanta M Hazarika, ME, IIT Guwahati
22
What is involved?
Interaction with the real world i.e., perceive, understand, and
act. For example: a. speech recognition and b. image
understanding.
Reasoning and planning involving a. modeling the external world
b. planning and decision making and c. deal with unexpected
problems and uncertainties.
Learning and Adaptation through Internal models being always
updated such as a baby learning to categorize and recognize
animals
© Shyamanta M Hazarika, ME, IIT Guwahati
What is involved?
Philosophy Logic, Methods of reasoning, Mind as physical
system, Foundations of Learning / Language
Rationality.
Mathematics Formal representation and Proof Theory
Algorithms: computation – Decidability /
Tractability
Statistics/ Modeling uncertainty, Learning from data
Probability
Economics Utility, Decision Theory
© Shyamanta M Hazarika, ME, IIT Guwahati
23
What is involved?
Neuroscience Neurons as information processing units.
Psychology/ How do people behave, perceive, process
Cognitive Science cognitive information, represent knowledge
Computer Engg. Building fast computers
Control theory Design systems that maximize an objective
function over time
Linguistics Knowledge Representation, Grammars
© Shyamanta M Hazarika, ME, IIT Guwahati
History of AI
1943: early beginnings
McCulloch & Pitts: Boolean circuit model of brain
1950s: initial promise
Turing's "Computing Machinery and Intelligence“
Samuel's checkers program
First program of Machine Learning
Early AI programs
Newell & Simon's Logic Theorist
© Shyamanta M Hazarika, ME, IIT Guwahati
24
History of AI
1955-65: Great enthusiasm!
Dartmouth meeting
"Artificial Intelligence“ name adopted
Newell and Simon: GPS, general problem solver
Gelertner: Geometry Theorem Prover
McCarthy: invention of LISP
1966—73: Reality dawns
Realization that many AI problems are intractable
Limitations of existing neural network methods
identified
© Shyamanta M Hazarika, ME, IIT Guwahati
History of AI
1969—85: Adding domain knowledge
Development of knowledge-based systems
Success of rule-based expert systems,
E.g., DENDRAL, MYCIN
But were brittle and did not scale well in practice
1986 onwards : Rise of machine learning
Neural networks return to popularity
Major advances in machine learning
Algorithms and Applications
© Shyamanta M Hazarika, ME, IIT Guwahati
25
History of AI
Beginning 1990: Role of uncertainty
Bayesian networks
knowledge representation framework
Beginning 1995: AI as Science
Integration of learning, reasoning, knowledge
representation
AI methods used
vision, language, data mining, etc
© Shyamanta M Hazarika, ME, IIT Guwahati
History of AI
© Shyamanta M Hazarika, ME, IIT Guwahati
26
Annotated Bibliography
Artificial Intelligence: A
Philosophical Introduction
Jack Copeland
Backwell, 1993
The book reviews the progress made in
AI since the inception of the field in
1956. Copeland goes on to analyze what
those working in AI must achieve before
they can claim to have built a thinking
machine!
© Shyamanta M Hazarika, ME, IIT Guwahati
Annotated Bibliography
The Quest for Artificial
Intelligence
Nils J. Nilsson
Cambridge, 2009
End-of-chapter notes with citations to
important materials will be of great
use to AI scholars and researchers.
This book traces the history of a field
that has captivated the imaginations
of scientists, philosophers, and
writers for centuries.
© Shyamanta M Hazarika, ME, IIT Guwahati
27
Annotated Bibliography
Machine Learning:
The New AI
Ethem Alpaydin
MIT Press, 2016
A concise overview of machine
learning — computer programs that
learn from data — which underlies
applications that include
recommendation systems, face
recognition, and driverless cars.
© Shyamanta M Hazarika, ME, IIT Guwahati
28