Artificial Intelligence PDF
Artificial Intelligence PDF
In artificial intelligence, am agent is a computer program or system that is designed to perceive its
cnvironment, makc decisions and take actions to achieve a snccific goal or set of goals. The agent
operates autononmously, meaning it isnot directly controlled by a human operator.
Agents can be classified into different tynes based on their characteristics, such as whether they are
TCactive or proacive, whether they have afixed or dynamic environment, and whether they arce single or
multi-agcnt systems.
and take
Reactive agents are those that respond to immediate stimuli from their environment
ahead
actions based on those stimuli. Proactive agents, on the other hand, take initiative and plan
fixed or dynamic.
lo achieve their goals. The environment in which an agent operates can also be
Fixed environments have a static sct of rules that do not changc, whilc dynamic environments arc
constantly changing and require agents to adapt to ncw situations.
goal. These
Multi-agent systems involve multiple agents working together to achieve a common
with cach other to achieve their
agents may havc to coordinate their actions and communicatc
gaming, and
objectives. Agents are used in a varicty of applications, including robotics,
languages and
intelligent systems. They can be implemented using different programming
techniques, including machine learning and natural language processing.
agent could be anything that
Artificial intelligence is defined as the study of rational agents. Arational action with the best
software. It carries out an
makes decisions, such as a person, irm, machine, or
perceptual inputs at a given instance). An AI
outcome after considering past and current percepts(agent's
environment. The agents act in their environment. The
system is composed of an agent and its
cnvironment may contain other agents.
agent
Structure of an AI Agent
To understand the structure of Intelligent Ayents, We thould be fatrihar
with Architecture and Agent programs. Architecture is the rmachinery that the agent eIecutes M. t 16 4
device with sensors and actuators, for exarmple. a robotic car, acarmera, and a PC. An agent prozram is
wquewhisry 1
an implementation of an agent functíon. Anagent function is amap fronthe pervpt
all that an agent has perccived to date) to an action.
Goals/Preferences
Agent
Prior Knowledge
Actions
Observations
Environment
Past Experiences
Types of Agents
Agents can be grouped into five classes based on their degree of perceived intelligence and capability:
Simple Reflex Agents
Model-Based Reflex Agents
Goal-Based Agents
Utility-Based Agents
Learning Agent
Multi-agent systems
Hierarchical agents
Simple Reflex Agents
Simple reflex agents ignore the rest of the percept history and act only on the basis of the current
percept. Percept history is the history of all that an agent has perceived to date. The agent function is
based on the condition-action rule. A condition-action rule is a rule that maps a state i.e., a condition to
an action. If the condition is true, then the action is taken, else not. This agent function only succeeds
when the environment is fully observable. For simple reflex agents operating in partially observable
environments, infinite loops are often unavoidable. It may be possible to cscape from infinite loops if the
agent can randomize its actions.
Environment
Condton
action rues
Aciua:ors
Actions
It works by finding a rule whose condition matches the current situation. A model-based agent can
bandle partially observable environments by the use of a model about the world. The agent has to keep
track of the internal state which is adjusted by each percept and that depends on the percept history. The
current state is stored inside the agent which maintains some kind of structure describing the part of the
world which cannot be seen.
Types of Agents
Agents can be grouped into five classes based on their degree of perceived intelligence and capability :
Simple Reflex Agents
Model-Based Reflex Agents
Goal-Bascd Agents
Utility-Based Agents
Lcarning Agent
Multi-agent systems
Hierarchical agents
Simple Reflex Agents
Simple rellex agents ignorc the rest of the percept bistory and act only on the basis of the current
percept. Percept history is the history of all that an agent has perceived to date. The agent function is
based on thccondition-action rule. Acondition-action rule is arule that maps astatc i.c., a condition
succecds
(o an action. If the condition is true, then the action taken,else not. This agent function only
when thc cnvironmcnt is fully obscrvable. For simplc rcflcx agcnts opcratingin partially obscrvablc
cnvironments, infinitc loops are often unavoidablc. It may be possiblc to cscapc from infinite loops 1l
the agent can randomize its actions.
Problemswith Simple reflex agents arc :
Very limited intelligence.
No knowledge of non-perceptualparts of the state.
Usually too big to generate andstorec.
be updated.
If there occurs any change in the environment, then the collection of rules needs to
Percepts
Agent Sensors+
Actuators
Actlons
It works by finding arule whose condition matches the current situation. Amodel-based agent can
handle partially observable environments by the use of a model about the world. The agent has to
keep track of the internal state which is adjusted by each percept and that depends on the percept
history. The current state is stored inside the agent which maintains some kind of structure describing
the part of the world which cannot be seen.
Updating the state requires information about:
How the world evolves independcntly from the agent?
How do the agent's actions affect the world?
creras
Sensors ¢
Actuators
Goal-Based Agents
(description of
how far they are currently from their goal
These kinds of agents take decisions based on This allows the
to reduce their distance from the goal.
desirable situations). Their every action is intended goal state. The
possibilities, selecting the one which reaches a
agent a way to choose among nultiple explicitly and can be modified, which makes these
knowledge that supports its decisions is represented behavior can
more flexible. They usually require search and planning. The goal-based agent's
agents
easily be changed.
raresis
Sensors
tate
Envionaent
htwinete
Agent Actuators
Goal-Based Agents
Utility-Based Agents
are called utility-based agents.
The agents which are developed having their end uses as building blocks
utility-based agents are
When there are multiple possible alternatives, then to decide which one is best,
achieving thedesired
used. They choose actions based on a preference (utility) for each state. Sometimes
happiness
goal is not enough. We may look for a quicker, safer, cheaper trip to reach a destination. Agent of the
"happy" the agent is. Because
should be taken into consideration. Utility describes how
uncertainty in the world, a utility agent chooses the action that maximizes the expected utility. Autility
function maps astate onto arcal umber which deseribes the associated degrec of happincss.
Actualors
Utility-Based Agents
Learning Agent
A leaming agent in Al is the type of agent that can learn from its past
experiences or it has learning
capabilities. It starts to act with basic knowledge and then is able to act and adapt automatically through
learning. Alearning agent has mainly four conceptual components, which are:
1. Learning element: It is responsible for making improvements by
learning from the environment.
2. Critic: The learning element takes feedback from critics
which describes how well the agent is
doing with respect to a fixed performance standard.
3. Performance element: It is responsible for selecting external action.
4. Problem Generator: This component is responsible for suggesting
actions that will lead to new
and informative experiences.
AGENT
Performance
Stapdard
Percepts
Critic Sensors +
feedback
changes.Perforance
Ens ironment
Learuing
element knowledge clement
Læarming goals
Problem experiments
Generator aetions
Effectos
Learning Agent
Multi-Agent Systems
coordinate their
achieve a common goal. They may have to
These agents interact with other agents to
achieve their objective.
actions and communicate with cach other to
to
composed of multiple interacting agents that arc designed
A multi-agent system (MAS) is asystem semi-autonomous and are
agents may be autonomous or
Work together to achieve a common goal. These
decisions, and taking action to achieve the common
capable of perceiving their environment, making
objective.
transportation systems, robotics, and social
MAS can be used in avariety of applications, including
flexibility in complex systems.
networks. They can help improve efficiency, reduce costs, and increase
such as whether theagents have
MAS can be classified into different types based on their characteristics,
and whether the agents are
thesame or different goals, whether the agents are cooperative or competitive,
homogeneous or heterogeneous.
behaviors.
In a homogeneous MAS, all the agents have the same capabilities, goals, and
behaviors.
In contrast, in a heterogeneous MAS, the agents have different capabilities, goals, and
This can make coordination more challenging but can also lead to more flexible and robust systems.
Cooperative MAS involves agents working together to achieve a common goal, while competitive MAS
involves agents working against each other to achieve their own goals. In some cases, MAS can also
involve both cooperative and competitive behavior, where agents must balance their own interests with
the interests of the group.
MAS can be implemented using different techniques, such as game theory, machine learning, and agent
based modeling. Game theory is used toanalyze strategic interactions between agents and predict their
behavior. Machine leaning is used to train agents to improve their decision-making capabilities over
time. Agent-based modeling is used to simulate complex systems and study the interactions between
agents.
Overall, multi-agent systems are a powerful tool in artificial intelligence that can help solve complex
problems and improve efficiency in a variety of applications.
Hierarchical Agents
These agents are organized into a hierarchy, with high-level agents overseeing the behavior of lower-level
agents. The high-level agents providegoals and constraints, while the low-level agents carry out specific
tasks. Hierarchical agents are useful in complex environments with many tasks and sub-tasks.
Hierarchical agents are agents that are organized into a hierarchy, with high-level agents
overseeing the behavior of lower-level agents. The high-level agents provide goals and
structure allows for more
constraints, while the low-level agents carry out specific tasks. This
cfficicnt and organizcd decision-making in complex cnvironments.
variety of applications, including robotiCS,
Hierarchical agents can be implemented in a particularly useful in environments where
are
manutachuring, and transportation systems. They
need to be coordinated and prioritized.
there arc many tasks and sub-tasks that
goals and
system, the high-level agents are responsible for setting
In a hierarchical agent typically based on the
These goals and constraints are
constraints for the lower-]evel agents. high-level agents
of the system. For example, in a manufacturing system, the
overall objcctive lower-Jevel agents based on customer
demand.
might set production targets for the
set by the
responsible for carrying out specifictasks to achieve the goals
Ihe low-level agents are depending on the
agents. These tasks may be relatively simple or more complex, be
high-level
For example, in a transportation system, low-level agents might
specific application.
specific intersections.
responsible for managing traffic flow at
complexity of the
different levels, depending on the
Hierarchical agents can be organized into low-level agents.
simple system, there may be only two levels: high-level agents and
system. In a intermediate-level agents
may be multiple levels, with
In a more complex system, there lower-level agents.
responsible for coordinating the activities of
resources. By
that they allow for more efficient use of
One advantage of hierarchical agents is that are best suited
to allocate tasks to the agents
organizing agents into a hierarchy, it is possible efficient
duplication of effort. This can lead to faster, more
to carry them out, while avoiding system.
decision-making and better overall performance of the
intelligence that can help solve complex
Overall, hierarchical agents are a powerful tool in artificial
applications.
problems and improve efficiency in a variety of
Uses of Agents
artificial intelligence, including:
Agents are used in a wide range of applications in
automate tasks in manufacturing,
Robotics: Agents can be used to control robots and
transportation, and other industries.
lighting, and other systems
Smart homes and buildings: Agents can be used to control heating,
improving comfort.
in smart homes and buildings, optimizing energy use and
flow, optimize routes for
Transportation systems: Agents can be used to manage traffic
autonomous vehicles, and improve logistics and supply chain management.