Artificial Intelligence
CHANDRA PRAKASH A S S I S TA N T P R O F E S S O R LPU
References
2
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
If human beings can think then why not machines?
If machines
can think, How?
If machines
can not think, Why?
Can they surpass human performance?
Chandra Prakash , LPU
And what does this say about the mind?
3
Artificial + Intelligent
Chandra Prakash , LPU
What is artificial intelligence?
5
Intelligence (Oxford dictionary ): Ability to Learn Understand and Think.
Chandra Prakash , LPU
Artificial + Intelligence
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
INTELLIGENCE
7
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
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 animals
ARTIFICIAL INTELLIGENCE
9
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
Other possible AI definitions
10
AI is a collection of hard problems which can be solved
by humans and other living things, but for which we dont 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
Cont
11
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
Cont
12
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
Problems In AI
13
Easy Problems in AI
Its 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
Its 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
ASIMO (2000) at the Expo 2005
14
Humanoid robot created by Honda. Standing at 130 centi-meters (4 feet 3 inches) and weighing 54 kilograms
Chandra Prakash , LPU
Kismet now resides at the MIT Museum inCambridge, Massachusetts
15
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
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
Intelligent Systems in Your Everyday Life
Post Office
automatic address recognition and sorting of mail automatic check readers, signature verification systems automated loan application classification automatic voice recognition Identifying your age, gender, location, from your Web surfing Automated fraud detection Automated face detection and focusing
Banks
Customer Service
The Web
Digital Cameras
Computer Games
Intelligent characters/agents
Foundations of AI
Computer Science & Engineering
Mathematics Philosophy
21
Economics
AI
Psychology Cognitive Science
Biology
Linguistics
Chandra Prakash , LPU
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
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 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
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 algorithms
Chandra Prakash , LPU
25
Programming languages for AI
26
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. purpose of uncertainty management), then procedural languages would be preferred.
However, if the program requires much arithmetic computation (say for the
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
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 Many more
Task Domains of AI
28
Mundane Tasks: Perception
Vision Speech Understanding Generation Translation
Natural Languages
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
Possible Approaches in AI
29
Like humans
Well
Rational agents AI tends to work mostly in this area
Think Act
GPS
Eliza
Heuristic systems
Chandra Prakash , LPU
Think like humans
30
Like humans
GPS
Well
Rational agents
Think
Cognitive science approach Focus not just on behavior and I/O
also look at reasoning process. Computational model should reflect how results were obtained.
GPS (General Problem Solver): Goal not just to
Act
Eliza
Heuristic systems
but
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
Think well
31
Like humans
Well
Rational agents
Think
GPS
Act
Eliza
Heuristic 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.
Chandra Prakash , LPU
Act well
32
Like humans
Well
Rational agents
Think
GPS
Act
For a given set of inputs, generate an
Eliza
Heuristic systems
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
Act like humans
33
Like humans
Well
Rational agents
Think
GPS
Act
Eliza
Heuristic 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).
Chandra Prakash , LPU
Acting Humanly: The Turing Test
34
Alan Turing (1912-1954) Computing Machinery and Intelligence (1950)
Imitation Game Human
Human Interrogator
AI System
Chandra Prakash , LPU
Turing Test(cont..)
35
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
Turing Test
36
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
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
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
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 questioner average 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
43
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
Chinese Room argument
44
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
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
46
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
The Loebner Contest
47
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
What can AI systems do
48
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
What cant AI systems do yet?
49
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
Chandra Prakash , LPU
AI Technique
50
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
Tic Tac Toe
51
Three programs are presented : Series increase Their complexity Use of generalization Clarity of their knowledge Extensability of their approach
Chandra Prakash , LPU
Introductory Problem: Tic-Tac-Toe 52
X o
Chandra Prakash , LPU
Introductory Problem: Tic-Tac-Toe
53
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 9element vector. Algorithm: 1. View the vector as a ternary number. Convert it to a decimal number.
2.
3.
Use the computed number as an index into Move-Table and access the vector stored there.
Set the new board to that vector.
Chandra Prakash , LPU
Introductory Problem: Tic-Tac-Toe
54
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
Introductory Problem: Tic-Tac-Toe
55
1 2 3 4 5 6 7 8 9
Chandra Prakash , LPU
Introductory Problem: Tic-Tac-Toe
56
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)) Chandra Prakash , LPU .......
Introductory Problem: Tic-Tac-Toe 57
Comments: 1. Not efficient in time, as it has to check several conditions before making each move.
2. Easier to understand the programs strategy.
3. Any bug in programmer tic-tac-toe playing skill will
show up in programs play. 3. Hard to generalize.
Chandra Prakash , LPU
Introductory Problem: Tic-Tac-Toe 58
8 3 4 1 5 9 6 7 2
15 - (8 + 5)
Chandra Prakash , LPU
New appraoch
59
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
Introductory Problem: Tic-Tac-Toe
60
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.
Chandra Prakash , LPU
Introductory Problem: Question Answering
61
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
Introductory Problem: Question Answering
62
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
Introductory Problem: Question Answering
63
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: instance: tense: agent: object: Thing1: Finding Past Mary Thing 1 instance: Coat colour: Red
Chandra Prakash , LPU
Introductory Problem: Question Answering
64
Program 3: Background world knowledge:
C finds M C leaves L C buys M
C leaves L
C takes M
Chandra Prakash , LPU
Conclusion
65
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