You are on page 1of 61

INTRODUCTION TO AI

ICS 381: PRINCIPLES OF ARTIFICIAL INTELLIGENCE

Dr. El-Sayed M. El-Alfy


Associate Professor & ISRG Coordinator Information and Computer Science Dept. King Fahd University of Petroleum and Minerals Dhahran 31261, Saudi Arabia alfy@kfupm.edu.sa

Resources
Textbook: Artificial Intelligence: A Modern Approach, 3/E. By Stuart Russell & Peter Norvig, Prentice Hall, 2010. http://aima.cs.berkeley.edu/

Other recommended books: Artificial Intelligence: Structures and Strategies for Complex Problem Solving, 6/E. By George F. Luger, Addison-Wesley Publisher, 2009. http://wps.aw.com/aw_luger_ai_6/ Artificial Intelligence: A Guide to Intelligent Systems, 2/E. By Michael Negnevitsky, Addison-Wesley Publisher, 2005. AI Algorithms, Data Structures and Idioms in Prolog, Lisp and Java. By G.F. Luger & W.A. Stubblefield, Pearson Education, 2009. http://wps.aw.com/wps/media/objects/5771/5909832/PDF/Luger_0136070477_1.pdf Prolog Programming for Artificial Intelligence, 4/E. Ivan Bratko, Addison-Wesley Publisher, 2012. An Introduction to Prolog Programming, Lecture Notes, King's College London and University of Amsterdam, 1999-2007. http://staff.science.uva.nl/~ulle/teaching/prolog/prolog.pdf
ICS381 by Dr. El-Alf@KFUPM 2012 2

Objectives
1 2 3
Familiarize yourself with the concept and foundations of AI

Learn a bit of history of AI

Understand what AI can and cant do

ICS381 by Dr. El-Alf@KFUPM 2012

Outline
What is AI? motivation and discussions Why AI and More Examples of Applications Foundations of AI History of AI Wrap-up

ICS381 by Dr. El-Alf@KFUPM 2012

WHAT IS AI?

ICS381 by Dr. El-Alf@KFUPM 2012

WATCH VIDEOS & HAVE FUN!

ICS381 by Dr. El-Alf@KFUPM 2012

Towel-folding robot

J. Maitin-Shepard, M. Cusumano-Towner, J. Lei and P. Abbeel, Cloth Grasp Point Detection based on Multiple-View Geometric Cues with Application to Robotic Towel Folding, ICRA 2010
ICS381 by Dr. El-Alf@KFUPM 2012 7

RoboCup 2012

Video
ICS381 by Dr. El-Alf@KFUPM 2012 8

New Honda Robot ASIMO 2012

Video
ICS381 by Dr. El-Alf@KFUPM 2012 9

Robot Riding Bicycle

Video
ICS381 by Dr. El-Alf@KFUPM 2012 10

Two chatbots talking to each other

Video
ICS381 by Dr. El-Alf@KFUPM 2012 11

Google self-driving cars

NY Times article

Some Others
Automatic speech recognition: Google voice search Visual search: Google Goggles for Android Translation: Google translator Face detection/recognition: many consumer cameras (Apple iPhoto) Vehicle safety systems: Mobileye OCR: Optical Character Recognition

ICS381 by Dr. El-Alf@KFUPM 2012

13

Discussion
What is intelligence? What makes you think? Can it be learned? Or born with? Can it evolve? Can it be measured?, e.g. IQ Test How does it relate to: thinking, consciousness or awareness? Can machines be intelligent?
Intelligence: an operational meaning: http://www.nobeliefs.com/intelligence.htm
Nine Types of Intelligence: http://skyview.vansd.org/lschmidt/Projects/The%20Nine%20Types%20of%20Intelligence.htm
ICS381 by Dr. El-Alf@KFUPM 2012 14

Characteristics of being intelligent


Can range from simple nave to very complex levels
15

Ability to perceive world knowledge Ability to learn and acquire knowledge Ability to apply knowledge Ability to recognize and describe objects Ability to communicate with others Ability to argue and make decisions using incomplete/approximate knowledge Ability to deal with unfamiliar situations Ability to adapt to new yet related situations Ability to solve problems to achieve a goal Ability to memorize things Ability to predict something in the future Ability to show emotions Ability to set goals and act autonomously Ability to create and inventive Ability to think abstractly (intelligence requires thinking)
ICS381 by Dr. El-Alf@KFUPM 2012

Intelligence: Dictionary Definition


(1) the ability to learn or understand or to deal with new or trying situations : reason; also: the skilled use of reason - Merriam Webster (2): the ability to apply knowledge to manipulate one's environment or to think abstractly as measured by objective criteria (as tests) - Merriam Webster ability to acquire and apply knowledge and skills Oxford

ICS381 by Dr. El-Alf@KFUPM 2012

16

Intelligence: Another Definition


According to John McCarthy (the father of AI)
Intelligence is the computational part of the ability to achieve goals in the world Varying kinds and degrees of intelligence occur in people

[1927-2011]

http://www.formal.stanford.edu/jmc/whatisai
ICS381 by Dr. El-Alf@KFUPM 2012 17

Pyramid of Intelligence
Wisdom

+ vision + experience

Knowledge

Information

+ context
Data
Ref: Notes of ICS381, 081
ICS381 by Dr. El-Alf@KFUPM 2012 18

Computer vs. Brains


How complicated is our brain?
A neuron, or nerve cell, is the basic information processing unit Estimated to be on the order of 1012 neurons and 1014 synapses (connections between neurons) in a human brain Cycle time: 1 millisecond Just how complicated is the brain? By Alasdair Coles [video]

How complex can we make computers?


106 or more transistors per CPU Supercomputer: hundreds of CPUs, 109 bits of RAM Cycle time: of order 10-11 milliseconds

Conclusion
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!
Ref: Notes of ICS381, 081
ICS381 by Dr. El-Alf@KFUPM 2012 19

ICS381 by Dr. El-Alf@KFUPM 2012

20

Definitions of AI
Still no crisp complete agreed-upon definition. Why?
Involves creativity (definition contradicts creativity) broad multidisciplinary area (many perspectives, many applications, many technologies, etc.)

According to John McCarthy (the father of AI)


the science and engineering of making intelligent machines, especially intelligent computer programs
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.
http://www.formal.stanford.edu/jmc/whatisai
ICS381 by Dr. El-Alf@KFUPM 2012 21

AI: Another definition


a collection of hard problems, which can be solved by humans and other living things, but for which we dont have good algorithmic solutions, e.g., understanding spoken natural language, medical diagnosis, circuit design

ICS381 by Dr. El-Alf@KFUPM 2012

22

Definitions from the textbook [R&N]


Acting humanly AI Acting rationally Thinking rationally Thinking humanly

ICS381 by Dr. El-Alf@KFUPM 2012

23

Acting Humanly: Turing Test


Turing (1912-1954) "Computing machinery and intelligence (1950)
Imitation Game

Human
A

Human Interrogator
C
ICS381 by Dr. El-Alf@KFUPM 2012

AI System B
24

ICS381 by Dr. El-Alf@KFUPM 2012

25

Acting Humanly: Turing Test


What capabilities would a computer need to have to pass the Turing Test?
Natural language processing Knowledge representation Automated reasoning Machine learning

Turing predicted that by the year 2000, machines would be able to fool 30% of human judges for five minutes
ICS381 by Dr. El-Alf@KFUPM 2012 26

Turing Test: Criticism


Some potential problems with the Test
Some human behavior is not intelligent Some intelligent behavior may not be human Human observers may be easy to fool
A lot depends on expectations Anthropomorphic fallacy Chatbots, e.g., ELIZA

One may simulate intelligence without having true intelligence (more of a philosophical objection) [Chinese room argument]

Is passing the Turing test a good scientific goal?


Not a good way to solve practical problems Can create intelligent agents without trying to imitate humans
ICS381 by Dr. El-Alf@KFUPM 2012 27

ICS381 by Dr. El-Alf@KFUPM 2012

28

Thinking Humanly: Cognitive Modeling


Brain as an information processing machine How to understand cognition as a computational process?
Introspection: try to think about how we think Predict and test behavior of human subjects Image the brain, examine neurological data

Requires testable theories of the workings of the human mind: cognitive science & neuroscience

ICS381 by Dr. El-Alf@KFUPM 2012

29

Thinking Rationally: Laws of Thought


Aristotle was one of the first to attempt to formalize idealized or right way of thinking, i.e., provide precise notations and rules of derivations of thoughts mechanization Logic: patterns of argument that always yield correct conclusions when supplied with correct premises, e.g. Socrates is a man; all men are mortal; hence Socrates is mortal. Logicist approach to AI: describe problem in formal logical notation and apply general deduction procedures to solve it Problems with this approach Computational complexity of finding the solution Not always possible to describe real-world problems and knowledge in logical notation Not all intelligent behavior is mediated by logical deliberation
ICS381 by Dr. El-Alf@KFUPM 2012 30

Acting Rationally: Rational Agent


A rational agent is one that acts to achieve the best expected outcome/goal
Goals are application-dependent and are expressed in terms of the utility of outcomes Being rational means maximizing your expected utility In practice, utility optimization is subject to the agents computational constraints (bounded rationality or bounded optimality)

Only concerns the decisions/actions that are made, not the cognitive process behind them
ICS381 by Dr. El-Alf@KFUPM 2012 31

Acting Rationally: Rational Agent


Advantages of utility maximization formulation
Generality: goes beyond explicit reasoning, and even human cognition altogether Practicality: can be adapted to many real-world problems Amenable to good scientific and engineering methodology Avoids philosophy and psychology

Any disadvantages?
Does not necessarily involve thinking

ICS381 by Dr. El-Alf@KFUPM 2012

32

What other people are saying?


Patrick Winston: study of ideas which enable computers to do things which make people seem intelligent -- AI, 1992 Steven Tanimoto: Computational techniques for performing tasks that apparently require intelligence when performed by humans Elements of AI, 1995 David Parnas: AI is to artificial flowers as natural intelligence is to natural flowers George Luger: branch of computer science that is concerned with automation of intelligent behavior AI, 2008 Elaine Rich: study of how to make computers do things which, at the moment, people do better -- AI, 1991 Scott Fahlman: study of intelligence using the ideas and methods of computation
ICS381 by Dr. El-Alf@KFUPM 2012 33

Common Definition
AI is the science and engineering concerned with the theory and practice of developing systems that exhibit the characteristics we associate with

intelligence in human behavior: e.g.


perception, natural language processing, reasoning, planning and problem solving,

learning and adaptation, etc.

ICS381 by Dr. El-Alf@KFUPM 2012

34

Intelligent Entity

Ref: Notes of ICS381, 081


ICS381 by Dr. El-Alf@KFUPM 2012 35

WHY AI & MORE EXAMPLES OF APPLICATIONS

ICS381 by Dr. El-Alf@KFUPM 2012

36

Why AI?
Promise for handling many complex problems, saving lives and efficiently utilizing resources, e.g.
Solving information overload problems (e.g. intelligent search engines) Operating in risky and laborious environments (e.g. robots cleaning houses; assisting patients; working in nuclear plants, etc) Distributing scarce commercial knowledge (e.g. data-mining through massive databases, looking for patterns that would take a human years to spot) Enhancing training through use of simulation. Helping physicians to diagnose and treat patients Provide more natural and friendly interfaces to software users Stock market analysis, weather forecasting, oil exploration, etc. ICS381 by Dr. El-Alf@KFUPM 2012 37

Main Domains of AI

Knowledge representation (including formal logic) Search, especially heuristic search (puzzles, games) Planning Reasoning under uncertainty (including probabilistic reasoning) Perception (vision and speech) Learning Agents Robotics Natural language processing: generation, understanding and translation Expert systems: e.g. medical diagnosis, financial and scientific analysis, trouble shooting and fault finding, etc.

Ref: Notes of ICS381, 081


38

ICS381 by Dr. El-Alf@KFUPM 2012

Robotics
Mars rovers Autonomous vehicles/planes
DARPA Grand Challenge Google self-driving cars Autonomous helicopters

Robot soccer
RoboCup

Personal robotics
Humanoid robots Robotic pets Personal assistants?
ICS381 by Dr. El-Alf@KFUPM 2012 39

Honda Humanoids (Robots)

ICS381 by Dr. El-Alf@KFUPM 2012

40

Sony AIBO Robot

ICS381 by Dr. El-Alf@KFUPM 2012

41

Natural Language Processing (NLP)


Speech technologies
Automatic speech recognition Google voice search Text-to-speech synthesis Dialog systems

Machine translation
translate.google.com Comparison of several translation systems

ICS381 by Dr. El-Alf@KFUPM 2012

42

Information Agents & Expert Systems


Search engines Recommendation systems Spam filtering Automated helpdesks
automated online assistant providing customer service on a web page

Medical diagnosis systems Fraud detection Automated trading Intelligent tutors

ICS381 by Dr. El-Alf@KFUPM 2012

43

IBM Watson: Question Answering Machine

http://www.research.ibm.com/deepqa/ NY Times article Trivia demo YouTube video IBM Watson wins on Jeopardy (Feb. 2011) Watson (Wikipedia)
ICS381 by Dr. El-Alf@KFUPM 2012 44

Entertainment: Games and Puzzles

ICS381 by Dr. El-Alf@KFUPM 2012

45

FOUNDATIONS OF AI

ICS381 by Dr. El-Alf@KFUPM 2012

46

AI is Multidisciplinary
CS&E Economics Mathematics

Biology

AI

Cognitive Science

Philosophy

Linguistics Psychology

Many disciplines contribute to AI

ICS381 by Dr. El-Alf@KFUPM 2012

47

Foundations of AI
Philosophy Mathematics Economics Logic, methods of reasoning, mind as physical system, foundations of learning, language, rationality Formal representation and proof, algorithms, computation, (un)decidability, (in)tractability, probability Utility, decision theory

Biology, Neuroscience>> Physical substrate for mental activity

Psychology
Computer engineering Control theory Linguistics

Phenomena of perception and motor control, experimental techniques, adaptation


Building fast computers Design systems that maximize an objective function over time Knowledge representation, grammar
ICS381 by Dr. El-Alf@KFUPM 2012 48

BRIEF HISTORY OF AI
http://www.stottlerhenke.com/ai_general/history.htm
ICS381 by Dr. El-Alf@KFUPM 2012 49

Brief History of AI (1940s-1950s)


1943
1949 1950

McCulloch & Pitts neural model


Hebb learning: a simple algorithm that modifies connection strengths between neurons (which is still influential till today) Turing's "Computing Machinery and Intelligence Claude Shannon published a paper on chess playing showing large number of moves involved and need for heuristics von Neumann helps Minsky and Edmonds (2 grads at Princeton) to build the first neural network computer Early AI programs, including Samuel's checkers program, Newell & Simon's Logic Theorist, Gelernter's Geometry Engine Reinforcement learning; genetic algorithms; evolutionary computation First AI workshop at Dartmouth sponsored by IBM & birth of AI; Checker program

1951 1950s

1956

1958

McCarthy paper on Program with common sense; Lisp Programming


ICS381 by Dr. El-Alf@KFUPM 2012

50

Brief History of AI (1960s-1970s)


1960s 1962 Newell and Simon invented the General Problem Solver (GPS) New NN learning: Widrow adalines; Rosenblatt perceptrons

1965
1969

Robinson's complete algorithm for logical reasoning Lotfy Zadeh introduced Fuzzy sets
Logic applications included the Shakey robot (first generalpurpose mobile robot able to reason about its own actions)

1966-73 AI discovers computational complexity Neural network research almost disappears 1969-79 Early development of knowledge-based systems Early 1970s Shift from general purpose, knowledge-sparse, weak methods to domain-specific, knowledge-intensive techniques (ES)

Mid 1970s
1972

First large expert system: (Mycin: rule-based expert system for diagnosis of blood infections)
Birth of Prolog by Colmerauer with Philippe Roussel; Natural Lang. understanding by Winograd ICS381 by Dr. El-Alf@KFUPM 2012
51

Brief History of AI (1980s-Present)


1980 First meeting of the American Association for Artificial Intelligence held in Stanford, California

Mid 80s Rumelhart, Hinton, and McClelland studied neural net models of memory; back-propagation learning algorithm
19801986 AI becomes an industry Neural networks return to popularity machine learning Generalization of single-layer network: Hopfield network, backpropagation Knowledge engineering: use of Fuzzy logic improves computational power, improves cognitive modeling, allows to represent multiple experts AI becomes a science Emergence of intelligent agents IBM Deep Blue defeater chess world champion Kasparov IBM Watson wins on Jeopardy ICS381 by Dr. El-Alf@KFUPM 2012
52

19871995 1997 2011

WRAP-UP

ICS381 by Dr. El-Alf@KFUPM 2012

53

Summary
Define intelligence and its characteristics Define artificial intelligence and identify its foundations Identify domains and applications for AI Learn a bit of history of AI

ICS381 by Dr. El-Alf@KFUPM 2012

54

Reading Assignment
Read Chapter 1 of the textbook by Russell & Norvig

ICS381 by Dr. El-Alf@KFUPM 2012

55

QUESTIONS & DISCUSSIONS

ICS381 by Dr. El-Alf@KFUPM 2012

56

WATCH VIDEOS

ICS381 by Dr. El-Alf@KFUPM 2012

57

AI

Click the image to watch the video online


ICS381 by Dr. El-Alf@KFUPM 2012 58

John McCarthy (1927-2011): AI

Click the image to watch the video online


ICS381 by Dr. El-Alf@KFUPM 2012 59

The Challenge and Promise of AI

Click the image to watch the video online


ICS381 by Dr. El-Alf@KFUPM 2012 60

THANKS!

ICS381 by Dr. El-Alf@KFUPM 2012

61

You might also like