Nerd For Tech

NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit https://www.nerdfortech.org/.

Intelligent Agents

Matthew Clark
Nerd For Tech
Published in
5 min readJan 19, 2025

--

An agent can perceive its environment through sensors and act on the environment through actuators. Sensors can receive data from the environment such as a camera or microphone. Actuators can interact with the environment based on data received by the sensors. An example of an actuator would be wheels or a speaker.

An agent’s percept sequence is the history of what the agent has perceived through its sensors. The agent’s behavior is described as the agent function, which maps any percept sequence to an action. The agent function is then implemented by an agent program. It is important to note the two separate ideas here. An agent function is an abstract description and the agent program is a concrete implementation.

A rational agent is an agent that follows the notion of doing the right thing. Since doing the right thing has many different possible meanings AI uses the notion of consequentialism to determine what the right thing is. This means that we judge the agent's actions based on the consequences. If the actions result in a desirable consequence we say the agent has done well. This is captured by a performance measure that evaluates the actions. This leads to the definition of a rational agent. A rational agent is one that selects an action that is expected to maximize its performance measure based on the evidence provided by the percept sequence and the built-in knowledge that the agent has.

An important part of a rational agent is information gathering. We define information gathering as doing an action to modify future percepts. The definition of a rational agent also requires that the agent learn as much as it can from what it perceives. The agent’s initial setup could reflect prior knowledge of the environment but the agent should modify its setup based on gained experience. A rational agent should be autonomous and should learn what it can to fill the gaps left by partial or incorrect prior knowledge.

A task environment is the problem that a rational agent must solve. We define the task environment of an agent by the performance measure, the environment, and the agent’s actuators and sensors. When designing an agent it is important to always start by defining the task environment as much as possible. We can determine the task environment by looking at the dimensions by which it can be categorized.

If the agent’s sensors give it the full state of the environment we say the task environment is fully observable. A fully observable task environment is one where the sensors detect all aspects of the environment that are relevant to the choice of action. Otherwise, the task environment is considered partially observable.

An agent that is working by itself is called a single agent. An example of this is an agent that solves crossword puzzles. An agent can also be multiagent when it interacts with other agents. There are also multiple types of multiagent relationships. A competitive multiagent environment is one where agents fight to maximize their performance measures. An example is when two agents play chess and only one can win. In a cooperative multiagent environment, agents work together to maximize their performance measures. Self-driving cars work together to avoid collisions which maximizes their performance measures.

In a deterministic environment, the next state of the environment is known by the current state. If this is not the case the environment is nondeterministic. The environment is known as nondeterministic if the possibilities are listed without being quantified whereas a stochastic environment is defined with probabilities.

An episodic task environment is one where the agent’s experience is split into episodes. In each episode, the agent receives percept and acts. Each episode is independent of the other episode's actions. A sequential task environment is dependent on past actions and the current decision could affect future decisions. An example of a sequential task environment is chess.

The environment can be dynamic, changing over time, or static, remaining constant. It can also be discrete, with a finite number of states, or continuous, with an infinite number of states. Additionally, the environment may be known or unknown. For example, in a card game, you know the rules but not the cards that are yet to be revealed. When playing a video game for the first time, you can see the entire game state but may not understand the functions of various elements until you interact with them.

The role of AI is to design an agent program that implements the agent function. This is assumed to be run on physical hardware with sensors and actuators and is called the agent architecture.

The simple reflex agent is as suggested by the name the most simple of agents. They act based on their current perceptions and ignore any percept history.

Model-based reflex agents handle partial observability by maintaining an internal state based on percept history, which helps them infer unobserved aspects of the environment. There are two major models for this type of agent. The transition model describes how the world changes over time, including the effects of the agent’s actions and independent world changes. The sensor model maps the world’s state to the agent’s percepts, helping the agent interpret sensory data. The models enable the agent to track the world’s state and make informed decisions.

A goal-based agent goes beyond just understanding the current state of the environment. They also consider their goals to make decisions. These agents use a model of the world and goal information to choose actions that achieve their goals. While some decisions are straightforward, others may require planning and searching to find the best action sequence. Unlike reflex agents, goal-based agents consider the future consequences of their actions to achieve their goals, making them more flexible and adaptable.

Utility-based agents go further than simple goal achievement by using a performance measure called a utility function to evaluate different actions and outcomes. This allows them to make decisions that maximize expected utility, considering factors like speed, safety, and cost. Utility-based agents are more flexible and can handle conflicting goals and uncertain environments better than goal-based agents. They choose actions that maximize their expected utility, making them rational according to the external performance measure.

Learning agents improve their performance by continuously modifying their behavior based on feedback from the environment. They consist of four main components: the learning element, which updates the agent’s behavior; the performance element, which selects actions; the critic, which provides feedback on performance; and the problem generator, which suggests actions to gain new experiences. This allows learning agents to adapt to unknown environments and become more competent over time.

Agent programs consist of components that answer questions like “What is the world like now?” and “What action should I do now?” These components can represent the environment in different ways, ranging from atomic (simple, indivisible states) to factored (states split into variables) to structured (states with explicit relationships between objects). The choice of representation affects the complexity and expressiveness of the agent’s knowledge. Additionally, representations can be localist (one-to-one mapping to memory locations) or distributed (spread over multiple memory locations), with distributed representations being more robust against noise and information loss.

--

--

Nerd For Tech
Nerd For Tech

Published in Nerd For Tech

NFT is an Educational Media House. Our mission is to bring the invaluable knowledge and experiences of experts from all over the world to the novice. To know more about us, visit https://www.nerdfortech.org/.

Matthew Clark
Matthew Clark

No responses yet