Agent
Agent
Introduction:
Approaches of AI
There are a total of four approaches of AI and that are as follows:
1. Acting humanly (The Turing Test approach): This approach was designed by Alan Turing.
The ideology behind this approach is that a computer passes the test - if a human
interrogator, after asking some written questions, cannot identify whether the written
responses come from a human or from a computer.
2. Thinking humanly (The cognitive modeling approach): The idea behind this approach is to
determine whether the computer thinks like a human.
3. Thinking rationally (The “laws of thought” approach): The idea behind this approach is to
determine whether the computer thinks rationally i.e. with logical reasoning.
4. Acting rationally (The rational agent approach): The idea behind this approach is to
determine whether the computer acts rationally i.e. with logical reasoning.
MCKVIE-Artificial Intelligence-3rd year II Semester Page 7
Applications of AI include Natural Language Processing (Natural Language
Understanding, Speech Understanding Language Generation, and Machine Translation),
Gaming, Speech Recognition, Vision Systems, Healthcare, Automotive, etc
An agent (e.g., human or robot) is anything that can perceive its environment
through sensors and acts upon that environment through effectors. Intelligent agents must be
able to set goals and achieve them. In classical planning problems, the agent can assume that
it is the only system acting in the world, allowing the agent to be certain of the consequences
of its actions. However, if the agent is not the only actor, then it requires that the agent can
reason under uncertainty. This calls for an agent that cannot only assess its environment and
make predictions but also evaluate its predictions and adapt based on its assessment.
Natural language processing gives machines the ability to read and understand human
language. Some straightforward applications of natural language processing include
information retrieval, text mining, question answering, and machine translation. Machine
perception is the ability to use input from sensors (such as cameras, microphones, sensors,
etc.) to deduce aspects of the world. e.g., Computer Vision. Concepts such as game theory,
and decision theory, necessitate that an agent can detect and model human emotions.
Many times, we get confused between Machine Learning and Artificial Intelligence,
but Machine learning, a fundamental concept of AI research since the field’s inception, is the
study of computer algorithms that improve automatically through experience. The
mathematical analysis of machine learning algorithms and their performance is a branch of
theoretical computer science known as a computational learning theory.
AI research into three approaches, which he calls computational psychology,
computational philosophy, and computer science.
Computational psychology is used to make computer programs that mimic human behavior.
Computational philosophy is used to develop an adaptive, free-flowing computer mind.
Implementing computer science serves the goal of creating computers that can perform
tasks that only people could previously accomplish.
AI has developed a large number of tools to solve the most difficult problems in computer
science, like:
1) Game Playing
Deep Blue Chess program beat world champion Gary Kasparov
2) Speech Recognition
PEGASUS spoken language interface to American Airlines' EAASY SABRE reseration
system, which allows users to obtain flight information and make reservations over the
telephone. The 1990s has seen significant advances in speech recognition so that limited
systems are now successful.
3) Computer Vision
Face recognition programs in use by banks, government, etc. The ALVINN system from
CMU autonomously drove a van from Washington, D.C. to San Diego (all but 52 of 2,849
miles), averaging 63 mph day and night, and in all weather conditions. Handwriting
recognition, electronics and manufacturing inspection, photo interpretation, baggage
inspection, reverse engineering to automatically construct a 3D geometric model.
4) Expert Systems
Application-specific systems that rely on obtaining the knowledge of human experts in an
area and programming that knowledge into a system.
a. Diagnostic Systems : MYCIN system for diagnosing bacterial infections of the
blood and suggesting treatments. Intellipath pathology diagnosis system (AMA
approved). Pathfinder medical diagnosis system, which suggests tests and makes
diagnoses. Whirlpool customer assistance center.
b. System Configuration
DEC's XCON system for custom hardware configuration. Radiotherapy treatment planning.
c. Financial Decision Making
Credit card companies, mortgage companies, banks, and the U.S. government
employ AI systems to detect fraud and expedite financial transactions. For
example, AMEX credit check.
d. Classification Systems
Put information into one of a fixed set of categories using several sources of
information. E.g., financial decision making systems. NASA developed a system for
classifying very faint areas in astronomical images into either stars or galaxies with
very high accuracy by learning from human experts' classifications.
MCKVIE-Artificial Intelligence-3rd year II Semester Page 10
5) Mathematical Theorem Proving
Use inference methods to prove new theorems.
6) Natural Language Understanding
AltaVista's translation of web pages. Translation of Catepillar Truck manuals into 20
languages.Scheduling and Planning
Automatic scheduling for manufacturing. DARPA's DART system used in Desert Storm and
Desert Shield operations to plan logistics of people and supplies. American Airlines rerouting
contingency planner. European space agency planning and scheduling of spacecraft assembly,
integration and verification.
7) Artificial Neural Networks:
8) Machine Learning
Applications of AI:
AI algorithms have attracted close attention of researchers and have also been applied successfully
to solve problems in engineering. Nevertheless, for large and complex problems, AI algorithms
consume considerable computation time due to stochastic feature of the search approaches
Building AI Systems:
1) Perception
Intelligent biological systems are physically embodied in the world and experience the
world through their sensors (senses). For an autonomous vehicle, input might be images
2) Reasoning
Inference, decision-making, classification from what is sensed and what the internal "model" is of
the world. Might be a neural network, logical deduction system, Hidden Markov Model induction,
heuristic searching a problem space, Bayes Network inference, genetic algorithms, etc.
Includes areas of knowledge representation, problem solving, decision theory, planning, game
theory, machine learning, uncertainty reasoning, etc.
3) Action
Biological systems interact within their environment by actuation, speech, etc. All behavior is centered
around actions in the world. Examples include controlling the steering of a Mars rover or autonomous
vehicle, or suggesting tests and making diagnoses for a medical diagnosis system. Includes areas of
robot actuation, natural language generation, and speech synthesis.
The definitions of AI:
The definitions on the top, (a) and (b) are concerned with reasoning, whereas those on the
bottom, (c) and (d) address behavior. The definitions on the left, (a) and (c) measure success
in terms of human performance, and those on the right, (b) and (d) measure the ideal concept
of intelligence called rationality
Artificial Intelligence is concerned with the design of intelligence in an artificial device. The
term was coined by McCarthy in 1956.
Intelligence
Artificial device
o Or are we only interested in the final manifestations of the system in terms of its
actions?
Intelligent Systems:
In order to design intelligent systems, it is important to categorize them into four categories
b. Focus is not just on behavior and I/O, but looks like reasoning process.
c. Goal is not just to produce human-like behavior but to produce a sequence of steps of the
reasoning process, similar to the steps followed by a human in solving the same task.
a. The study of mental faculties through the use of computational models; that it is, the study
of computations that make it possible to perceive reason and act.Focus is on inference
mechanisms that are probably correct and guarantee an optimal solution.
b. Goal is to formalize the reasoning process as a system of logical rules and procedures of
inference.
a. The art of creating machines that perform functions requiring intelligence when performed
MCKVIE-Artificial Intelligence-3rd year II Semester Page 14
by people; that it is the study of, how to make computers do things which, at the moment,
people do better.
b. Focus is on action, and not intelligent behavior centered around the representation of the world
o The interrogator can communicate with the other 2 by teletype (to avoid
the machine imitate the appearance of voice of the person)
o The interrogator tries to determine which the person is and which the
machine is.
o The machine tries to fool the interrogator to believe that it is the human,
and the person also tries to convince the interrogator that it is the human.
o If the machine succeeds in fooling the interrogator, then conclude that the
machine is intelligent.
Typical AI problems:
1. Bias
AI’s bias problem has been well documented. It can lead to things like discrimination in
housing, job applications, and the criminal justice system. For example, Amazon used AI to
choose job applicants only to realize it was consistently viewing women as unqualified. Such
bias is the result of bias in the data used to train the AI.
2. Security
AI has the potential to improve cybersecurity but also to create new vulnerabilities. The
following are key security threats for AI applications.
Another issue related to security is data privacy. AI operators have a responsibility to keep
MCKVIE-Artificial Intelligence-3rd year II Semester Page 15
data confidential, especially sensitive information such as health or financial records.
However, insufficient security may leave systems vulnerable to attack and data susceptible to
being stolen.
3. Ethics:
AI understands logic, but ethics aren’t always logical. So, engineers haven’t yet been able to
program AI to understand the morality involved in human activities. That means some
decisions made by AI systems based on algorithms could go against human ethical concerns
Other challenges are related to the ways in which AI is used. For example, many workers are
concerned about losing their jobs to AI machines. Is it ethical for employers to make these
replacements, leading to high unemployment? Self-driving cars may injure pedestrians. Is it
ethical to allow them to be on the road if such accidents are possible? Who is at fault in such
situations, as there is no driver? Another example is surveillance which includes AI. Is it
ethical to deploy facial recognition, which raises significant privacy concerns?
4. Lack of Talent:
The IT field has been dealing with a talent shortage for some time. While many new IT
workers are becoming available, the demand still outpaces the supply. AI data scientists are
even rarer, and companies may struggle to find qualified workers in this area. Some
businesses are addressing this challenge by creating internal training and education programs,
which can be shaped to each company’s unique needs
While studying the typical range of tasks that we might expect an “intelligent entity” to
perform, we need to consider both “common-place” tasks as well as expert tasks.
Examples of common-place tasks include
These tasks cannot be done by all people, and can only be performed by skilled specialists.
Now, which of these tasks are easy and which ones are hard? Clearly tasks of the first type
are easy for humans to perform, and almost all are able to master them. The second range of
tasks requires skill development and/or intelligence and only some specialists can perform
them well. However, when we look at what computer systems have been able to achieve to
date, we see that their achievements include performing sophisticated tasks like medical
diagnosis, performing symbolic integration, proving theorems and playing chess.
a. Tries to explain and emulate intelligent behavior in terms of computational process; that it is
concerned with the automation of the intelligence.
The state space is a set of prearranged pairs giving the number of liters of water in the pair of
jugs at any time, i.e., (four, three) where four = 0, 1, 2, 3 or 4 and three = 0, 1, 2 or 3.
The start state is (0, 0) and the goal state is (2, n) where n may be any but it is limited to three
holding from 0 to 3 liters of water or empty. Three and four shows the name and numerical
number shows the amount of water in jugs for solving the water jug problem. The major
production rules for solving this problem are shown below:
1. (four, three) if four < 4 (4, three) fill four from tap
2. (four, three) if three< 3 (four, 3) fill three from tap
3. (four, three) If four > 0 (0, three) empty four into drain
4. (four, three) if three > 0 (four, 0) empty three into drain
5. (four, three) if four + three<4 (four + three, 0) empty three liters jug into four
liters jug
6. (four, three) if four + three<3 (0, four + three) empty four liters jug into three
liters jug
7. (0, three) If three > 0 (three, 0) empty three into four
8. (four, 0) if four > 0 (0, four) empty four into three
9. (0, 2) (2, 0) empty three liters jug into
four liters jug
10. (2, 0) (0, 2) empty four liters jug into
three liters jug
MCKVIE-Artificial Intelligence-3rd year II Semester Page 17
11. (four, three) if four < 4 (4, three-diff) pour diff, 4-four, into four from
three
<3 (four-diff, 3) pour diff, 3-three, into three from four and a solution is given below four three
rule
The algorithm is unsupervised learning and does not employ categorized information to make
choices on its own without any direction.
In supervised learning, a feature that includes a combination of an input data set and the
intended output is inferred from the training data.
2. Machine Vision:
Machines are capable of collecting and analyzing visual data. In this case, cameras are
utilized to record sensory information, which is then processed using digital signal
processing once the picture is converted from analog to digital.
The data that is produced is then input into a computer. Sensitivity is the capacity of the
machine to recognize weak impulses and resolution. The extent to which it can discriminate
between objects—are two essential components of machine vision.
Natural Language Processing, the method of extracting meaning from human languages, is
trustworthy technology. The machine in NLP records the speech of a person speaking.
Following the audio-to-textual dialogue, the writing is converted to turn the data into audio.
The system then responds to people via audio. Applications of NLP may be found in
Interactive Voice Response (IVR) systems used in contact centers, in language translations
like Google Translate, and in word processors that verify the correctness of syntax in text,
like Microsoft Word.
By leveraging the CAPTCHA technique, this automation can avoid fraud problems during
online payments.
Robotic process automation is designed to carry out high-volume, repetitive jobs while being
capable of adapting to changing conditions.
I. Is the problem decomposable into small sub-problems which are easy to solve?
II. Can solution steps be ignored or undone?
III. Is the universe of the problem is predictable?
IV. Is a good solution to the problem is absolute or relative?
V. Is the solution to the problem a state or a path?
VI. What is the role of knowledge in solving a problem using artificial intelligence?
VII. Does the task of solving a problem require human interaction?
A human agent has eyes, ears, and other organs for sensors and hands, legs, mouth,
and other body parts 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.
Percept:
We use the term percept to refer to the agent's perceptual inputs at any given instant.
PerceptSequence:
An agent's percept sequence is the complete history of everything the agent has ever perceived.
Agent function:
Mathematically speaking, we say that an agent's behavior is described by the agent function
that maps any given percept sequence to an action.
Agent program
Internally, the agent function for an artificial agent will be implemented by an agent program.
To illustrate these ideas, we will use a very simple example-the vacuum-cleaner world shown in
Fig 2.1.5. This particular world has just two locations: squares A and B. The vacuum agent
perceives which square it is in and whether there is dirt in the square. It can choose to move left,
move right, suck up the dirt, or do nothing. One very simple agent function is the following: if the
current square is dirty, then suck, otherwise move to the other square. A partial tabulation of this
agent function is shown in Fig 2.1.6.
Agent function
Fig 2.1.6(i): The REFLEX-VACCUM-AGENT program is invoked for each new percept
(location, status) and returns an action each time
A Rational agent is one that does the right thing. We say that the right action is the one that will
cause the agent to be most successful. That leaves us with the problem of deciding how and
when to evaluate the agent's success.
We use the term performance measure for the how—the criteria that determine how successful
an agent is.
Ex-Agent cleaning the dirty floor
Performance Measure-Amount of dirt collected
When to measure-Weekly for better results
Let’s understand the PEAS system for a ketchup-producing industry. To produce good quality ketchup,
it is important to segregate the ripe tomatoes and use them for production. Using bad quality or unripe
tomatoes can lower the quality of the ketchup. Now, classifying the tomatoes can be done manually,
but it would be a tedious job for humans as a factory might process thousands of tomatoes daily. Hence,
we can incorporate an AI to help us. Hence, we need to know about our task environment and the agent
we will use.
MCKVIE-Artificial Intelligence-3rd year II Semester Page 25
Agent: Tomato classification system.
Sensors: Weighing sensors, Cameras for visual input, color sensing, etc.
Actuators: Track changing mechanism for segregation, display boards, or a Y-belt for quick
classification into ripe and unripe tomatoes.
Environment: Our environment can be a moving walkway through which the tomatoes are passed on
for segregation. It should have a good source of light for better camera input.
Performance: It measures how successful the agent is in classifying the tomatoes. It can be a confusion
matrix with true positive, true negative, false positive, and false negative numbers or the model’s
accuracy.
ENVIRONMENTS:
The Performance measure, the environment and the agents actuators and sensors comes under the
heading task environment. We also call this as PEAS(Performance,Environment,Actuators,Sensors)
The job of AI is to design the agent program: a function that implements the agent mapping from
percepts to actions. We assume this program will run on some sort of ARCHITECTURE computing
device, which we will call the architecture.
The architecture might be a plain computer, or it might include special-purpose hardware for certain
tasks, such as processing camera images or filtering audio input. It might also include software that
provides a degree of insulation between the raw computer and the agent program, so that we can
program at a higher level. 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 effectors as they are
generated.
The relationship among agents, architectures, and programs can be summed up as
follows: agent = architecture + program
Types of agents:
Agents can be grouped into four classes based on their degree of perceived intelligence and capability:
Simple Reflex Agents
Model-Based Reflex Agents
Goal-Based Agents
Utility-Based Agents
Simple reflex agents:
Simple reflex agents ignore the rest of the percept history and act only on the basis of
the current percept.
The agent function is based on the condition-action rule.
If the condition is true, then the action is taken, else not. This agent function only succeeds when
the environment is fully observable.
Utility-based agents:
A utility-based agent is an agent that acts based not only on what the goal is, but the best way to reach that
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 term utility can be used to describe how "happy" the agent is.
Uninformed/Blind Search:
The uninformed search does not contain any domain knowledge such as closeness, the location of the goal. It
operates in a brute-force way as it only includes information about how to traverse the tree and how to identify
leaf and goal nodes. Uninformed search applies a way in which search tree is searched without any information
about the search space like initial state operators and test for the goal, so it is also called blind search. It examines
each node of the tree until it achieves the goal node.
Informed Search :