13897_1.ai introduction(lecture 1-5)
TRANSCRIPT
CHANDRA PRAKASH
ASSISTANT PROFESSOR
LPU
Artificial Intelligence
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.
Chandra Prakash , LPU
2
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?
Chandra Prakash , LPU 3
Artificial + Intelligent
Chandra Prakash , LPU
4
What is artificial intelligence?
Intelligence (Oxford dictionary ):
Ability to • Learn• Understand and• Think.
Chandra Prakash , LPU
5
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
Artificial + Intelligence
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, Face, Object, Intuition, Inferencing, Learning new skills, Decision making, Abstract thinking
Chandra Prakash , LPU
7
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 animals
What is involved in INTELLIGENCE
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.
Chandra Prakash , LPU
9
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)– Acts or thinks rationally (logically, correctly)
Chandra Prakash , LPU
10
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
Chandra Prakash , LPU
11
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.
Chandra Prakash , LPU
12
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)
Chandra Prakash , LPU
13
ASIMO (2000) at the Expo 2005
Chandra Prakash , LPU
14
Humanoid robot created by Honda. Standing at 130 centi-meters (4 feet 3 inches) and weighing 54 kilograms
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.
Chandra Prakash , LPU
15
TOPIO, a human robot played table tennis at Tokyo International Robot Exhibition (IREX) 2009
Stanley Robot in Stanford Racing Team
Robot holding the Bulb
Factory Automation with industrial robots
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
Intelligent Systems in Your Everyday Life
Foundations of AI
Chandra Prakash , LPU
21ComputerScience &
Engineering
AI
Mathematics
CognitiveScience
Philosophy
Psychology Linguistics
BiologyEconomics
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
Disciplines related to AI
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
Chandra Prakash , LPU 23
• 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 solvingGSP (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
Chandra Prakash , LPU 24
• 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
algorithmsChandra Prakash , LPU 25
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.
Chandra Prakash , LPU
26
Speech recognition : converts spoken words to textFace Recognition : a computer application for
automatically identifying or verifying a person from a digital image or a video
Finger print scanningOptical character recognition : electronic translation of
printed text into machine-encoded textHandwriting recognitionMany more……
Applications of AI
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
Chandra Prakash , LPU
28
Possible Approaches in AI
Chandra Prakash , LPU
29
Think
Act
Like humans Well
GPS
Eliza
Rationalagents
Heuristicsystems
AI tends to work mostly in this area
Think like humans
Cognitive science approach Focus not just on behavior and I/O
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.
Chandra Prakash , LPU
30 Think
Act
Like humans Well
GPS
Eliza
Rationalagents
Heuristicsystems
Think well
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.
Chandra Prakash , LPU
31Think
Act
Like humans Well
GPS
Eliza
Rationalagents
Heuristicsystems
Act well
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.
Chandra Prakash , LPU
32Think
Act
Like humans Well
GPS
Eliza
Rationalagents
Heuristicsystems
Act like humans
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).
Chandra Prakash , LPU
33Think
Act
Like humans Well
GPS
Eliza
Rationalagents
Heuristicsystems
Acting Humanly: The Turing Test
Alan Turing (1912-1954)
“Computing Machinery and Intelligence”
(1950)
Chandra Prakash , LPU
34
Human Interrogator
Human
AI System
Imitation Game
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.
Chandra Prakash , LPU
35
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.
Chandra Prakash , LPU
36
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
SimplicityBreadth 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
Weaknesses of the test
Human intelligence vs intelligence in generalThe 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
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.
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.
Naivete of interrogators
the test's results can easily be dominated not only by the computer's intelligence
Skill of the questioneraverage interrogator would not have more
than 70 per cent chance of making the right identification after five minutes of questioning".
"average interrogator"
Chinese Room argument
Devised by John Searle, It is an argument against the
possibility of true artificial intelligence.
The argument centers on a thought experiment in which someone who knows only English sits alone in a room following English instructions for manipulating strings of Chinese characters, such that to those outside the room it appears as if someone in the room understands Chinese.
Chandra Prakash , LPU
43
Chinese Room argument
If you can carry on an intelligent conversation using pieces of paper slid under a door, does this imply that someone or something on the other side understands what you are saying?
Chandra Prakash , LPU
44
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.
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)
Chandra Prakash , LPU
46
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…)
Chandra Prakash , LPU
47
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.
Chandra Prakash , LPU
48
What can’t AI systems do yet?
Understand natural language robustly (e.g., read and understand articles in a newspaper)
Surf the webInterpret an arbitrary visual sceneLearn a natural languageConstruct plans in dynamic real-time domainsRefocus attention in complex environmentsPerform life-long learning
Chandra Prakash , LPU
49
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
Chandra Prakash , LPU
50
Tic Tac Toe
Three programs are presented :Series increase Their complexity Use of generalization Clarity of their knowledge Extensability of their approach
Chandra Prakash , LPU
51
Introductory Problem: Tic-Tac-Toe
Chandra Prakash , LPU
52
X X o
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.
Chandra Prakash , LPU
53
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
Chandra Prakash , LPU
54
Introductory Problem: Tic-Tac-Toe
Chandra Prakash , LPU
55
1 2 3 4 5 6 7 8 9
Introductory Problem: Tic-Tac-ToeProgram 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)).......
Chandra Prakash , LPU
56
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.
Chandra Prakash , LPU
57
Introductory Problem: Tic-Tac-Toe
Chandra Prakash , LPU
58
8 3 4 1 5 9 6 7 215 (8 + 5)
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.
Chandra Prakash , LPU
59
Introductory Problem: Tic-Tac-Toe
Comments:
1. Checking for a possible win is quicker.
2. Human finds the row-scan approach easier, whilecomputer finds the number-counting approach more efficient.
Chandra Prakash , LPU
60
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?
Chandra Prakash , LPU
61
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
Chandra Prakash , LPU
62
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: Coattense: Past colour:Redagent: Maryobject: Thing 1
Chandra Prakash , LPU
63
Introductory Problem: Question Answering
Program 3:
Background world knowledge:
C finds M
C leaves L C buys M
C leaves L
C takes M
Chandra Prakash , LPU
64
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.
Chandra Prakash , LPU
65