Intelligent Agents and Environments
The Agent Model: PEAS, Sensors, Actuators, and Rationality · 18 min
Russell and Norvig define an agent, in the most general terms, as anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators — a definition broad enough to cover a human (eyes and ears as sensors, hands and legs as actuators), a robot (cameras and range-finders as sensors, motors as actuators), or a software agent (keystrokes and file contents as percepts, screen output as actions) within one unified framework (Russell & Norvig, AIMA, ch. 2). To make this framework usable for actual design work, AIMA introduces the PEAS framework — Performance measure, Environment, Actuators, Sensors — as a checklist for specifying any agent's task fully before attempting to build it: for a self-driving taxi, the performance measure might weigh safety, speed, legality, and passenger comfort; the environment includes roads, other traffic, and pedestrians; the actuators are steering, acceleration, and braking; and the sensors include cameras, GPS, and speedometers (AIMA agent taxonomy).
Central to this model is a precise definition of rationality that deliberately avoids requiring omniscience or perfection. For each possible percept sequence, a rational agent should select whichever action is expected to maximize its performance measure, given the evidence the percept sequence provides and whatever built-in knowledge the agent has — which means a rational agent can still act 'wrong' in hindsight if an outcome was genuinely unforeseeable from its percepts, without that failure making the agent irrational (AIMA agent taxonomy). This distinction matters enormously in practice: a self-driving car that brakes appropriately for a pedestrian it could reasonably have detected is rational even if a freak mechanical failure still causes a collision, whereas one that ignores a clearly visible obstacle is not, regardless of the outcome in either case. Rationality, in other words, is evaluated against the decision the agent faced at the time, not against the outcome revealed only afterward — a distinction that keeps the definition useful even in environments where perfect prediction is impossible.
AIMA further organizes agents into a spectrum of increasing sophistication. Simple reflex agents act only on the current percept via condition-action rules, ignoring history entirely; model-based reflex agents maintain an internal state representing unobserved aspects of the world, updated as new percepts arrive; goal-based agents additionally consider future consequences of actions relative to an explicit goal, enabling search and planning; and utility-based agents go further still, choosing among multiple ways of achieving a goal by a utility function that expresses degree of preference across possible states rather than a binary success condition (AIMA agent taxonomy). This utility-based framing is the direct conceptual ancestor of reinforcement learning, where an agent learns a policy that maximizes expected cumulative reward through interaction with its environment rather than following a fixed rule set (Sutton & Barto, Reinforcement Learning: An Introduction) — and Tom Mitchell's classic definition of machine learning, that a program 'learns' if its performance on a task improves with experience as measured by some performance metric, describes precisely what separates a learning agent from the fixed-rule reflex agents earlier in the spectrum (Mitchell definition, CMU).
Task Environments: Properties that Shape Agent Design · 18 min
Not every environment poses the same engineering challenge, and AIMA's agent taxonomy defines a set of dimensions along which task environments can be classified, each of which directly affects how hard it is to build a rational agent for that task. An environment is fully observable if the agent's sensors give it complete access to the state relevant to choosing an action at every point (as in chess, where the whole board is visible), and partially observable otherwise (as in poker, where opponents' hands are hidden, or in driving, where sensors have blind spots and limited range). An environment is deterministic if the next state is completely determined by the current state and the agent's action, and stochastic if there is genuine uncertainty in outcomes — self-driving in traffic is stochastic because other drivers' behavior cannot be predicted with certainty, while a puzzle like Rubik's Cube is deterministic (AIMA agent taxonomy). These two dimensions alone already explain a great deal of practical difficulty: partial observability forces an agent to reason about hidden state, and stochasticity forces it to reason about probability distributions over outcomes rather than single certain futures. A designer who mistakes a partially observable, stochastic task for a fully observable, deterministic one risks building an agent that behaves confidently but incorrectly, because it is implicitly assuming access to information it does not actually have.
A second cluster of properties concerns time and structure. An environment is episodic if each 'episode' consists of the agent perceiving and then performing a single action, with subsequent episodes not depending on actions taken in previous ones — an image-classification system that labels each photo independently is episodic — whereas a sequential environment requires current decisions to account for their effect on future decisions, as in chess, where a move's value depends on the resulting position many moves later. An environment is static if it does not change while the agent is deliberating, and dynamic if it can — crossword puzzles are static (they wait for you to think), while driving is dynamic (the world keeps moving whether or not the agent has finished computing). Environments are further classified as discrete or continuous depending on whether the set of percepts, actions, and states is finite and distinct or continuously varying (AIMA agent taxonomy).
Finally, environments differ in whether a single agent or multiple agents are present, and, when multiple agents are present, whether their interaction is competitive (as in chess, where one agent's gain is the other's loss), cooperative (as in a team of delivery robots), or a mix of both. AIMA notes that the hardest case for agent design combines several of these dimensions at once: real-world driving is partially observable, stochastic, sequential, dynamic, continuous, and multi-agent simultaneously, which is precisely why building a fully rational self-driving agent remains vastly more difficult than building one for chess (fully observable, deterministic, sequential, static, discrete, and adversarially two-agent) despite chess being popularly regarded as the harder intellectual challenge for humans. Understanding an environment's properties before designing an agent is therefore not an academic exercise — it directly predicts which techniques (exhaustive search versus probabilistic reasoning versus real-time re-planning) will actually be viable. A team that starts designing a self-driving agent using chess-style exhaustive search, without first recognizing how many of these harder properties driving stacks at once, is likely to build something that works in a simulator and fails on a real road.
The Agent-Environment Loop
An agent perceives its environment through sensors and changes it through actuators, choosing actions to maximize its performance measure.
- PEAS (Performance, Environment, Actuators, Sensors) is the checklist AIMA uses to fully specify an agent's task before design begins.
- Rationality is judged relative to the agent's percept sequence and available knowledge, not to omniscience — a rational agent can still get unlucky.
- An environment's properties (observability, determinism, episodic/sequential, static/dynamic, discrete/continuous, single/multi-agent) predict which techniques will actually work — real-world driving is hard precisely because it stacks nearly all the difficult properties at once.
Recall Practice
Glossary
- Agent
- Anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators.
- PEAS
- Performance measure, Environment, Actuators, Sensors — a framework for fully specifying an agent's task before designing the agent.
- Rational agent
- An agent that, for each percept sequence, selects the action expected to maximize its performance measure given the evidence provided and its available knowledge.
- Percept sequence
- The complete history of everything an agent has perceived, up to and including the current percept.
- Partially observable environment
- An environment in which an agent's sensors do not give it complete access to the state relevant to choosing an action at every point.
- Utility-based agent
- An agent that chooses among multiple ways of achieving a goal using a utility function expressing degree of preference across possible states, rather than a binary success condition.
PEAS and Environment Property Grid
This is a virtual, worksheet-based classification exercise using four short scenario descriptions supplied in the module (an automated email spam filter, a described self-driving car scenario, a poker-playing program, and a home thermostat) — no live software, robot, or real-world data collection is involved. Learners fill in a supplied grid, specifying each scenario's Performance measure, Environment, Actuators, and Sensors (PEAS), then classify each environment along the six property axes covered in Lesson 2 (observability, determinism, episodic/sequential, static/dynamic, discrete/continuous, single/multi-agent), justifying each classification in one sentence.
Ready to test yourself?
5 questions on this module.