Task Environments & the PEAS Framework
Prerequisites
- Agents & Environments — Agent definition, sensors, actuators
- Rationality — Performance measure concept
🎯 Learning Objectives
- Apply the PEAS framework (Performance, Environment, Actuators, Sensors) to any agent
- Classify environments using six properties: Observable, Deterministic, Episodic, Static, Discrete, Single/Multi-agent
- Analyze real-world systems using PEAS and environment properties
- Identify how environment properties influence agent design
- Solve GATE questions on task environment classification
1. The PEAS Framework
Before designing an intelligent agent, we must fully specify its task environment. The PEAS framework provides a systematic way to do this.
PEAS stands for:
- Performance measure — How success is evaluated
- Environment — The external world the agent operates in
- Actuators — How the agent affects the environment
- Sensors — How the agent perceives the environment
Specifying PEAS completely defines the task environment—the “problem” to which the agent is the “solution.” Different task environments require different agent designs.
1.1 PEAS Analysis: Automated Taxi Driver
| Component | Description |
|---|---|
| Performance | Safely reaching the destination, minimizing travel time, obeying traffic laws, passenger comfort, maximizing fare revenue |
| Environment | Roads, other vehicles, pedestrians, traffic signals, weather, passengers, road signs, construction zones |
| Actuators | Steering wheel, accelerator, brakes, turn signals, horn, display screen (for passenger communication) |
| Sensors | Cameras (front, rear, side), LIDAR, radar, GPS, speedometer, odometer, accelerometer, microphone, engine sensors |
1.2 PEAS Analysis: Medical Diagnosis System
| Component | Description |
|---|---|
| Performance | Correct diagnosis (accuracy), patient health outcomes, minimizing unnecessary tests, cost-effectiveness |
| Environment | Patient population, hospital/clinic, available tests and treatments, disease prevalence, medical knowledge base |
| Actuators | Display diagnosis on screen, recommend tests, suggest treatments, generate reports, send alerts |
| Sensors | Keyboard/form input (symptoms), electronic health records, lab test results, medical imaging data, patient questionnaires |
1.3 PEAS Analysis: Satellite Image Analysis System
| Component | Description |
|---|---|
| Performance | Classification accuracy, coverage of area, speed of processing, false positive/negative rates |
| Environment | Satellite imagery, geographic regions, atmospheric conditions, different land types, time of day/year |
| Actuators | Display annotated images, output classification labels, generate maps, send notifications for anomalies |
| Sensors | Satellite image feed (multispectral, infrared, optical), metadata (coordinates, timestamp, resolution), weather data |
2. Properties of Task Environments
Russell & Norvig identify six key properties that characterize any task environment. These properties are critical for GATE because they determine which agent architecture is appropriate.
Remember the six properties with ODESSA:
Observable • Deterministic • Episodic • Static • diScrete • Agents (single/multi)
2.1 Fully Observable vs. Partially Observable
An environment is fully observable if the agent’s sensors give it access to the complete state of the environment at each point in time. The agent does not need to maintain any internal state (memory) to keep track of the world.
An environment is partially observable if the agent cannot see the entire state—due to noisy sensors, inaccurate sensors, or parts of the state that are simply not detectable. The agent needs to maintain internal state (a model of the world) to track unobserved aspects.
If the agent has no sensors at all, the environment is unobservable. The agent must act based solely on prior knowledge.
Examples:
- Fully observable: Chess (both players can see the entire board)
- Partially observable: Poker (you cannot see opponents’ cards), driving (you cannot see around corners)
- Unobservable: A robot navigating in complete darkness without any sensors
2.2 Deterministic vs. Stochastic
An environment is deterministic if the next state is completely determined by the current state and the agent’s action. There is no randomness.
An environment is stochastic if there is randomness or uncertainty in the outcome of actions. The next state is partly determined by random factors.
Sometimes called nondeterministic when outcomes are uncertain but not described by explicit probabilities (as opposed to stochastic, which implies probabilistic modeling).
Note: If the environment is partially observable, it may appear stochastic to the agent even if it is actually deterministic (because the agent cannot see all the relevant state). This is called being strategic in some texts.
Examples:
- Deterministic: Chess, vacuum cleaner world (without random dirt)
- Stochastic: Backgammon (dice rolls), poker, real-world driving (other drivers’ actions are unpredictable)
2.3 Episodic vs. Sequential
An environment is episodic if the agent’s experience is divided into independent episodes. Each episode consists of perceiving and then performing a single action. The action in one episode does not affect subsequent episodes. The agent does not need to plan ahead.
An environment is sequential if the current decision can affect all future decisions. The agent must think ahead because actions have long-term consequences. Sequential environments require planning.
Examples:
- Episodic: Image classification (classifying one image doesn’t affect the next), spam detection (each email is independent), quality inspection on an assembly line
- Sequential: Chess (each move affects future moves), driving (steering affects future position), medical treatment (treatment affects future health state)
2.4 Static vs. Dynamic
An environment is static if it does not change while the agent is deliberating (deciding what to do). The agent can take as long as it wants to make a decision without the world changing.
An environment is dynamic if it can change while the agent is thinking. The agent must decide quickly or accept that the world may have changed by the time it acts.
An environment is semidynamic if the environment itself does not change with time, but the agent’s performance score changes. Example: timed chess—the board doesn’t change while you think, but your clock is ticking.
Examples:
- Static: Crossword puzzles, solved-state Rubik’s cube analysis
- Semidynamic: Chess with a time clock, timed exams
- Dynamic: Driving (traffic moves), real-time strategy games, stock trading
2.5 Discrete vs. Continuous
An environment is discrete if there are a finite (countable) number of distinct states, percepts, and actions. The state space is countable.
An environment is continuous if states, percepts, or actions vary continuously (e.g., real-valued sensor readings, continuous steering angles).
Examples:
- Discrete: Chess (finite board positions), tic-tac-toe, vacuum world
- Continuous: Driving (continuous steering angle, speed, position), robot navigation in physical space, voice recognition (continuous audio signals)
2.6 Single-Agent vs. Multi-Agent
An environment with only one agent operating. The agent doesn’t need to model other agents’ behavior.
An environment with multiple agents. Multi-agent environments can be:
- Competitive: Agents have opposing goals (e.g., chess, Go)
- Cooperative: Agents work toward a shared goal (e.g., robot swarms)
- Mixed: Some competition and some cooperation (e.g., traffic—everyone wants to reach their destination, but must cooperate to avoid accidents)
Examples:
- Single-agent: Crossword puzzle, solo Sudoku
- Multi-agent competitive: Chess, poker, Go
- Multi-agent cooperative: Robot soccer team, warehouse robot fleet
- Multi-agent mixed: Autonomous driving (other cars are agents)
3. Environment Properties — Master Comparison Table
| Task Environment | Observable | Deterministic | Episodic | Static | Discrete | Agents |
|---|---|---|---|---|---|---|
| Chess (with clock) | Fully | Deterministic | Sequential | Semi | Discrete | Multi |
| Chess (no clock) | Fully | Deterministic | Sequential | Static | Discrete | Multi |
| Poker | Partially | Stochastic | Sequential | Static | Discrete | Multi |
| Backgammon | Fully | Stochastic | Sequential | Static | Discrete | Multi |
| Taxi driving | Partially | Stochastic | Sequential | Dynamic | Continuous | Multi |
| Medical diagnosis | Partially | Stochastic | Sequential | Dynamic | Continuous | Single |
| Image classification | Fully | Deterministic | Episodic | Static | Discrete | Single |
| Vacuum cleaner (2 sq) | Fully | Deterministic | Sequential | Static | Discrete | Single |
| Assembly-line inspection | Partially | Stochastic | Episodic | Dynamic | Continuous | Single |
| Interactive English tutor | Partially | Stochastic | Sequential | Dynamic | Discrete | Multi |
The most commonly asked environment properties in GATE are Observable and Deterministic. Expect questions like: “Which of the following environments is partially observable and stochastic?” Always justify your classification by identifying what information the agent cannot see (for partial observability) and what randomness exists (for stochasticity).
4. How Properties Affect Agent Design
| Property | Easier Setting | Harder Setting | Design Implication |
|---|---|---|---|
| Observable | Fully | Partially | Partial observability requires internal state / memory |
| Deterministic | Deterministic | Stochastic | Stochastic environments require probabilistic reasoning |
| Episodic | Episodic | Sequential | Sequential environments require planning and lookahead |
| Static | Static | Dynamic | Dynamic environments require fast real-time decisions |
| Discrete | Discrete | Continuous | Continuous environments often need approximation / discretization |
| Agents | Single | Multi | Multi-agent requires game theory / coordination |
The hardest environments (partially observable, stochastic, sequential, dynamic, continuous, multi-agent) require the most complex agent designs. Real-world environments like autonomous driving exhibit all these “hard” properties simultaneously.
5. Worked Examples
Question: Perform a complete PEAS analysis and environment classification for an online shopping recommendation system (like Amazon’s “Customers who bought this also bought”).
Solution:
PEAS:
- Performance: Click-through rate, purchase conversion rate, customer satisfaction, revenue generated
- Environment: Users, product catalog, purchase history, browsing history, reviews, pricing, competitors
- Actuators: Display recommended products, adjust ranking of suggestions, send notification emails
- Sensors: User click data, purchase logs, browsing history, search queries, ratings/reviews, session duration
Environment classification:
- Partially observable: The system cannot see the user’s true preferences, mood, or intent—only their behavior.
- Stochastic: User behavior is unpredictable and influenced by many external factors.
- Sequential: Recommendations affect what the user sees next, which affects future clicks and purchases.
- Dynamic: New products are added, prices change, user preferences evolve.
- Discrete: Products, users, and actions (click/buy/ignore) are countable.
- Multi-agent: Other users influence recommendations (collaborative filtering); competitors offer alternatives.
Question: Classify the environment for an AI that solves crossword puzzles.
Solution:
- Fully observable: The agent can see all the clues and the current state of the grid.
- Deterministic: Filling in a letter produces a known, certain result.
- Sequential: Filling one word constrains other words (shared letters).
- Static: The puzzle doesn’t change while the agent thinks.
- Discrete: Finite grid cells, finite alphabet of letters.
- Single-agent: Only one solver.
Classification: Fully observable, Deterministic, Sequential, Static, Discrete, Single-agent.
Question: A high-frequency trading bot buys and sells stocks milliseconds apart. Classify its environment.
Solution:
- Partially observable: The bot sees market data (prices, volumes) but not other traders’ strategies, hidden orders, or upcoming news events.
- Stochastic: Market movements are inherently unpredictable and influenced by countless factors.
- Sequential: Each trade affects the portfolio, which influences future trading decisions.
- Dynamic: Prices change continuously, even while the bot is computing.
- Continuous: Prices are real-valued; time is continuous; trade quantities can be fractional.
- Multi-agent: Thousands of other trading bots and human traders operate simultaneously.
Classification: Partially observable, Stochastic, Sequential, Dynamic, Continuous, Multi-agent — this is one of the hardest possible environment configurations.
6. GATE-Style Questions
Question: The game of chess (without a clock) is best described as:
(A) Partially observable, stochastic, sequential
(B) Fully observable, deterministic, sequential
(C) Fully observable, stochastic, episodic
(D) Partially observable, deterministic, episodic
Answer: (B). Both players can see the entire board (fully observable), moves produce deterministic outcomes (deterministic), and each move affects future moves (sequential).
Question: Consider a robot vacuum cleaner operating in a large office building during working hours. People may move furniture, spill coffee, or close doors. Classify this environment on all six PEAS environment properties. Justify each.
Answer:
- Partially observable: The robot cannot see all rooms simultaneously; it has limited sensor range.
- Stochastic: People spilling coffee or moving furniture introduces randomness.
- Sequential: Cleaning one room affects where to go next; dirt accumulates over time.
- Dynamic: The environment changes while the robot cleans (people move things, doors open/close).
- Continuous: The robot moves in continuous physical space with continuous sensor readings.
- Multi-agent: People are effectively other agents that modify the environment.
7. Common Mistakes & Misconceptions
These are different properties. A partially observable environment means the agent can’t see everything. A stochastic environment means actions have random outcomes. Chess is fully observable but deterministic. Poker is partially observable AND stochastic. An environment can be partially observable but deterministic (e.g., a robot in a dark room with no randomness).
Chess (without a clock) is static, not dynamic. The board doesn’t change while you’re thinking. The opponent waits for your move. With a clock, it’s semidynamic (the clock ticks, affecting performance, but the board itself doesn’t change).
If current actions affect future states, the environment is sequential. If each decision is independent, it’s episodic. In spam detection, classifying one email usually doesn’t affect the next (episodic). In chess, each move changes the future (sequential). When in doubt, ask: “Does the current action matter for future decisions?”
📚 Summary
- PEAS (Performance, Environment, Actuators, Sensors) fully specifies a task environment.
- Six environment properties (ODESSA): Observable, Deterministic, Episodic, Static, Discrete, Agents.
- Fully observable = agent sees all state; partially observable = agent has incomplete information.
- Deterministic = no randomness; stochastic = uncertainty in outcomes.
- Episodic = independent decisions; sequential = decisions affect future.
- Static = environment doesn’t change during deliberation; dynamic = environment changes in real-time.
- Discrete = countable states/actions; continuous = real-valued states/actions.
- Single-agent = one agent; multi-agent = competitive, cooperative, or mixed.
- The hardest environments combine all the “difficult” properties (partially observable, stochastic, sequential, dynamic, continuous, multi-agent).
References
- Russell, S. & Norvig, P. (2020). Artificial Intelligence: A Modern Approach (4th ed.). Pearson. — Chapter 2, Section 2.3.
- Poole, D. & Mackworth, A. (2017). Artificial Intelligence: Foundations of Computational Agents (2nd ed.). — Chapter 2.2.