Professional Documents
Culture Documents
Artificial Intelligence: Chandra Prakash Assistant Professor LPU
Artificial Intelligence: Chandra Prakash Assistant Professor LPU
References
2
If machines
can think, How?
If machines
can not think, Why?
Artificial + Intelligent
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
Examples: Speech recognition, Smell, Face, Object, Intuition, Inferencing, Learning new skills, Decision making, Abstract thinking
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
modeling the external world, given input solving new problems, planning, and making decisions ability to deal with unexpected problems, uncertainties
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
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
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
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
Cont
12
where, an intelligent agent is a system that interact with its environment and takes actions that maximize its chances of success.
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)
Humanoid robot created by Honda. Standing at 130 centi-meters (4 feet 3 inches) and weighing 54 kilograms
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.
TOPIO, a human robot played table tennis at Tokyo International Robot Exhibition (IREX) 2009
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 Intelligent characters/agents
Banks
Customer Service
The Web
Digital Cameras
Computer Games
Foundations of AI
Computer Science & Engineering
Mathematics Philosophy
21
Economics
AI
Psychology Cognitive Science
Biology
Linguistics
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
knowledge only and the shall offers the implementation of both symbolic processing simultaneously.
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
Natural Languages
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
Possible Approaches in AI
29
Like humans
Well
Rational agents
Think Act
GPS
Eliza
Heuristic systems
Like humans
GPS
Well
Rational agents
Think
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.
Think well
31
Like humans
Well
Rational agents
Think
GPS
Act
Eliza
Heuristic systems
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.
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.
Like humans
Well
Rational agents
Think
GPS
Act
Eliza
Heuristic systems
Behaviorist approach.
similarity to what human results are. Exemplified by the Turing Test (Alan Turing, 1950).
Human Interrogator
AI System
Turing Test(cont..)
35
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
computer behaves intelligently - it tests only whether the computer behaves like a human being. human behaviour and intelligent behaviour are not same
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.
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"
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.
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?
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
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)
$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)
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.
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
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
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
Three programs are presented : Series increase Their complexity Use of generalization Clarity of their knowledge Extensability of their approach
X o
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.
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
1 2 3 4 5 6 7 8 9
Chandra Prakash , LPU
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 .......
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.
2. Human finds the row-scan approach easier, while computer finds the number-counting approach more efficient.
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.
Chandra Prakash , LPU
3. The best node is then the one with the highest rating.
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.
Chandra Prakash , LPU
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
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?
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
C leaves L
C takes M
Chandra Prakash , LPU
Conclusion
67
uncertainty management of data and knowledge are the common areas covered under AI.
LISP and PROLOG are the used for programming AI
problems.