To design an agent we must first specify its task environment precisely, then understand what kind of environment it is.

PEAS Description

A task environment is specified by PEAS: Performance measure, Environment, Actuators and Sensors. For an automated taxi driver: performance measure (safe, fast, legal, comfortable trip, low fuel use); environment (roads, other traffic, pedestrians, customers); actuators (steering, accelerator, brake, indicators, horn, display); sensors (cameras, radar, GPS, speedometer, odometer, accelerometer, microphone). For a medical diagnosis system: performance (healthy patient, low cost); environment (patient, hospital, staff); actuators (display of questions, tests, diagnoses, treatments); sensors (keyboard entry of symptoms, findings). For a spam filter: performance (few mistakes); environment (mailbox); actuators (mark as spam); sensors (incoming mail).

Definition: PEAS. The four-part specification of a task environment: Performance measure, Environment, Actuators and Sensors.

Properties of Environments

Fully observable versus partially observable: the sensors give access to the complete state (chess) or only part (poker, driving, Wumpus). Single-agent versus multi-agent: crossword puzzle against chess, or driving among other cars; multi-agent environments may be competitive or cooperative. Deterministic versus stochastic: the next state is fully determined by the current state and action (chess without dice) or has randomness (driving, backgammon). Episodic versus sequential: in episodic tasks each decision is independent (classifying defective parts); in sequential tasks the current decision affects future ones (chess, driving). Static versus dynamic: the environment does not change while the agent deliberates (crossword) or does (driving); semi-dynamic if only the performance score changes with time (timed chess). Discrete versus continuous: a finite number of states and actions (chess) or a continuum (taxi driving). Known versus unknown: whether the agent knows the "laws" of the environment.

The Hardest Case

The hardest environment is partially observable, multi-agent, stochastic, sequential, dynamic, continuous and unknown: taxi driving. The easiest is fully observable, deterministic, episodic, static, discrete and single-agent. The environment type largely determines the design of the agent and which techniques apply: search for deterministic observable problems, probability for stochastic ones, learning for unknown ones.

Table 1.3: Examples of environment properties

Environment Observable Deterministic Episodic Static
Crossword puzzle Fully Yes No Yes
Chess with a clock Fully Yes No Semi
Poker Partially No No Yes
Taxi driving Partially No No No
Image classification Fully Yes Yes Yes

Example 1.3: PEAS for a vacuum robot

Problem: Give the PEAS description and classify the environment of a robot vacuum cleaner in a house.

Solution:

  1. Performance: amount of dirt cleaned, battery used, time taken, avoiding collisions.
  2. Environment: rooms, floor types, furniture, people, pets.
  3. Actuators: wheels, brushes, suction motor.
  4. Sensors: bump sensors, cliff sensors, dirt sensor, camera or lidar.
  5. Classification: partially observable (cannot see all rooms), single-agent (unless pets count), stochastic, sequential, dynamic (people move), continuous.

Result: PEAS defined; a partially observable, stochastic, sequential and dynamic environment.

envs = {
    "chess":   ("fully", "deterministic", "sequential", "discrete"),
    "poker":   ("partially", "stochastic", "sequential", "discrete"),
    "taxi":    ("partially", "stochastic", "sequential",
                "continuous"),
    "spam":    ("fully", "deterministic", "episodic", "discrete"),
}
for name, props in envs.items():
    print(f"{name:<6}", " | ".join(props))

Output

chess  fully | deterministic | sequential | discrete
poker  partially | stochastic | sequential | discrete
taxi   partially | stochastic | sequential | continuous
spam   fully | deterministic | episodic | discrete

Common mistakes

  • Describing the agent but forgetting to state the performance measure.
  • Calling an environment fully observable when important information is hidden.
  • Confusing static with fully observable.
  • Treating all environments as deterministic.

Key takeaways

  • PEAS = Performance, Environment, Actuators, Sensors.
  • Properties: observable, agents, deterministic, episodic, static, discrete, known.
  • Taxi driving is partially observable, stochastic, sequential, dynamic and continuous.
  • The environment type guides the choice of technique.

Practice questions

  1. What does PEAS stand for?
  2. Give an example of a fully observable and a partially observable environment.
  3. What is the difference between episodic and sequential environments?

Answers to the practice questions

  1. Performance measure, Environment, Actuators, Sensors.
  2. Chess is fully observable; poker (hidden cards) and driving are partially observable.
  3. In episodic ones each decision is independent; in sequential ones current actions affect future decisions.

Sources

  • Official BCA syllabus Artificial Intelligence, course code 26BCA404DS04, Unit I