Unit 1
Unit 1
Unit 1
Introduction to Artificial Intelligence
1
Contents
• Introduction
• History
• Intelligent Systems
• Foundations of AI
• Tic- Tac-Toe Game Playing
• Development of AI languages
• Current Trends in AI
2
Introduction
3
• Research associated with artificial intelligence is
highly technical and specialized. The core problems of
artificial intelligence include programming computers
for certain traits such as:
• Knowledge
• Reasoning
• Problem solving
• Perception
• Learning
• Planning
• Ability to manipulate and move objects
4
History of AI
5
Maturation of Artificial Intelligence (1943-1952)
Year 1943: The first work which is now recognized as AI was done by Warren
McCulloch and Walter pits in 1943. They proposed a model of artificial neurons.
Year 1949: Donald Hebb demonstrated an updating rule for modifying the
connection strength between neurons. His rule is now called Hebbian learning.
Year 1950: The Alan Turing who was an English mathematician and pioneered
Machine learning in 1950. Alan Turing publishes "Computing Machinery and
Intelligence" in which he proposed a test. The test can check the machine's ability
to exhibit intelligent behavior equivalent to human intelligence, called a Turing
test.
The birth of Artificial Intelligence (1952-1956)
Year 1955: An Allen Newell and Herbert A. Simon created the "first artificial
intelligence program"Which was named as "Logic Theorist". This program had
proved 38 of 52 Mathematics theorems, and find new and more elegant proofs for
some theorems.
Year 1956: The word "Artificial Intelligence" first adopted by American Computer
scientist John McCarthy at the Dartmouth Conference. For the first time, AI coined
as an academic field.
At that time high-level computer languages such as FORTRAN, LISP, or COBOL
were invented. And the enthusiasm for AI was very high at that time.
6
The golden years-Early enthusiasm (1956-1974)
i. Year 1966: The researchers emphasized developing algorithms which can
solve mathematical problems. Joseph Weizenbaum created the first chatbot in
1966, which was named as ELIZA.
ii. Year 1972: The first intelligent humanoid robot was built in Japan which was
named as WABOT-1.
The first AI winter (1974-1980)
iii. The duration between years 1974 to 1980 was the first AI winter duration. AI
winter refers to the time period where computer scientist dealt with a severe
shortage of funding from government for AI researches.
iv. During AI winters, an interest of publicity on artificial intelligence was
decreased.
A boom of AI (1980-1987)
v. Year 1980: After AI winter duration, AI came back with "Expert System".
Expert systems were programmed that emulate the decision-making ability of
a human expert.
vi. In the Year 1980, the first national conference of the American Association of
Artificial Intelligence was held at Stanford University.
7
The second AI winter (1987-1993)
The duration between the years 1987 to 1993 was the second AI Winter duration.
Again Investors and government stopped in funding for AI research as due to high
cost but not efficient result. The expert system such as XCON was very cost
effective.
9
Advantages of Artificial Intelligence
High Accuracy with less errors: AI machines or systems are prone to less
errors and high accuracy as it takes decisions as per pre-experience or
information.
High-Speed: AI systems can be of very high-speed and fast-decision
making, because of that AI systems can beat a chess champion in the Chess
game.
High reliability: AI machines are highly reliable and can perform the
same action multiple times with high accuracy.
Useful for risky areas: AI machines can be helpful in situations such as
defusing a bomb, exploring the ocean floor, where to employ a human can
be risky.
Digital Assistant: AI can be very useful to provide digital assistant to the
users such as AI technology is currently used by various E-commerce
websites to show the products as per customer requirement.
Useful as a public utility: AI can be very useful for public utilities such as
a self-driving car which can make our journey safer and hassle-free, facial
recognition for security purpose, Natural language processing to
communicate with the human in human-language, etc.
10
Disadvantages of Artificial Intelligence
High Cost: The hardware and software requirement of AI is very
costly as it requires lots of maintenance to meet current world
requirements.
Can't think out of the box: Even we are making smarter machines
with AI, but still they cannot work out of the box, as the robot will
only do that work for which they are trained, or programmed.
No feelings and emotions: AI machines can be an outstanding
performer, but still it does not have the feeling so it cannot make any
kind of emotional attachment with human, and may sometime be
harmful for users if the proper care is not taken.
Increase dependency on machines: With the increment of
technology, people are getting more dependent on devices and hence
they are losing their mental capabilities.
No Original Creativity: As humans are so creative and can imagine
some new ideas but still AI machines cannot beat this power of
human intelligence and cannot be creative and imaginative.
11
Intelligent Systems
Categories of IS
Industrial Applications
Household Applications
Research Applications of AI
IS Research Centres
12
Industrial
• Transportation
• Agriculture
• Telecommunications
• Manufacturing
• Military
• Medicine
• Architecture
• Oil & Gas
• Chemistry
• Aviation
13
Household IS
• Smart Houses
• Caring Robots
• Robots in the Home
• Chat bots
14
Research IS
• Mathematics
• Politics & Foreign Relations
• Decision Support Systems
• Banking & Finance
• Medicine
• Astronomy & Space Exploration
• Archaeology
• Knowledge Management
15
IS Research Centers
• NASA
• IRIS – Institute of Robotics and intelligent Systems
• CISR – Centre of intelligent Systems Research
(Washington)
• Halmstad University – Centre of Applied Intelligent
Systems Research
• University of Alster – Intelligent Systems Research
Centre
• SRI – Stanford Research Institute
16
Foundations of AI
17
Applications of AI
Finance : Banks use artificial intelligence systems to organize
operations, invest in stocks, and manage properties. In August 2001,
robots beat humans in a simulated financial trading competition.
18
Robotics: Robots are physical agents that perform tasks by
manipulating the physical world . Robots are manufactured as
hardware. The control of robot is AI (in the form of software agent)
that reads data from the sensors decides what to do next and then
directs the effectors to act in the physical world.
19
Tic Tac Toe Game Playing
Two players
Human and Computer.
The objective is to write a computer program in such a way that computer wins
most of the time.
Three approaches are presented to play this game which increase in Complexity
Use of generalization Clarity of their knowledge Extensibility of their approach
These approaches will move towards being representations of what we will call AI
techniques.
It is two players ,X and O, game who take turns marking the spaces in a 3×3 grid.
The player who succeeds in placing three respective marks in a horizontal, vertical,
or diagonal row wins the game.
20
Approach 1
• Data Structure Consider a Board having nine elements vector. Each
element will contain
• 0 for blank
• 1 indicating X player move
• 2 indicating O player move
• Computer may play as X or O player.
• First player who so ever is always plays X.
MT is a vector of 39 elements, each element of which is a nine element
vector representing board position. Total of 39 (19683) elements in MT
21
• To make a move, do the following:
• View the vector (board) as a ternary number and
convert it to its corresponding decimal number. Use
the computed number as an index into the
• MT and access the vector stored there.
• The selected vector represents the way the board will
look after the move. Set board equal to that vector.
22
Approach 2
• Data Structure Board: A nine-element vector
representing the board:B[1..9]
• Following conventions are used
• 2-indicates blank
• 3-X
• 5-0
• Turn: An integer
• 1-First move
• 9-Last move
23
Procedure – PossWin
PossWin (P) 🡪 Returns
Rule
If PossWin (P) = 0 {P can not win} then find whether opponent can win. If so,
then block it.
Strategy used by PosWin
PosWin checks one at a time, for each rows /columns and diagonals as follows.
24
Algorithm
Assumptions
– The first player always uses symbol X.
– There are in all 8 moves in the worst case.
– Computer is represented by C and Human is represented by H.
– Convention used in algorithm on next slide
• If C plays first (Computer plays X, Human plays O) - Odd moves
• If H plays first (Human plays X, Computer plays O) - Even moves
• For the sake of clarity, we use C and H.
Algo - Computer plays first – C plays odd moves
• Move 1: Go (5)
• Move 2: H plays
• Move 3: If B[9] is blank, then Go(9) else Go(3) {make 2}
• Move 4: H plays
• Move 5: {By now computer has played 2 chances}
– If PossWin(C) then {won} Go(PossWin(C))
– else {block H} if PossWin(H) then Go(PossWin(H)) else if B[7] is blank then Go(7) else
Go(3)
• Move 6: H plays
• Moves 7 & 9 :
– If PossWin(C) then {won} Go(PossWin(C))
– else {block H} if PossWin(H) then Go(PossWin(H)) else Go(Anywhere)
25
• Move 8: H plays
Algo - Human plays first – C plays even moves
• Move 1: H plays
• Move 2: If B[5] is blank, then Go(5) else Go(1)
• Move 3: H plays
• Move 4: {By now H has played 2 chances}
– If PossWin(H) then {block H} Go (PossWin(H))
– else Go (Make_2)
• Move 5: H plays
• Move 6: {By now both have played 2 chances}
– If PossWin(C) then {won} Go(PossWin(C))
– else {block H} if PossWin(H) then Go(PossWin(H)) else
Go(Make_2)
• Moves 7 & 9 : H plays
• Move 8: {By now computer has played 3 chances}
– If PossWin(C) then {won} Go(PossWin(C))
– else {block H} if PossWin(H) then Go(PossWin(H)) else
Go(Anywhere) 26
Complete Algorithm – Odd moves or even moves for C playing first or
second
• Move 1: go (5)
• Move 2: If B[5] is blank, then Go(5) else Go(1)
• Move 3: If B[9] is blank, then Go(9) else Go(3) {make 2}
• Move 4: {By now human (playing X) has played 2 chances} If
PossWin(X) then {block H} Go (PossWin(X)) else Go (Make_2)
• Move 5: {By now computer has played 2 chances} If PossWin(X) then
{won} Go(PossWin(X)) else {block H} if PossWin(O) then
Go(PossWin(O)) else if B[7] is blank then Go(7) else Go(3)
• Move 6: {By now both have played 2 chances} If PossWin(O) then {won}
Go(PossWin(O)) else {block H} if PossWin(X) then Go(PossWin(X)) else
Go(Make_2)
• Moves 7 & 9 : {By now human (playing O) has played 3 chances} If
PossWin(X) then {won} Go(PossWin(X)) else {block H} if PossWin(O)
then Go(PossWin(O)) else Go(Anywhere)
• Move 8: {By now computer has played 3 chances} If PossWin(O) then
{won} Go(PossWin(O)) else {block H} if PossWin(X) then
Go(PossWin(X)) else Go(Anywhere)
27
Comments
28
Approach 3
Same as approach 2 except for one change in the representation of the board.
– Board is considered to be a magic square of size 3 X 3 with 9 blocks
numbered by numbers indicated by magic square.
This representation makes process of checking for a possible win more
simple.
29
Strategy for possible win for one player
• Maintain the list of each player’s blocks in which he has played.
– Consider each pair of blocks that player owns.
– Compute difference D between 15 and the sum of the two blocks.
– If D < 0 or D > 9 then
• these two blocks are not collinear and so can be ignored
• otherwise if the block representing difference is blank (i.e., not in either list) then a
move in that block will produce a win.
Working Example of algorithm
30
Working – contd..
• Strategy is same as in approach 2
– First check if computer can win.
• If not then check if opponent can win.
• If so, then block it and proceed further.
• Steps involved in the play are:
– First chance, H plays in block numbered as 8
– Next C plays in block numbered as 5
– H plays in block numbered 3
– Now there is a turn of computer.
• Strategy by computer: Since H has played two turns and C has played only one
turn, C checks if H can win or not.
– Compute sum of blocks played by H
• S = 8 + 3 = 11
• Compute D = 15 – 11 = 4
• Block 4 is a winning block for H.
• So block this block and play in block numbered 4.
• The list of C gets updated with block number 4 as follows:
H 8 3 C 5 4
31
• Assume that H plays in block numbered 6.
• Now it’s a turn of C.
– C checks, if C can win as follows:
• Compute sum of blocks played by C
• S=5+4=9
• Compute D = 15 – 9 = 6
• Block 6 is not free, so C can not win at this turn.
– Now check if H can win.
• Compute sum of new pairs (8, 6) and (3, 6) from the list of H
• S = 8 + 6 = 14
• Compute D = 15 – 14 = 1
• Block 1 is not used by either player, so C plays in block numbered as 1
• The updated lists at 6th move looks as follows:
– First Player H
836
Second Player C
54 1
• Assume that now H plays in 2.
• Using same strategy, C checks its pair (5, 1) and (4, 1) and finds bock numbered as 9 {15-
6 = 9}.
• Block 9 is free, so C plays in 9 and win the game.
32
Comments
• This program will require more time than two
others as
– it has to search a tree representing all possible
move sequences before making each move.
• This approach is extensible to handle
– 3-dimensional tic-tac-toe.
– games more complicated than tic-tac-toe.
33
Current trends in AI
1. AI Customer Support and Assistance
• Each business should strive to offer an enjoyable customer experience.
• Satisfying existing customers helps businesses market new products and services.
• AI enables firms to improve their customer service by offering better response time and
interaction.
• Artificial system assistance includes sales tasks and customer services. It will be more
streamlined this year
2. Data Access Enabling Ubiquity
• Data is making Artificial Intelligence more versatile.
• Data access enabling ubiquity is one of the recent Artificial Intelligence innovations this
year.
• Reliable and accurate information helps businesses shift to AI-powered automated
decision making.
• It has cut operational cost, streamlined processes, and improved the research capabilities
of many organizations.
3. Predictive Analytics
• Artificial Intelligence, NLP, and machine learning to process data have a positive effect
on augmented analytics.
• More companies will start using predictive analytics this year. 34
4. Enhanced Customization
• Companies need to understand delivery services and customer preferences to have
an edge over their competitors.
• All-pervasive location and real-time data have conformed customer services in
online marketplaces and urban mobility.