Artificial Intelligence

Chapter 2
Intelligent Agents and Problem Formulation

Post Graduate Program in IT Engineering
Artificial Intelligence   •   Post Graduate

Intelligent Agents and Problem Formulation

Introduction and Context

Artificial intelligence is concerned not merely with producing outputs, but with designing systems that perceive circumstances, reason about possible actions, and act effectively in pursuit of objectives. The central abstraction used to study such systems is the intelligent agent. An agent may be a software service recommending a product, a robot navigating a warehouse, a diagnostic system supporting clinicians, or an autonomous vehicle interacting with traffic.

The agent perspective is valuable because it connects several dimensions of AI design: sensing, knowledge representation, search, planning, learning, decision-making, control, safety, and interaction. It also provides a disciplined way to formulate problems. Before selecting an algorithm, the designer must determine what the agent is trying to achieve, what it can observe, which actions it can perform, how the environment changes, and how success will be measured.

At postgraduate level, agent design requires more than identifying an input and an output. It requires analysis of uncertainty, partial observability, limited resources, autonomy, conflicting objectives, other agents, and the consequences of design choices. A system that performs well on a narrow benchmark may still be irrational in deployment if its performance measure is incomplete, its observations are biased, or its actions create unacceptable risks.

Learning Objectives

By the end of this chapter, students should be able to:

1. Define an intelligent agent and distinguish rationality from omniscience.

2. Specify an agent’s task environment using the PEAS framework.

3. Classify environments according to observability, determinism, structure, and agency.

4. Explain reflex, model-based, goal-based, utility-based, and learning-agent architectures.

5. Formulate AI problems using states, actions, transition models, goals, and path costs.

6. Analyze state spaces, abstraction, utility, autonomy, and computational constraints.

7. Design agents for uncertain and multi-agent environments.

8. Evaluate ethical, operational, and governance implications of agent design.

1. The Intelligent-Agent View

An agent is an entity that perceives its environment through sensors and acts upon that environment through actuators. A human uses eyes, ears, and other senses as sensors and hands, speech, and movement as actuators. A software agent may receive data through application programming interfaces, databases, cameras, or network messages and act by issuing commands, making recommendations, or changing digital records.

The agent function maps percept histories to actions:

f: P* → A

where P is the set of possible percepts, P\ is the set of finite percept sequences, and A* is the set of available actions. The function is a conceptual specification, not necessarily a table implemented explicitly. An agent program implements this function on a particular architecture.

The distinction between agent function, agent program, and architecture is important. The function describes the desired mapping from experience to action. The program is the algorithm or learned model that produces actions. The architecture is the computational platform on which the program runs, including sensors, memory, processors, and actuators.

Rationality

A rational agent selects an action expected to maximize its performance measure, given its percept sequence, prior knowledge, and available actions. Rationality is not the same as perfection. An agent may make a poor decision because information is incomplete, the future is uncertain, or computation is limited. It is rational if its decision was appropriate given what it could reasonably know and calculate at the time.

A useful expected-utility expression is:

a* = arg maxₐ E[U(Result | percept history, a)]

Here, a is a candidate action, U is a utility function, and E denotes expectation over uncertain outcomes. This expression applies when outcomes are uncertain and utilities can be represented meaningfully. In deterministic settings, the expectation may reduce to evaluation of a single predicted outcome. The equation does not imply that every real system can compute exact probabilities or utilities; it is a normative model for decision design.

Rationality depends on four factors:

  • the performance measure defining success;
  • the agent’s prior knowledge of the environment;
  • the actions available to the agent; and
  • the percept sequence received so far.

Omniscience would mean knowing the actual consequences of every action in advance. Real agents are not omniscient. Rational design therefore requires explicit treatment of uncertainty and the cost of information gathering.

Autonomy

An autonomous agent relies substantially on its own experience rather than exclusively on preprogrammed instructions. Autonomy is not binary. A system may be highly autonomous in routine navigation but require human authorization for exceptional or high-risk actions. Learning increases autonomy when it improves adaptation, but it also introduces risks: behavior may drift, learned correlations may be spurious, and accountability may become unclear.

2. Task Environment Specification: PEAS

A practical starting point for agent design is the PEAS framework:

  • Performance measure: criteria used to evaluate behavior.
  • Environment: the external context in which the agent operates.
  • Actuators: mechanisms through which the agent acts.
  • Sensors: mechanisms through which the agent perceives.

PEAS prevents a common design error: specifying a model or algorithm before defining what success means.

Example: Autonomous Delivery Vehicle

For an autonomous delivery vehicle, the performance measure might include safe arrival, delivery accuracy, travel time, energy consumption, legal compliance, passenger or pedestrian safety, and comfort. The environment includes roads, traffic, weather, maps, pedestrians, vehicles, regulations, and communication infrastructure. Actuators include steering, braking, acceleration, indicators, displays, and communication systems. Sensors may include cameras, radar, lidar, GPS, inertial sensors, and vehicle diagnostics.

These criteria can conflict. Minimizing travel time may encourage risky driving, whereas maximizing safety may produce excessive delays. A professional design must therefore define priorities, constraints, and acceptable trade-offs. Safety constraints should not be treated simply as interchangeable with convenience or revenue.

Performance Measures and Reward Signals

A performance measure is an external criterion for evaluating behavior over time. A reward signal is an internal or environmental signal used by a learning algorithm. They are related but not identical. If a reward is only a proxy for the real objective, the agent may optimize the proxy while harming the intended outcome. This is known as reward hacking or specification gaming.

For example, a customer-service agent rewarded solely for short call duration may terminate conversations prematurely. A broader performance measure should include resolution quality, customer satisfaction, fairness, and escalation appropriateness.

3. Properties of Task Environments

Environment classification influences architecture and algorithm choice.

Fully Observable and Partially Observable

An environment is fully observable when the agent’s sensors provide all information relevant to selecting an action. Chess is close to fully observable because the board is visible, although the opponent’s future intentions are not. A medical diagnosis environment is partially observable because the patient’s true condition cannot be directly observed and test results may be noisy.

In partially observable environments, the agent may maintain a belief state: a probability distribution or structured set of hypotheses about the current state. Decisions must then account for both action outcomes and information gain.

Deterministic and Stochastic

A deterministic environment has a predictable next state given the current state and action. In a stochastic environment, outcomes involve uncertainty. Weather, traffic, financial markets, and human behavior are stochastic from the agent’s operational perspective.

A distinction is useful between environmental randomness and ignorance. An environment may be deterministic in principle, but uncertainty may arise because the agent lacks complete information. Both cases require robust decision-making, although the appropriate models differ.

Episodic and Sequential

In an episodic environment, each decision episode is relatively independent of previous decisions. Image classification can be episodic if each image is processed independently. In a sequential environment, current actions affect future states and opportunities. Navigation, investment, and dialogue are sequential.

Sequential settings require planning and consideration of delayed consequences. A locally beneficial action may reduce long-term performance.

Static and Dynamic

A static environment does not change while the agent is deliberating. A dynamic environment changes independently of the agent. Real-time trading, robotics, and traffic management are dynamic. A semidynamic environment may remain physically unchanged while the performance measure changes with time, as in a timed examination.

Dynamic environments impose requirements for timely computation, monitoring, interruption handling, and safe fallback behavior.

Discrete and Continuous

A discrete environment has countable states, time steps, or actions, such as board games. A continuous environment has variables such as position, speed, temperature, or time. Many practical systems are hybrid: a robot may have continuous motion but discrete task modes.

Single-Agent and Multi-Agent

In a single-agent environment, other entities may be treated as passive features or stochastic events. In a multi-agent environment, other agents actively choose actions. Their behavior may be cooperative, competitive, strategic, or mixed. This changes the problem from simple planning to interaction and sometimes game-theoretic reasoning.

4. Agent Architectures

Simple Reflex Agents

A simple reflex agent selects an action using a condition–action rule based on the current percept, such as “if an obstacle is detected, brake.” Such agents are efficient and interpretable but fail when the current percept does not reveal the relevant state. They cannot reliably handle hidden information, delayed effects, or changing contexts.

Model-Based Reflex Agents

A model-based agent maintains an internal state that represents aspects of the world not currently observable. It uses a transition model describing how the world changes and a sensor model describing how observations relate to states. This architecture supports partial observability but depends on model quality and state-maintenance accuracy.

Goal-Based Agents

A goal-based agent considers future states and chooses actions that lead toward specified goals. Search and planning algorithms commonly implement this architecture. Goals provide a clear success condition but may not distinguish among several goal-achieving outcomes. For example, two routes may both reach a destination, although one is safer and less costly.

Utility-Based Agents

A utility-based agent ranks outcomes using a utility function. Utility permits trade-offs among speed, cost, risk, comfort, fairness, and other dimensions. It is especially useful when goals conflict or success is uncertain. Utility functions must be carefully elicited, validated, and monitored because an apparently precise numerical score can conceal important value judgments.

Learning Agents

A learning agent improves through experience. A classical learning-agent architecture contains:

  • a performance element, which selects actions;
  • a learning element, which improves the performance element;
  • a critic, which evaluates behavior against a performance standard; and
  • a problem generator, which proposes exploratory actions.

Learning introduces a trade-off between exploitation of known successful behavior and exploration of alternatives. In safety-critical contexts, exploration must be constrained by risk limits, simulation, human oversight, and rollback mechanisms.

5. Problem Formulation and State-Space Search

A well-formulated problem makes the relevant decision structure explicit. A classical search problem consists of:

1. Initial state: the starting situation.

2. Actions: actions available in a state.

3. Transition model: the state resulting from an action.

4. Goal test: a procedure determining whether a state satisfies the objective.

5. Path-cost function: the cumulative cost of a solution path.

A solution is an action sequence that transforms the initial state into a goal state. If a path contains actions a₁, a₂, …, aₖ, its cost is commonly represented as:

g(path) = Σᵢ c(sᵢ₋₁, aᵢ, sᵢ)

where c is the step-cost function and each step cost is non-negative in standard optimal-search settings. The formula applies when total path cost is additive. If costs depend on history or on complex interactions among actions, the state representation must be expanded or a different model must be used.

States and State Variables

A state is an abstraction of the world sufficient for predicting relevant consequences of actions and testing goals. It should omit irrelevant detail but preserve information necessary for sound decisions. An overly detailed state space causes computational explosion; an overly abstract state space produces invalid plans.

For a route-planning problem, a state might be the current location. For a delivery problem, it may need to include vehicle location, package locations, delivery status, fuel level, time, and traffic conditions. The correct representation depends on the objective and constraints.

State-Space Size and Branching

If the average branching factor is b and the shallowest solution depth is d, a rough upper bound on the number of nodes generated through depth d is:

1 + b + b² + … + bᵈ

For b ≠ 1, this equals (bᵈ⁺¹ − 1)/(b − 1). The expression assumes approximately uniform branching and is a growth estimate, not an exact count for every problem. It illustrates why abstraction, heuristic guidance, pruning, and decomposition are essential.

Problem Reduction and Abstraction

Abstraction removes details that do not affect the current decision. A map-routing system may initially use cities and roads rather than individual lane positions. Later, a lower-level controller handles lane changes and vehicle dynamics. This hierarchical decomposition reduces complexity while preserving appropriate interfaces between levels.

Abstraction is safe only when omitted details cannot invalidate the plan within the intended operating conditions. A route that is valid at city level may be infeasible because of road height restrictions, temporary closures, or vehicle battery limitations.

6. Utility, Preferences, and Decision Quality

Goals are often insufficient because they are binary: achieved or not achieved. Utility represents preferences over outcomes and supports comparison among alternatives. A utility model may include multiple attributes, but additive models require care. A simple weighted form is:

U(x) = Σⱼ wⱼ uⱼ(x)

where x is an outcome, uⱼ(x) is the normalized value of attribute j, and wⱼ is its weight. This representation is appropriate only when the attributes and preference structure justify additive aggregation. Weights should be elicited with stakeholders, tested through sensitivity analysis, and not interpreted as objective facts.

A rational agent should also consider the value of information. An observation or test may be worthwhile if its expected improvement in decision quality exceeds its cost, delay, privacy impact, or risk. In medical systems, for example, an additional test may reduce uncertainty but also create false positives, expense, or patient burden.

7. Agents Under Uncertainty and Partial Observability

A decision process under uncertainty requires a model of possible states, actions, observations, transition probabilities, and rewards or utilities. A Markov decision process assumes that the current state contains all information needed to predict future transitions and rewards; this is the Markov property. If the state is not fully observable, a partially observable Markov decision process represents uncertainty through belief states.

These models are useful abstractions, but their assumptions may be unrealistic. Transition probabilities can change, rewards may be difficult to specify, and the state may be too large to represent exactly. Approximation, simulation, robust optimization, and human judgment are therefore common in practice.

Robust agents should:

  • represent uncertainty rather than hiding it;
  • distinguish confidence from correctness;
  • monitor distributional changes;
  • define safe fallback actions;
  • record decisions and relevant evidence; and
  • permit human intervention where consequences are significant.

8. Multi-Agent Interaction

In multi-agent environments, an agent’s outcome depends partly on other agents’ choices. Examples include autonomous vehicles negotiating intersections, software agents allocating cloud resources, and recommendation systems competing for user attention.

Interaction may be:

  • cooperative, with shared objectives;
  • competitive, with conflicting objectives;
  • mixed-motive, where agents cooperate in some situations and compete in others; or
  • institutionally constrained, where rules, contracts, and authorities shape behavior.

A team of agents may coordinate through communication, shared plans, auctions, voting, contracts, or centralized assignment. Design questions include communication bandwidth, trust, identity, incentive compatibility, fault tolerance, and strategic manipulation.

A technically optimal policy may be socially unacceptable if it exploits other agents, creates unfair outcomes, or violates institutional rules. Multi-agent design therefore requires both performance analysis and governance analysis.

9. Case Study: Intelligent Warehouse Order Fulfilment

Background

Consider an illustrative case involving a large warehouse that uses mobile robots to retrieve products and deliver them to packing stations. The warehouse contains narrow aisles, human workers, changing inventory, charging stations, and time-sensitive orders.

Problem

The organization wants to reduce order-fulfilment time while maintaining worker safety, inventory accuracy, equipment availability, and fairness in workload distribution. Robots must operate despite incomplete maps, temporary obstructions, uncertain travel times, and human activity.

Analysis Using PEAS

The performance measure includes completed orders per hour, average fulfilment time, collision-free operation, battery efficiency, inventory accuracy, and successful handover. The environment includes shelves, products, workers, robots, floor markings, charging stations, alarms, and wireless infrastructure. Actuators include wheel motors, lights, audio alerts, robotic grippers, and communication modules. Sensors include lidar, cameras, wheel encoders, barcode readers, battery sensors, and wireless messages.

The environment is partially observable because sensors can be blocked and inventory records can be incorrect. It is dynamic because people and other robots move. It is stochastic because travel time, sensor readings, and human behavior are uncertain. It is multi-agent because robots and human workers interact.

Approach and Solution

A layered architecture is appropriate. A fleet-management layer assigns tasks and prevents congestion. A planning layer computes routes using a map and estimated travel costs. A local control layer avoids obstacles and follows safe motion constraints. A learning component estimates travel time and predicts congestion, but it does not independently override safety constraints.

The state representation for task assignment may include robot location, battery level, carried order, destination, and availability. The path cost can combine distance, estimated time, congestion, and battery consumption. Safety rules—such as maximum speed near workers and emergency stopping—are hard constraints rather than optional utility terms.

The system should use simulation and staged deployment before full operation. Performance should be evaluated not only by throughput but also by near misses, emergency stops, unequal workload, downtime, and error recovery. Logs should record sensor evidence, selected actions, model versions, and human overrides.

Outcome

In this illustrative scenario, the main improvement comes not from a single sophisticated algorithm but from aligning the performance measure, state representation, architecture, and safety governance. The organization avoids optimizing throughput at the expense of worker safety. It also maintains manual operating procedures for communication failures, blocked routes, and robot faults.

Learning Points

1. The correct architecture follows from environmental properties.

2. Performance measures must include safety and quality, not only speed.

3. State abstraction should preserve information needed for valid decisions.

4. Learning components require monitoring and bounded authority.

5. Multi-agent systems need coordination protocols and failure procedures.

10. Professional, Ethical, and Governance Considerations

Agent design is never purely technical. Performance measures encode institutional priorities. Data used by sensors or learning systems may reproduce social bias. An agent may allocate opportunities, deny services, or make recommendations with significant effects on individuals.

Important governance practices include:

  • clearly defining responsibility for system outcomes;
  • documenting intended use, limitations, and operating boundaries;
  • conducting risk and impact assessments;
  • protecting personal and sensitive data;
  • testing across relevant populations and environmental conditions;
  • monitoring for drift, bias, unsafe behavior, and specification gaming;
  • maintaining audit trails and incident-response procedures; and
  • providing meaningful human review for high-impact decisions.

Human oversight should be designed, not merely declared. If operators receive too many alerts, they may ignore them. If they cannot understand or challenge an automated decision, oversight is nominal rather than effective. Regulatory obligations vary by jurisdiction and application, but principles of safety, accountability, transparency, privacy, and non-discrimination are broadly relevant.

11. Contemporary Developments and Best Practices

Modern AI agents increasingly combine language models, external tools, retrieval systems, planners, simulators, and conventional control software. Such systems can perform flexible reasoning but may produce incorrect claims, select inappropriate tools, or pursue poorly specified objectives. Tool permissions should therefore follow least-privilege principles, and important actions should require validation.

Best practices for agent engineering include:

1. Begin with PEAS and an explicit risk assessment.

2. Define measurable outcomes, constraints, and unacceptable failures.

3. Separate perception, state estimation, planning, execution, and monitoring.

4. Use simulations and adversarial tests before deployment.

5. Validate assumptions about observability, stationarity, and other agents.

6. Prefer interpretable rules for hard safety constraints.

7. Apply uncertainty estimates and confidence thresholds.

8. Design graceful degradation and safe shutdown behavior.

9. Monitor real-world performance after deployment.

10. Reassess the problem formulation when operating conditions change.

Challenges and Limitations

Agent models simplify reality. A state may omit socially relevant context; a utility function may reduce complex values to inadequate numbers; a probability estimate may be poorly calibrated; and a planner may assume that other agents behave predictably. Computational complexity limits exact reasoning in large spaces. Distribution shift can make a system’s learned policy unreliable outside training conditions. Strategic agents may manipulate communication or exploit weaknesses in reward structures.

There is also a fundamental organizational challenge: different stakeholders may disagree about what counts as success. Technical optimization cannot resolve value conflicts by itself. These limitations reinforce the need for iterative formulation, stakeholder engagement, empirical validation, and governance throughout the system lifecycle.

Chapter Summary

An intelligent agent perceives an environment and acts through actuators. Rationality means selecting actions expected to achieve the specified performance measure, given available information and computational resources; it does not imply omniscience. The PEAS framework identifies performance, environment, actuators, and sensors and provides a foundation for requirements analysis.

Environment properties—including observability, determinism, episodic structure, dynamism, continuity, and the presence of other agents—strongly influence architecture. Simple reflex, model-based, goal-based, utility-based, and learning agents provide progressively richer mechanisms for handling state, objectives, uncertainty, and adaptation.

Problem formulation defines initial states, actions, transition models, goal tests, and path costs. Good state abstraction reduces complexity while retaining information necessary for valid decisions. Utility models support trade-offs, but their assumptions and value judgments require scrutiny. Partial observability and uncertainty motivate belief states, probabilistic models, robust policies, and safe fallback behavior. Multi-agent environments require coordination, incentives, communication, and governance.

Effective agent design combines algorithms with performance engineering, safety analysis, monitoring, human oversight, and ethical accountability. The quality of the formulation often matters as much as the sophistication of the algorithm.

Key Terms

Agent: An entity that perceives an environment and acts upon it.

Agent architecture: The computational platform and mechanisms supporting an agent program.

Agent function: A mapping from percept histories to actions.

Autonomy: The degree to which an agent operates using its own experience rather than direct human programming.

Belief state: A representation of uncertainty about the current state of the environment.

Environment: The external context in which an agent operates.

Goal test: A procedure that determines whether a state satisfies a desired objective.

Intelligent agent: An agent designed to select actions appropriate to its objectives and information.

Learning agent: An agent that improves its behavior through experience.

Markov property: The assumption that the current state contains sufficient information to predict relevant future behavior.

Multi-agent system: A system containing multiple interacting agents.

PEAS: Performance measure, environment, actuators, and sensors.

Performance measure: An external criterion used to evaluate an agent’s behavior.

Path cost: The accumulated cost of actions in a solution path.

Problem formulation: The formal specification of states, actions, transitions, goals, and costs.

Rationality: Selecting an action expected to maximize performance given available information and resources.

State space: The collection of states reachable or considered in a problem.

Utility: A numerical or formal representation of preferences over outcomes.

Transition model: A description of how an action changes a state.

Review Questions

Short Answer Questions

1. What is the difference between an agent function and an agent program?

2. Explain the four components of the PEAS framework.

3. Why is rationality different from omniscience?

4. What is the purpose of a transition model in problem formulation?

5. Define partial observability and give one example.

Long Answer Questions

1. Compare simple reflex, model-based, goal-based, utility-based, and learning-agent architectures. Explain the environmental conditions under which each is appropriate.

2. Discuss how performance measures influence the behavior of an intelligent agent. Include the risks of proxy rewards and specification gaming.

3. Explain the major properties used to classify task environments and analyze their implications for agent design.

4. Describe state-space problem formulation and explain why abstraction is necessary for large AI problems.

5. Discuss the ethical and governance requirements for deploying autonomous agents in high-impact environments.

Analytical / Application Questions

1. Design a PEAS description for an AI-based hospital bed-allocation agent. Identify at least two conflicting performance objectives and explain how they could be managed.

2. A delivery robot operates in a building with moving people, unreliable wireless communication, and changing obstacles. Classify the environment and propose an appropriate layered architecture.

3. Formulate a search problem for scheduling examination rooms. Specify the state, actions, transition model, goal test, and path-cost function, and explain one abstraction that could reduce computational complexity.

Multiple Choice Questions with Answers

Question 1

Which statement best defines a rational agent?

A. An agent that always predicts the future perfectly

B. An agent that selects actions expected to maximize its performance measure given available information

C. An agent that follows fixed rules without regard to context

D. An agent that never makes an incorrect decision

Correct Answer: B. An agent that selects actions expected to maximize its performance measure given available information

Question 2

In the PEAS framework, which element describes how an agent evaluates success?

A. Performance measure

B. Environment

C. Actuators

D. Sensors

Correct Answer: A. Performance measure

Question 3

Which environment property means that the agent cannot directly access all relevant information about the current state?

A. Deterministic

B. Sequential

C. Partially observable

D. Episodic

Correct Answer: C. Partially observable

Question 4

What is the main limitation of a simple reflex agent?

A. It requires a utility function for every action

B. It cannot use any sensors

C. It cannot reliably handle situations where the current percept is insufficient

D. It always requires multi-agent communication

Correct Answer: C. It cannot reliably handle situations where the current percept is insufficient

Question 5

Which component determines whether a state satisfies the objective in a classical search problem?

A. Transition model

B. Goal test

C. Actuator model

D. Problem generator

Correct Answer: B. Goal test

Question 6

If the average branching factor is 3 and the shallowest solution depth is 2, how many nodes are included in the sum through that depth, assuming the root is depth 0?

A. 6

B. 9

C. 12

D. 13

Correct Answer: D. 13

Question 7

Why might a utility-based agent be preferred over a goal-based agent?

A. It eliminates the need for sensors

B. It can rank different outcomes and represent trade-offs

C. It guarantees omniscient decisions

D. It can operate only in deterministic environments

Correct Answer: B. It can rank different outcomes and represent trade-offs

Question 8

What is a belief state used to represent?

A. The exact future action sequence of another agent

B. Uncertainty about the current state of the environment

C. The physical design of an actuator

D. A list of all possible performance measures

Correct Answer: B. Uncertainty about the current state of the environment

Question 9

Which feature most clearly makes warehouse robot operation a multi-agent environment?

A. The robots use batteries

B. The warehouse has shelves

C. Robots and humans or other robots affect one another’s actions

D. The robots have discrete task labels

Correct Answer: C. Robots and humans or other robots affect one another’s actions

Question 10

Which is an appropriate governance practice for a high-impact autonomous agent?

A. Remove all human intervention to improve consistency

B. Optimize only the easiest metric to measure

C. Maintain monitoring, audit trails, and meaningful human review

D. Allow unrestricted exploration after deployment

Correct Answer: C. Maintain monitoring, audit trails, and meaningful human review

Artificial Intelligence
Chapter 2 of 15