0% found this document useful (0 votes)
63 views12 pages

Unit 1

The document provides an introduction to artificial intelligence, including a brief history. It discusses foundational concepts such as intelligent systems and the two main approaches of bottom-up and top-down. It also summarizes some important developments in AI such as the development of LISP in 1958 and neural networks in the 1980s. The document categorizes intelligent systems into those that think like humans, act like humans, think rationally, and act rationally.

Uploaded by

Aishwarya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views12 pages

Unit 1

The document provides an introduction to artificial intelligence, including a brief history. It discusses foundational concepts such as intelligent systems and the two main approaches of bottom-up and top-down. It also summarizes some important developments in AI such as the development of LISP in 1958 and neural networks in the 1980s. The document categorizes intelligent systems into those that think like humans, act like humans, think rationally, and act rationally.

Uploaded by

Aishwarya
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

UNIT-I

Introduction to artificial intelligence: Introduction, history, intelligent systems, foundations of AI,


Applications, tic-tac-tie game playing, development of AI languages, current trends in AI.

Introduction
The foundation of Artificial Intelligence (AI) was laid with the development of Boolean theory and
principles by a mathematician named Boole and others researchers.
Since the invention of the first computer in 1943. AI has been of interest to the researchers as they have
always aimed to make machines more intelligent than humans a tried to simulate intelligent behavior.
Over the last six decades. AI has grown substantially starting from simple programs to intelligent
programs such as programs for playing games, expert systems, intelligent robots, agents, etc.
AI researchers generally use one of the two basic approaches, namely bottom-up and top-down for
creating intelligent machines, In bottom-up approach, the belief is to achieve artificial intelligence by
building electronic replicas of the human brain which is a complex network of neurons, In the top-down
approach, the attempt is to mimic the behavior of brain with computer programs.
AI currently comprises of a huge variety of subfields ranging from general-purpose areas such
perception, logical reasoning, to specific tasks such as game playing, theorem proving, diagnosing
diseases, etc. Scientists of other fields use tools of artificial intelligence to systematize and automate the
intellectual tasks of their fields.
This field is truly a multi-disciplinary field and is based on the work done in different disciplines such as
logic, cognition, linguistics, philosophy, psychology, anthropology, computing etc.

Brief History
The history of Al had cycles of success and failures but kept on introducing new creative approaches
and systematically refining the best ones. Psychologists strengthened the idea that humans and other
living creatures can be considered to be information processing machines. Mathematicians provided
tools to manipulate certain or uncertain logical statements of certainty as well as probabilistic
statements.
 John McCarthy organized a conference on machine intelligence in 1956 since then Artificial
Intelligence was into existence.
 In 1957 the first program called general problem solver (GPS) was developed and tested by
Newel and Simon.
The GPS was capable of solving to some extent the problems requiring common sense.
 McCarthy introduced LISt Processing language (LISP) in1958.
LISP was adopted as the language of choice by most AI developers. Marvin Minsky of MIT
demonstrated that computer programs could solve spatial and logic problems when confined to a
specific domain.
 STUDENT program is developed in 1960 to solve algebra problems.
 Fuzzy sets were developed by L.Zadeh to deal with uncertain data.
 The system named SHRDLU was developed by Terry Winograd at the MIT, Al Laboratory, as a
part of the micro worlds project, which consisted of research and programming in small worlds.
SHRDLU was a program that carried out a simple dialogue (via teletype) with a user in English,
about a small world of objects (the BLOCK world) and this program was written in MACLISP.
 Frame theory was one of the new methods developed by Minsky during 1970 in the development
of Al for storing structured knowledge to be used by AI programs.
 Expert systems were in great demand because of their efficiency. Companies such as Digital
Electronics were using XCON, an expert system designed to program the large XAX computers.

By 1985, over a hundred companies offered machine vision systems in the US. Researchers always
dreamt of evolving machine similar to human evolution. Human brain works a billion times faster as
compared to computer, but a computer still helps in doing things at a faster pace as compared to humans.
Work on simulating human brain started from 1986 onwards. Neural networks were used to simulate
brain functioning. Neural network provided a model for massive parallel computation.
Intelligent Systems
AI is a combination of computer science, physiology, and philosophy. AI is a broad topic, consisting of
different fields, from machine vision to expert systems. John. McCarthy was one of the founders of AI
field who stated that AI is the science and engineering of making intelligent machines especially
intelligent computer programs Further, he defines intelligence as the computational part of the ability to
achieve goals in the world.
Various authors have defined AI differently as given below.
 AI is the study of mental faculties through the use computational models (Charniak and
McDermott. 1985)
 The art of creating machines that perform functions which require intelligence when performed
by people (Kurzweil, 1990)
 AI is a field of study that seeks to explain and emulate intelligent behavior in terms of
computational processes (Schalkoff, 1990)
 AI is the study of how to make computers do things at which, at the moment, people are better
(Rich and Knight, 1991).
 AI is the study of the computations that make it possible to perceive, reason, and act
(Winston,1992)
 Al is the branch of computer science that is concerned with the automation of intelligent
behavior (Luger and Stubblefield, 1993).

Understanding of Al: It requires an understanding of related terms such as intelligence, knowledge, and
reasoning. Cognition. Learning. And a number of other computer-related terms.
There are two views of AI goals.
 The first view is that AI is about duplicating what the (human) brain DOES (Cognitive Science)
 The second view is that AI is about duplicating what the (human) brain SHOULD do, that is,
doing things logically or rationally.
The earliest best method to gauge the intelligence of a system was the Turing test that was proposed by
Alan Turing in 1950. It was designed to provide a satisfactory operational definition of intelligence.
Alan Turing defined intelligent behavior as the ability to achieve human-level performance in all
cognitive tasks, sufficient to fool an interrogator.
A system is said to have passed Turing test if a human questioner is unable to determine from repeated
questions of any kind, whether he or she is talking to another person or to a machine/system. The very
first so-called intelligent system named ELIZA passed the Turing test which was written by Joseph
Weizenbaum during the period from 1964 to 1966.

ELIZA:
Eliza was a program that conversed with user in English. Another feature of Eliza was its ability to pick
up speech patterns from user's question: and provide responses using those patterns. The following
passage contains dialogue between Eliza and a teenage girl. The system initiates the conversation
marked as > and user' responses are marked as *.
Passage of Eliza Conversation
> Hello, I am Eliza.
* Can you help me?
> Don't you believe that I can help you?
* Yes
> I see.
* I feel depressed.
> How long have you been feeling depressed?
* Since last month.
> That is quite interesting.
* What is interesting in this?
> Have you asked anyone else?
* No
> Are you saying no just to be negative?
* No I did not ask anyone
>Tel1 me more.

The main characteristic of Eliza:


Simulation of intelligence: Eliza programs are not intelligent at all in real sense. They do not understand
the meaning of utterance. Instead these programs simulate intelligent behavior by recognizing key words
and phrases.
Quality of Response: It is limited by the sophistication of the ways in which they can process the input
text at a syntactic level. For example, the number of templates available is a serious limitation.
Coherence: The earlier version of the system imposed no structure on the conversation. Each statement
was based entirely on the current input and no context information was used.
Semantics: Such systems have no semantic representation of the content of either the user's input or the
reply. That is why we say that it does not have intelligence of understanding of what we are saying.

Categorization of Intelligent Systems


 System that thinks like human.
 System that acts like human.
 System the things rationally.
 System that acts rationally.
System that thinks like human requires cognitive modelling approaches. Most of the time, it is a black
box where we are not clear about our thought process.
System that acts like human requires that the overall behavior of the system should be human like which
could be achieved by observation. Turing test is an example.
System which thinks rationally relies on logic rather than human to measure correctness. For thinking
rationally or logically, logical formulae and theories are used for synthesizing outcomes
For example, given John is a human and all humans are mortal then one can conclude logically hat John
is mortal. It should be noted that not all intelligent behaviors are mediated by logical deliberation.
System that acts rationally means doing the right thing. Even if the method is illogical, the observed
behavior must be rational.
Some of the capabilities are given as follows:
 Reason and draw meaningful conclusions
 Plan sequences of actions to complete a goal
 Solve problems
 Think abstractly
 Comprehend ideas and help computers to communicate in Natural Languages
 Store knowledge provided before or during interrogation
 Learn new ideas from environment and new circumstances
 Offer advice based on rules and situations
 Learn new concepts and tasks that require high levels of intelligence

Components of Al Program:
 Knowledge based: AI program should be learning in nature and update its knowledge
accordingly. It consists of rules and facts.
 Control strategy: It determines which rule to be applied.
 Inference mechanism: It requires search through knowledge base and derived new knowledge
using the existing knowledge with the help of inference rules.

Foundations of AI:
Commonly used AI techniques and theories are rule-based, fuzzy logic, neural networks, decision
theory, statistics, probability theory, genetic algorithms, etc. Since AI is interdisciplinary in nature,
foundations of Al are in various fields such as:
 Mathematics
 Neuroscience
 Control theory
 Linguistics

Mathematics: AI systems use formal logical methods and Boolean logic (Boole, 1847), analysis of
limits to what can be computed, probability theory, uncertainty, fuzzy logic, etc.
Neuroscience: This science of medicine helps in studying the functioning of brains. Recent studies use
accurate sensors to correlate brain activity to human thought. By monitoring individual neurons,
monkeys can now control a computer mouse using thought alone.
Control theory: Machines can modify their behavior in response to the environment. Steam engine
governor, thermostat and water-flow regulator are few examples of control theory.

Linguistics: Speech demonstrates so much of human intelligence. Analysis of human language reveals
thought taking place in ways not understood in other settings.

Sub-areas of AI:
AI is an interdisciplinary area having numerous diverse subfields. Each one of these field is an area of
research in AI itself. Some of these are listed below
 Knowledge representation models
 Theorem proving mechanisms
 Game playing methodologies
 Common sense reasoning dealing with uncertainty and decision making
 Planning and scheduling
 Natural language understanding
 Computer vision
 Robotics
 Data mining
 Neural networks
 Web agents etc..

Applications:
AI finds applications in almost all areas of real-life applications.
 Business: Financial strategies
 Engineering: Check design, offer suggestions to create new product, expert systems
 Manufacturing: Assembly, inspection and maintenance.
 Medicine: Monitoring, diagnosing and prescribing
 Education
 Fraud detection
 Object identification
 Information retrieval
Tic-Tac-Toe Game Playing:
It is a two-player game with one player marking O and other marking X, at their turn in the spaces in a 3
x3 grid.
The player who succeeds in placing three respective marks in any horizontal, vertical or diagonal row
wins the game.
Here we are considering one human player and the other player to be a computer program. The objective
to play this game using computer is to write a program which never loses.
It is assumed that X is the first player, which might either be human or computer.

Approach 1
Let us represent 3 x 3 board as nine elements vector. Each clement in a vector can contain any of the
following three digits:
• 0 - blank position
• 1- X player move
• 2- O player move
This program makes use of a move table as shown below that consists of vector of 3 9 (19683) elements.

Index Current Board Position New Board Position


0 000000000 000010000
1 000000001 020000001
2 000000002 000100002
3 000000010 002000010
------
------ -----

Table 1: Move Table


The entries of the table are designed manually in advance so that the computer should never lose.
Initially the board is empty and is represented by nine zeros. All possible board positions are stored in
Current Board Position column along with its corresponding next best possible board position in New
Board Position column.
The computer program has to simply do the table lookup.
Algorithm
• View the vector (board) as a ternary number
• Get an index by converting this vector to its corresponding decimal number.
• Get the vector from New Board Position stored at the index. The vector thus selected represents the
way the board will look after the move that should be made.
• So set board position equal to that vector.
Disadvantages:
• It requires lot of memory space to store the move table.
• To specify entries in move table manually, lot of work is required.
• Creating move table is highly error prone.
This program is not intelligent at all as it does not meet any of AI requirements.

Approach 2
The board B[1…..9] is represented by a nine-element vector.
Representation of X, O and Blank:
• 2- representing blank position
• 3-indicating X player move
• 5- indicating O player move

We will use the following three sub procedures.


 Go(n)- Using this function computer can make a move in square n.
 Make_2- This function helps the computer to make valid 2 moves.
 PossWin(P) - If player P can win in the next move then it returns the index (from l to 9) of the
square that constitutes a winning move, otherwise it returns 0.

If Poss Win (P) = 0, then P cannot win. Find whether opponent can win. If so block it. This can
be achieved as follows:
 if (3*3*2 = 18) then X player can win as there is one blank square in row, column, or diagonal.
 if (5*5*2 = 50), then O player can win.

Let us represent computer by C and human by H.


The player who is playing first will be called X player.
If C is the first player (playing X), then odd moves are to be chosen otherwise, if C is playing as second
player (playing O) then even moves are chosen
(C plays X, H plays O) (H plays X, C plays O)
1 move: Go (5)/Go(1) 2 move: If B[5] is blank, then Go(5) else
Go(1)
3 move : If B[9] is blank, then Go(9) else 4 move: {By now human (playing X) has
{make 2}Go(3) played 2 moves}
If PossWin(X) then {block X}
Go(PossWin(X))
else {make 2} Go(Make_2)
5 move : {By now both have played 2 6 move : {By now computer has played 2
moves} moves}
If PossWin(X) then {X wins} Go(Poss if PossWin(O) then {0 wins}
Win(X)) Go(PossWin(O))
else if PossWin(O) {block O} then else if PossWin(X) {block X} then
Go(PossWin(O)) Go(PossWin(X)) else Go(Make_2)
else if B[7] is blank then Go(7) else Go(3)
7 & 9 moves : {By now human (playing O) 8 move : (By now computer has played 3
has played 3 chances}: chances}
If PossWin(X) then {X wins} If PossWin(O) then {0 wins}
Go(PossWin(X)) else {block O} Go(PossWin(O)) else {block 0} if Poss
if PossWin(O) then Go(PossWin(O)) else Win(X) then Go(PassWin(X)) else
Go(Anywhere) Go(Anywhere)
Table 2: Rules for Nine Moves
This version of the program is memory efficient and easier to understand
Disadvantage:
• Not as efficient as first one with respect to time. Several conditions arc checked before each move.
Approach 3
In this approach, we choose board position to be a magic square of order 3; such that the numbers in all
rows, all columns, and both diagonals sum to the same constant.
The magic square of order 3 is 15 as shown in Table 3 below, Sum of each row, column, and both
diagonals is 15.
8 1 6
3 5 7
4 9 2
Table 3: Magic Square of order 3
In this approach, we maintain a list of the blocks played by each player where, each block is identified
by its number.
The following strategy for possible win for a player is used.
 Each pair of blocks a player owns is considered.
 Difference D between 15 and the sum of the two blocks is computed.
 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 player can move in
that block.
Assume that human is the first player
• Turn 1: Suppose H plays in the eighth block.
• Turn 2: C plays in fifth block (fixed move, see from Table 1.2).
• Turn 3: H plays in first block.
• Turn 4: C checks if H can win or not.
 Compute sum of blocks played by H
 S = 8+1 = 9
 Compute D=15-9=6
 The sixth block is a winning block for H and not there on either list. So, C blocks it and
plays in sixth block. The sixth block is recorded in the list of computer.
• Turn 5: H plays in fourth block.
• Turn 6: C checks if C can win as follows:
 Compute sum of blocks played by C
 S = 5+6=11
 Compute D = 15 – 11 = 4; Discard this block as it already exists in X list
 Now C checks whether H can win.
 Compute sum of pair of square from list of H which have not been used earlier
 S= 8+4=12
 Compute D = 15- 12 = 3
 Block 3 is free, so C plays in this block. The third block is recorded in the list of
computer.
• Turn 7: If H plays in second or ninth block, then computer wins. Let us assume that H plays in second
block.
• Turn 8: C checks if it can win as follows;
 Compute sum of blocks played by C which has not been used earlier
 S= 5+3 = 8;
 Compute D = 15 - 8 = 7
 Block 7 is free, so C plays in seventh block and wins the game.
• If H plays in seventh block at its Turn 7, then there is a draw.

The program will require much more time than other two as it must search a tree representing all
possible move sequences before making each move. But the advantage is that this approach could be
extended to handle three-dimensional tic-tac-toe. It could also be extended to handle games more
complicated than tic-tac-toe.
Development of AI languages
 AI languages traditionally stress on knowledge representation schemes; pattern matching,
flexible search, and programs as data.
 The typical examples of such languages are LISP, Pop-2, ML, and Prolog.
 LISP is a functional language based on lambda calculus and Prolog is a logic language based on
first-order predicate logic. Both languages are declarative languages where one is concerned
about 'what to compute', and not 'how to compute'.
 Pop-2(later extended to Popl1) is a stack-based language which is embedded in an AI
Programming Environment called Poplog. It permits the mixed use of logic and a functional
language like Prolog, LISP, and ML, and provides flexible implementation support.
 Other hybrid programming environments such as the KLONE family of languages support
modelling at the knowledge level.
 Environments such as KEE, ART and CLIPS provide a variety of knowledge representation
schemes which helps the AI programmer to integrate object-oriented representations with logic.
Current trends in AI
AI community has started looking towards soft computing methodologies which are complementary
rather than competitive. Components of soft computing include Neural
 Neural networks have been developed based on functioning of the human brain. These systems
have been developed in order to facilitate predicting features in advance based on the previous
details available.
 Genetic algorithms based on Darwin theory of evolution were developed mainly by emulating
the nature and behavior of biological chromosome. Genetic algorithms are favored for search
problems.
 Ant colony algorithm was developed to emulate the behavior of real ants and found suitable
applications in multi-agent system to solve difficult combinatorial optimization problems.
 Swarm intelligence (SI) is based on the collective behavior of decentralized, self-organized
systems, Social insects like ants, bees, wasps, and termites perform their simple tasks
independent of other members of the colony. However, they are able to solve complex
 Problems emerging in their daily lives by mutual cooperation. This emergent behavior of sell-
organization by a group of social insects is known as swarm intelligence.
 Expert system continues to remain an attractive field for its practical utility in all walk of real
life.
 Agents are capable of taking autonomous decisions while solving a problem. Multi-agent
systems are designed using several independent and interacting agents to solve the problems of
distributed nature.

You might also like