ARTIFICIAL INTELLIGENCE
UNIT - I
Chapter-I: Problem Solving by Search-I: Introduction to AI, Intelligent Agents
Introduction:
AI is one of the newest fields in science and engineering. Early work in AI started after World War
II, and the name itself was coined in 1956.
AI currently has a huge variety of subfields, ranging from the general (learning and perception) to
the specific, such as playing chess, proving mathematical theorems, writing poetry, driving a car on
a crowded street, and diagnosing diseases.
AI can adopt itself to any intellectual task; it is truly a universal field.
WHAT IS AI?
The following figure categorized eight definitions of AI in four different groups. The definitions on
top are concerned with thought processes and reasoning, whereas the ones on the bottom address
behaviour.
The definitions on the left measure success in terms of faithfulness to human performance, whereas
the ones on the right measure against an ideal performance measure, called rationality.
A system is rational if it does the “right thing”, given what it knows.
Historically, all four approaches to AI have been followed by different people with different
methods.
A human-centered approach must be in part an empirical science, involving observations and
hypotheses about human behaviour. A rationalist approach involves a combination of mathematics
and engineering.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
Let us understand the four approaches in more detail.
Acting humanly: The Turing Test approach
The Turing Test, proposed by Alan Turing (1950), was designed to provide a satisfactory definition
of intelligence.
A computer passes the test if a human interrogator, after posing some written questions, cannot tell
whether the written responses come from a person or a computer.
Note that programming a computer to pass a test requires huge effort. The computer need to possess
the following capabilities:
o natural language processing to enable it to communicate successfully in English.
o knowledge representation to store what it knows or hears.
o automated reasoning to use the stored information to answer questions and to draw new
conclusions.
o machine learning to adapt to new circumstances and to detect and extrapolate patterns.
Turing’s test avoided direct physical interaction between the interrogator and the computer because
physical simulation of a person is unnecessary for intelligence.
However, the total Turing Test includes a video signal so that the interrogator can test the subject’s
perceptual abilities, as well as the opportunity for the interrogator to pass physical objects “through
the hatch”.
To pass the total Turing Test, the computer will need.
o computer vision to perceive objects, and
o robotics to manipulate objects and move about.
These six disciplines compose most of AI, and Turing deserves credit for designing a test that
remains relevant 60 years later.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
Thinking humanly: The cognitive modelling approach
To do comparison between human thinking and computer thinking, there must be some way of determining
how humans think.
There are three ways to do this:
o through introspection—trying to catch our own thoughts as they go by.
o through psychological experiments—observing a person in action; and
o through brain imaging—observing the brain in action.
Once a sufficiently precise theory of the mind is known, it becomes possible to express the theory as a
computer program.
If the program’s input–output behaviour matches corresponding human behaviour, that is evidence that some
of the program’s mechanisms could also be operating in humans.
The interdisciplinary field of cognitive science brings together computer models from AI and experimental
techniques from psychology to construct precise and testable theories of the human mind.
In the early days of AI there was often confusion between the approaches: an author would argue that an
algorithm performs well on a task and that it is therefore a good model of human performance, or vice versa.
Modern authors separate the two kinds of claims; this distinction has allowed both AI and cognitive science to
develop more rapidly. The two fields continue to fertilize each other, most notably in computer vision, which
incorporates neurophysiological evidence into computational models.
Thinking rationally: The “laws of thought” approach
The Greek philosopher Aristotle was one of the first to attempt to codify “right thinking”, which is also called
as the reasoning processes.
His syllogisms provided patterns for argument structures that always yielded correct conclusions when given
correct premises—for example, “Socrates is a man; all men are mortal; therefore, Socrates is mortal”. These
laws of thought were supposed to govern the operation of the mind; their study initiated the field called logic.
Logicians in the 19th century developed a precise notation for statements about all kinds of objects in the
world and the relations among them. By 1965, programs existed that could solve any solvable problem
described in logical notation. (Although if no solution exists, the program might loop forever).
There are two main obstacles to this approach:
o First, it is not easy to take informal knowledge and state it in the formal terms required by logical
notation, particularly when the knowledge is less than 100% certain.
o Second, there is a big difference between solving a problem “in principle” and solving it in practice.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
Even problems with just a few hundred facts can exhaust the computational resources of any computer unless
it has some guidance as to which reasoning steps to try first. Although both of these obstacles apply to any
attempt to build computational reasoning systems.
Acting rationally: The rational agent approach
An agent is just something that acts. Of course, all computer programs do something, but computer
agents are expected to do more: operate autonomously, perceive their environment, persist over a
prolonged time period, and adapt to change, and create and pursue goals.
A rational agent is one that acts so as to achieve the best outcome or, when there is uncertainty, the
best expected outcome.
In the “laws of thought” approach to AI, the emphasis was on correct inferences. Making correct
inferences is sometimes part of being a rational agent.
On the other hand, correct inference is not all of rationality; in some situations, there is no provably
correct thing to do, but something must still be done.
All the skills needed for the Turing Test also allow an agent to act rationally. Knowledge
representation and reasoning enable agents to reach good decisions.
The rational-agent approach has two advantages over the other approaches.
o First, it is more general than the “laws of thought” approach because correct inference is just
one of several possible mechanisms for achieving rationality.
o Second, it is more favourable to scientific development than other approaches based on
human behaviour or human thought.
The standard of rationality is mathematically well defined and completely general and can be
“unpacked” to generate agent designs that provably achieve it.
Human behaviour, on the other hand, is well adapted for one specific environment and is defined by,
well, the sum of all the things that humans do.
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE
Foundation of AI is nothing but, a brief history of the disciplines that contributed ideas, viewpoints, and
techniques to AI. The following are the disciplines that contributes for AI.
Philosophy:
Can formal rules be used to draw valid conclusions?
How does the mind arise from a physical brain?
Where does knowledge come from?
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
How does knowledge lead to action?
Aristotle (384–322 B.C.), was the first one to formulate a precise set of laws governing the rational
part of the mind. He developed an informal system of syllogisms for proper reasoning, which in
principle allowed to generate conclusions mechanically.
Ramon Lull (d. 1315) had the idea that useful reasoning could be carried out by a mechanical
artifact.
Thomas Hobbes (1588–1679) proposed that reasoning was like numerical computation that “we add
and subtract in our silent thoughts”.
Leonardo da Vinci (1452–1519) designed but did not build a mechanical calculator; recent
reconstructions have shown the design to be functional.
German scientist Wilhelm Schickard (1592–1635) constructed the first known calculating machine
around 1623.
The Pascaline was built by Blaise Pascal (1623–1662) in 1642 and it is the famous device to basic arithmetic
calculations.
Gottfried Wilhelm Leibniz (1646–1716) built a mechanical device to carry out operations on concepts rather
than numbers, but its scope was rather limited.
Ren´e Descartes (1596–1650) gave the first clear discussion of the distinction between mind and matter and
of the problems that arise.
Given a physical mind that manipulates knowledge, the next problem is to establish the source of
knowledge. Many scientists have contributed their efforts in an attempted to analyse the acquisition of
knowledge from experience.
The final element in the philosophical picture of the mind is the connection between knowledge and action.
This question is vital to AI because intelligence requires action as well as reasoning. Many people have
contributed their efforts in understanding how actions can be justified, and in building agents whose actions
are justifiable (or rational).
Mathematics
What are the formal rules to draw valid conclusions?
What can be computed?
How do we reason with uncertain information?
The leap to a formal science required a level of mathematical formalization in three fundamental
areas: logic, computation, and probability.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
The idea of formal logic initially given by the philosophers of ancient Greece, but its mathematical
development began with the work of George Boole (1815–1864), who worked out the details of
propositional, or Boolean, logic (Boole, 1847).
In 1879, Gottlob Frege (1848–1925) extended Boole’s logic to include objects and relations, creating
the first order logic that is used today.
Alfred Tarski (1902–1983) introduced a theory of reference that shows how to relate the objects in a
logic to objects in the real world.
In 1930, Kurt Godel (1906–1978) showed that there exists an effective procedure to prove any true
statement in the first-order logic of Frege.
Alan Turing (1912–1954) tried to characterize exactly which functions are computable—capable of
being computed.
Economics
How should we make decisions to maximize payoff?
How should we do this when others may not go along?
How should we do this when the payoff may be far in the future?
The science of economics got its start in 1776, when Scottish philosopher Adam Smith (1723–1790)
published An Inquiry into the Nature and Causes of the Wealth of Nations.
The mathematical treatment of “preferred outcomes” or utility was first formalized by L´eon Walras
(pronounced “Valrasse”) (1834-1910) and was improved by Frank Ramsey (1931)
The work of Richard Bellman (1957) formalized a class of sequential decision problems called
Markov decision processes.
Neuroscience
How do brains process information?
Neuroscience is the study of the nervous system, particularly the brain. Although the exact way in
which the brain enables thought is one of the great mysteries of science, the fact that it does enable
thought has been appreciated for thousands of years.
Paul Broca’s (1824–1880) study of aphasia (speech deficit) in brain-damaged patients in 1861
demonstrated the existence of localized areas of the brain responsible for specific cognitive
functions. He showed that speech production was localized to the portion of the left hemisphere now
called Broca’s area. By that time, it was known that the brain consisted of nerve cells, or neurons.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
In 1873, Camillo Golgi (1843–1926) developed a staining technique allowing the observation of
individual neurons in the brain. This technique was used by Santiago Ramon y Cajal (1852–1934) in
his pioneering studies of the brain’s neuronal structures.
Nicolas Rashevsky (1936, 1938) was the first to apply mathematical models to the study of the
nervous system.
Psychology
How do humans and animals think and act?
The German physicist Hermann von Helmholtz (1821–1894) and his student Wilhelm Wundt (1832–
1920) applied the scientific method to the study of human vision, and his Handbook of Physiological
Optics is even now described as “the single most important treatise on the physics and physiology of
human vision”. In 1879, Wundt opened the first laboratory of experimental psychology, at the
University of Leipzig.
Cognitive psychology, which views the brain as an information-processing device, was proposed by
William James (1842–1910).
Computer engineering
How can we build an efficient computer?
For artificial intelligence to succeed, there is a need of two things: intelligence and an artifact. The
computer has been the artifact of choice.
The first operational computer was the electromechanical Heath Robinson, built in 1940 by Alan
Turing’s team for a single purpose: de-ciphering German messages. In 1943, the same group
developed the Colossus, a powerful general-purpose machine based on vacuum tubes.
The first operational programmable computer was the Z-3, the invention of Konrad Zuse in
Germany in 1941.
The first electronic computer, the ABC, was assembled by John Atanasoff and his student Clifford
Berry between 1940 and 1942 at Iowa State University.
Since that time, each generation of computer hardware has brought an increase in speed and capacity
and a decrease in price.
Control theory and cybernetics
How can artifacts operate under their own control?
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
Ktesibios of Alexandria (c. 250 B.C.) built the first self-controlling machine: a water clock with a
regulator that maintained a constant flow rate. This invention changed the definition of what an
artifact could do. Previously, only living things could modify their behaviour in response to changes
in the environment.
Other examples of self-regulating feedback control systems include the steam engine governor,
created by James Watt (1736–1819), and the thermostat, invented by Cornelis Drebbel (1572–1633).
By motivated of the above inventions, the mathematical theory of stable feedback systems was
developed in the 19th century.
Linguistics
How does language relate to thought?
In 1957, B. F. Skinner published Verbal Behaviour. This was a comprehensive, detailed account of
the behaviourist approach to language learning.
Modern linguistics and AI were “born” and grew up together, intersecting in a hybrid field called
computational linguistics or natural language processing.
The problem of understanding language soon turned out to be considerably more complex than it
seemed.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
THE HISTORY OF ARTIFICIAL INTELLIGENCE
Artificial Intelligence is not a new word and not a new technology for researchers. This technology
is much older than you would imagine. Even there are the myths of Mechanical men in Ancient
Greek and Egyptian Myths.
Following are some milestones in the history of AI which defines the journey from the AI generation
to till date development.
Maturation of Artificial Intelligence (1943-1952)
o 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.
o Year 1949: Donald Hebb demonstrated an updating rule for modifying the connection strength
between neurons. His rule is now called Hebbian learning.
o 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 behaviour equivalent to human
intelligence, called a Turing test.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
The birth of Artificial Intelligence (1952-1956)
o 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.
o 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.
The golden years-Early enthusiasm (1956-1974)
o 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.
o Year 1972: The first intelligent humanoid robot was built in Japan which was named as WABOT-1.
The first AI winter (1974-1980)
o The duration between years 1974 to 1980 was the first AI winter duration. AI winter refers to the
time where computer scientist dealt with a severe shortage of funding from government for AI
research.
o During AI winters, an interest of publicity on artificial intelligence was decreased.
A boom of AI (1980-1987)
o 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.
o In the Year 1980, the first national conference of the American Association of Artificial Intelligence
was held at Stanford University.
The second AI winter (1987-1993)
o The duration between the years 1987 to 1993 was the second AI Winter duration.
o 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.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
The emergence of intelligent agents (1993-2011)
o Year 1997: In the year 1997, IBM Deep Blue beats world chess champion, Gary Kasparov, and
became the first computer to beat a world chess champion.
o Year 2002: for the first time, AI entered the home in the form of Roomba, a vacuum cleaner.
o Year 2006: AI came in the Business world till the year 2006. Companies like Facebook, Twitter,
and Netflix also started using AI.
Deep learning, big data, and artificial general intelligence (2011-present)
o Year 2011: In the year 2011, IBM's Watson won jeopardy, a quiz show, where it had to solve the
complex questions as well as riddles. Watson had proved that it could understand natural language
and can solve tricky questions quickly.
o Year 2012: Google has launched an Android app feature "Google now", which was able to provide
information to the user as a prediction.
o Year 2014: In the year 2014, Chatbot "Eugene Goostman" won a competition in the infamous
"Turing test."
o Year 2018: The "Project Debater" from IBM debated on complex topics with two master debaters
and performed extremely well.
o Google has demonstrated an AI program "Duplex" which was a virtual assistant, and which had
taken hairdresser appointment on call, and lady on other side didn't notice that she was talking with
the machine.
Now AI has developed to a remarkable level. The concept of Deep learning, big data, and data science are
now trending like a boom. Nowadays companies like Google, Facebook, IBM, and Amazon are working
with AI and creating amazing devices. The future of Artificial Intelligence is inspiring and will come with
high intelligence.
APPLICATIONS OF ARTIFICIAL INTELLIGENCE
Artificial Intelligence has various applications in today's society. It is becoming essential for today's
time because it can solve complex problems with an efficient way in multiple industries, such as
Healthcare, entertainment, finance, education, etc. AI is making our daily life more comfortable and
faster.
Following are some sectors which have the application of Artificial Intelligence:
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
1. AI in Astronomy
o Artificial Intelligence can be very useful to solve complex universe problems. AI technology
can be helpful for understanding the universe such as how it works, origin, etc.
2. AI in Healthcare
o In the last, five to ten years, AI becoming more advantageous for the healthcare industry and
going to have a significant impact on this industry.
o Healthcare Industries are applying AI to make a better and faster diagnosis than humans. AI
can help doctors with diagnoses and can inform when patients are worsening so that medical
help can reach to the patient before hospitalization.
3. AI in Gaming
o AI can be used for gaming purpose. The AI machines can play strategic games like chess,
where the machine needs to think of many possible places.
4. AI in Finance
o AI and finance industries are the best matches for each other. The finance industry is
implementing automation, chatbot, adaptive intelligence, algorithm trading, and machine
learning into financial processes.
5. AI in Data Security
o The security of data is crucial for every company and cyber-attacks are growing very rapidly
in the digital world. AI can be used to make your data more safe and secure. Some examples
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
such as AEG bot, AI2 Platform,are used to determine software bug and cyber-attacks in a
better way.
6. AI in social media
o Social Media sites such as Facebook, Twitter, and Snapchat contain billions of user profiles,
which need to be stored and managed in a very efficient way. AI can organize and manage
massive amounts of data. AI can analyze lots of data to identify the latest trends, hashtag, and
requirement of different users.
7. AI in Travel & Transport
o AI is becoming highly demanding for travel industries. AI is capable of doing various travel
related works such as from making travel arrangement to suggesting the hotels, flights, and
best routes to the customers. Travel industries are using AI-powered chatbots which can
make human-like interaction with customers for better and fast response.
8. AI in Automotive Industry
o Some Automotive industries are using AI to provide virtual assistant to their user for better
performance. Such as Tesla has introduced TeslaBot, an intelligent virtual assistant.
o Various Industries are currently working for developing self-driven cars which can make
your journey more safe and secure.
9. AI in Robotics:
o Artificial Intelligence has a remarkable role in Robotics. Usually, general robots are
programmed such that they can perform some repetitive task, but with the help of AI, we can
create intelligent robots which can perform tasks with their own experiences without pre-
programmed.
o Humanoid Robots are best examples for AI in robotics, recently the intelligent Humanoid
robot named as Erica and Sophia has been developed which can talk and behave like humans.
10. AI in Entertainment
o We are currently using some AI based applications in our daily life with some entertainment
services such as Netflix or Amazon. With the help of ML/AI algorithms, these services show
the recommendations for programs or shows.
11. AI in Agriculture
o Agriculture is an area which requires various resources, labor, money, and time for best
result. Now a day's agriculture is becoming digital, and AI is emerging in this field.
Agriculture is applying AI as agriculture robotics, solid and crop monitoring, predictive
analysis. AI in agriculture can be very helpful for farmers.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
12. AI in E-commerce
o AI is providing a competitive edge to the e-commerce industry, and it is becoming more
demanding in the e-commerce business. AI is helping shoppers to discover associated
products with recommended size, color, or even brand.
13. AI in education:
o AI can automate grading so that the tutor can have more time to teach. AI chatbot can
communicate with students as a teaching assistant.
o AI in the future can be work as a personal virtual tutor for students, which will be accessible
easily at any time and any place.
Advantages of Artificial Intelligence
Following are some main 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.
Disadvantages of Artificial Intelligence
Every technology has some disadvantages, and the same goes for Artificial intelligence. Being so
advantageous technology still, it has some disadvantages which we need to keep in our mind while
creating an AI system.
Following are the disadvantages of AI:
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
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.
Types of Artificial Intelligence:
Artificial Intelligence can be divided in various types, there are mainly two types of main
categorization which are based on capabilities and based on functionally of AI.
Following is flow diagram which explain the types of AI.
AI type-1: Based on Capabilities
1. Weak AI or Narrow AI:
o Narrow AI is a type of AI which can perform a dedicated task with intelligence. The most
common and currently available AI is Narrow AI in the world of Artificial Intelligence.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
o Narrow AI cannot perform beyond its field or limitations, as it is only trained for one specific
task. Hence it is also termed as weak AI. Narrow AI can fail in unpredictable ways if it goes
beyond its limits.
o Apple Siri is a good example of Narrow AI, but it operates with a limited pre-defined range
of functions.
o IBM's Watson supercomputer also comes under Narrow AI, as it uses an Expert system
approach combined with Machine learning and natural language processing.
o Some Examples of Narrow AI are playing chess, purchasing suggestions on e-commerce site,
self-driving cars, speech recognition, and image recognition.
2. General AI:
o General AI is a type of intelligence which could perform any intellectual task with efficiency
like a human.
o The idea behind the general AI to make such a system which could be smarter and think like
a human by its own.
o Currently, there is no such system exist which could come under general AI and can perform
any task as perfect as a human.
o The worldwide researchers are now focused on developing machines with General AI.
o As systems with general AI are still under research, and it will take lots of efforts and time to
develop such systems.
3. Super AI:
o Super AI is a level of Intelligence of Systems at which machines could surpass human
intelligence and can perform any task better than human with cognitive properties. It is an
outcome of general AI.
o Some key characteristics of strong AI include capability include the ability to think, to
reason, solve the puzzle, make judgments, plan, learn, and communicate by its own.
o Super AI is still a hypothetical concept of Artificial Intelligence. Development of such
systems in real is still world changing task.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
Artificial Intelligence type-2: Based on functionality
1. Reactive Machines
o Purely reactive machines are the most basic types of Artificial Intelligence.
o Such AI systems do not store memories or past experiences for future actions.
o These machines only focus on current scenarios and react on it as per possible best action.
o IBM's Deep Blue system is an example of reactive machines.
o Google's AlphaGo is also an example of reactive machines.
2. Limited Memory
o Limited memory machines can store past experiences or some data for a short period of time.
o These machines can use stored data for a limited time period only.
o Self-driving cars are one of the best examples of Limited Memory systems. These cars can
store recent speed of nearby cars, the distance of other cars, speed limit, and other
information to navigate the road.
3. Theory of Mind
o Theory of Mind AI should understand the human emotions, people, beliefs, and be able to
interact socially like humans.
o This type of AI machines are still not developed, but researchers are making lots of efforts
and improvement for developing such AI machines.
4. Self-Awareness
o Self-awareness AI is the future of Artificial Intelligence. These machines will be super
intelligent, and will have their own consciousness, sentiments, and self-awareness.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
o These machines will be smarter than human mind.
o Self-Awareness AI does not exist in reality still, and it is a hypothetical concept.
INTELLIGENT AGENTS
AGENTS AND ENVIRONMENTS
An agent is anything that can be viewed as perceiving its environment through sensors and acting
upon that environment through actuators.
This simple idea is illustrated in the following figure.
A human agent has eyes, ears, and other organs for sensors and hands, legs, vocal tract, and so
on for actuators.
A robotic agent might have cameras and infrared range finders for sensors and various motors
for actuators.
A software agent receives keystrokes, file contents, and network packets as sensory inputs and
acts on the environment by displaying on the screen, writing files, and sending network packets.
The term percept used to refer to the agent’s perceptual inputs at any given instant. An agent’s
percept sequence is the complete history of everything the agent has ever perceived.
In general, an agent’s choice of action at any given instant can depend on the entire percept sequence
observed to date, but not on anything it hasn’t perceived.
To understand the above concept of agent let’s take the following example of Vacuum-cleaner.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
GOOD BEHAVIOR: THE CONCEPT OF RATIONALITY
A rational agent is one that does the right thing—conceptually speaking, every entry in the table for
the agent function is filled out correctly.
When an agent is kept in an environment, it generates a sequence of actions according to the
percepts it receives. This sequence of actions causes the environment to go through a sequence of
states.
If the sequence is desirable, then the agent has performed well. This notion of desirability is captured
by a performance measure that evaluates any given sequence of environment states.
Rationality
What is rational at any given time depends on four things:
The performance measure that defines the criterion of success.
The agent’s prior knowledge of the environment.
The actions that the agent can perform.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
The agent’s percept sequence to date.
This leads to a definition of a rational agent:
For each possible percept sequence, a rational agent should select an action that is expected to
maximize its performance measure, given the evidence provided by the percept sequence and
whatever built-in knowledge the agent has.
THE NATURE OF ENVIRONMENTS
Task environments are the “problems” to which rational agents are the “solutions”. Task environments
come in a variety of flavours. The flavour of the task environment directly affects the appropriate design
for the agent program.
Specifying the task environment
Specifying the task environment is nothing but specifying the performance measure, the environment,
and the agent’s actuators and sensors.
For the sake of simplicity call this as PEAS (Performance, Environment, Actuators, Sensors).
In designing an agent, the first step must always be to specify the task environment as fully as possible.
To understand how it can be done take a complex problem: an automated taxi driver.
The full driving task is extremely open-ended. There is no limit to the novel combinations of
circumstances that can arise.
The following figure summarizes the PEAS description for the taxi’s task environment.
Agent Environment in AI
An environment is everything in the world which surrounds the agent, but it is not a part of an agent
itself. An environment can be described as a situation in which an agent is present.
The environment is where agent lives, operate and provide the agent with something to sense and act
upon it.
Features of Environment
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
As per Russell and Norvig, an environment can have various features from the point of view
of an agent:
1. Fully observable vs Partially Observable
2. Static vs Dynamic
3. Discrete vs Continuous
4. Deterministic vs Stochastic
5. Single-agent vs Multi-agent
6. Episodic vs sequential
7. Known vs Unknown
8. Accessible vs Inaccessible
1. Fully observable vs Partially Observable:
If an agent sensor can sense or access the complete state of an environment at each point of
time then it is a fully observable environment, else it is partially observable.
A fully observable environment is easy as there is no need to maintain the internal state to
keep track history of the world.
An agent with no sensors in all environments then such an environment is called as
unobservable.
2. Deterministic vs Stochastic:
If an agent's current state and selected action can completely determine the next state of the
environment, then such environment is called a deterministic environment.
A stochastic environment is random in nature and cannot be determined completely by an
agent.
In a deterministic, fully observable environment, agent does not need to worry about
uncertainty.
3. Episodic vs Sequential:
In an episodic environment, there is a series of one-shot actions, and only the current percept
is required for the action.
However, in Sequential environment, an agent requires memory of past actions to determine
the next best actions.
4. Single-agent vs multi-agent:
If only one agent is involved in an environment, and operating by itself then such an
environment is called single agent environment.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
However, if multiple agents are operating in an environment, then such an environment is
called a multi-agent environment.
The agent design problems in the multi-agent environment are different from single agent
environment.
5. Static vs Dynamic:
If the environment can change itself while an agent is deliberating then such environment is
called a dynamic environment else it is called a static environment.
Static environments are easy to deal because an agent does not need to continue looking at
the world while deciding for an action.
However for dynamic environment, agents need to keep looking at the world at each action.
Taxi driving is an example of a dynamic environment whereas Crossword puzzles are an
example of a static environment.
6. Discrete vs Continuous:
If in an environment there are a finite number of percepts and actions that can be performed
within it, then such an environment is called a discrete environment else it is called
continuous environment.
A chess game comes under discrete environment as there is a finite number of moves that can
be performed.
A self-driving car is an example of a continuous environment.
7. Known vs Unknown:
Known and unknown are not actually a feature of an environment, but it is an agent's state of
knowledge to perform an action.
In a known environment, the results for all actions are known to the agent. While in unknown
environment, agent needs to learn how it works in order to perform an action.
It is quite possible that a known environment to be partially observable and an Unknown
environment to be fully observable.
8. Accessible vs Inaccessible:
If an agent can obtain complete and accurate information about the state's environment, then
such an environment is called an Accessible environment else it is called inaccessible.
An empty room whose state can be defined by its temperature is an example of an accessible
environment.
Information about an event on earth is an example of Inaccessible environment.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
THE STRUCTURE OF AGENTS
The job of AI is to design an agent program that implements the agent function—the mapping from
percepts to actions.
This program will run on some sort of computing device with physical sensors and actuators—this
will be called as the architecture.
agent = architecture + program
The selected program must be one that is appropriate for the architecture. If the program is going to
recommend actions like Walk, the architecture should have legs.
The architecture might be just an ordinary PC, or it might be a robotic car with several on-board
computers, cameras, and other sensors.
In general, the architecture makes the percepts from the sensors available to the program, runs the
program, and feeds the program’s action choices to the actuators as they are generated.
Types of AI Agents
Agents can be grouped into five classes based on their degree of perceived intelligence and capability. All
these agents can improve their performance and generate better action over the time. These are given below:
1. Simple Reflex Agent
2. Model-based reflex agent
3. Goal-based agents
4. Utility-based agent
5. Learning agent
1. Simple Reflex agent:
The Simple reflex agents are the simplest agents. These agents take decisions on the basis of the
current percepts and ignore the rest of the percept history.
These agents only succeed in the fully observable environment.
The Simple reflex agent does not consider any part of percepts history during their decision and
action process.
The Simple reflex agent works on Condition-action rule, which means it maps the current state to
action. Such as a Room Cleaner agent, it works only if there is dirt in the room.
Problems for the simple reflex agent design approach:
o They have very limited intelligence.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
o They do not have knowledge of non-perceptual parts of the current state.
o Mostly too big to generate and to store.
o Not adaptive to changes in the environment.
2. Model-based reflex agent
The Model-based agent can work in a partially observable environment and track the situation.
A model-based agent has two important factors:
Model: It is knowledge about "how things happen in the world," so it is called a Model-
based agent.
Internal State: It is a representation of the current state based on percept history.
These agents have the model, "which is knowledge of the world" and based on the model they
perform actions.
Updating the agent state requires information about:
a) How the world evolves
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
b) How the agent's action affects the world.
3. Goal-based agents
The knowledge of the current state environment is not always sufficient to decide for an agent to
what to do.
The agent needs to know its goal which describes desirable situations.
Goal-based agents expand the capabilities of the model-based agent by having the "goal"
information.
They choose an action, so that they can achieve the goal.
These agents may have to consider a long sequence of possible actions before deciding whether the
goal is achieved or not. Such considerations of different scenario are called searching and planning,
which makes an agent proactive.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
4. Utility-based agents
These agents are similar to the goal-based agent but provide an extra component of utility
measurement which makes them different by providing a measure of success at a given state.
Utility-based agent act based not only goals but also the best way to achieve the goal.
The Utility-based agent is useful when there are multiple possible alternatives, and an agent has to
choose in order to perform the best action.
The utility function maps each state to a real number to check how efficiently each action achieves
the goals.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
5. Learning Agents
A learning agent in AI is the type of agent which can learn from its past experiences, or it has
learning capabilities.
It starts to act with basic knowledge and then able to act and adapt automatically through learning.
A learning agent has mainly four conceptual components, which are:
o Learning element: It is responsible for making improvements by learning from environment.
o Critic: Learning element takes feedback from critic which describes that how well the agent is
doing with respect to a fixed performance standard.
o Performance element: It is responsible for selecting external action.
o Problem generator: This component is responsible for suggesting actions that will lead to
new and informative experiences.
Hence, learning agents can learn, analyse performance, and look for new ways to improve the
performance.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
Turing Test in AI
In 1950, Alan Turing introduced a test to check whether a machine can think like a human or not,
this test is known as the Turing Test.
In this test, Turing proposed that the computer can be said to be an intelligent if it can mimic human
response under specific conditions.
The Turing test is based on a party game "Imitation game," with some modifications. This game
involves three players in which one player is Computer, another player is human responder, and the
third player is a human Interrogator, who is isolated from other two players and his job is to find that
which player is machine among two of them.
Consider, Player A is a computer, Player B is human, and Player C is an interrogator. Interrogator is
aware that one of them is machine, but he needs to identify this on the basis of questions and their
responses.
The conversation between all players is via keyboard and screen so the result would not depend on
the machine's ability to convert words as speech.
The test result does not depend on each correct answer, but only how closely its responses like a
human answer. The computer is permitted to do everything possible to force a wrong identification
by the interrogator.
The questions and answers can be like:
o Interrogator: Are you a computer?
o Player-A (Computer): No
o Interrogator: Multiply two large numbers such as (256896489*456725896)
o Player A: Long pause and give the wrong answer.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com
In this game, if an interrogator would not be able to identify which is a machine and which is human,
then the computer passes the test successfully, and the machine is said to be intelligent and can think
like a human.
Features required for a machine to pass the Turing test:
Natural language processing: NLP is required to communicate with Interrogator in general human
language like English.
Knowledge representation: To store and retrieve information during the test.
Automated reasoning: To use the previously stored information for answering the questions.
Machine learning: To adapt new changes and can detect generalized patterns.
Vision (For total Turing test): To recognize the interrogator actions and other objects during a test.
Motor Control (For total Turing test): To act upon objects if requested.
Mr. Mohammed Afzal, Asst. Professor in AIML
Mob: +91-8179700193, Email: mdafzal.mbnr@gmail.com