← Back to Tutorials

11. Agents & Environments

Agents & Environments

What is an Agent?

An agent is anything that perceives its environment through sensors and acts upon that environment through actuators. This is a core concept in AI — all AI systems can be viewed as agents interacting with environments.

Diagram showing agent-environment interaction with percepts and actions

Figure: The agent-environment loop — agents perceive, reason, and act.

PEAS Framework

PEAS describes the design of an intelligent agent:

Example for a self-driving car: Performance = safety, speed, comfort; Environment = roads, traffic, weather; Actuators = steering, brakes, accelerator; Sensors = cameras, lidar, GPS.

Types of Agents

Environment Types

TypeDescriptionExample
Fully ObservableAgent sees complete stateChess board
Partially ObservableAgent sees partial statePoker (hidden cards)
DeterministicNext state fully determined by actionMaze
StochasticUncertainty in state transitionsDice game
EpisodicEach action is independentImage classification
SequentialCurrent action affects futureChess
StaticWorld doesn't change while agent thinksSudoku
DynamicWorld changes in real-timeSelf-driving
Practice Task: For a robot vacuum cleaner, define the PEAS framework. Identify the type of agent it uses and the type of environment it operates in. Design a simple reflex agent algorithm for the robot in pseudocode. How would you upgrade it to a model-based agent?