What Is Intelligence? Agents and Environments

Ask ten people what AI is and you'll get ten answers. Russell and Norvig sort the possible definitions into a 2×2 grid. It's worth a minute, because the grid shows which definition this course picks and why.

…like a human…rationally (optimally)
Thinking…Cognitive modelling: copy how human brains reason"Laws of thought": logic, correct inference
Acting…The Turing test: be indistinguishable from a humanRational agents: do the right thing ✅

Modern AI, and this course, lives in the bottom-right cell. We don't care whether a system feels human or reasons in neat logic. We care whether it acts so as to achieve the best expected outcome. There are three reasons:

  • It is measurable. "Best outcome" can be written as a number (reward, utility, loss) and optimized. "Human-like" can't.
  • It is more general. Correct logical inference is one way to act well. Reflexes, learning and gambling wisely under uncertainty are others.
  • Humans are not the gold standard. We are bad at probability (Chapter 4 will show you just how bad). We'd like machines to do better than us, not copy our mistakes.

Agents

An agent is anything that perceives its environment through sensors and acts on it through actuators.

Agent agent function f : percepts* → action Environment campus, weather, people, potholes, other robots… percepts (sensors) actions (actuators)
The agent–environment loop. Everything in this course fills in the box in the middle.

Formally, the agent's behaviour is an agent function that maps the whole percept sequence seen so far to an action. The agent program is the concrete code that implements the function on real hardware. When you train a model you are, in effect, searching for a good agent program.

Bolt as an agent
  • Sensors: GPS, wheel encoders, a bump sensor, a camera, the order queue.
  • Actuators: wheels, a lid lock, a speaker ("Your maggi has arrived!").
  • Environment: campus paths, rain, crowds, stairs, potholes.

Rationality and the PEAS description

A rational agent chooses, for every percept sequence, the action expected to maximize its performance measure, given what it has perceived and what it knows. Four details in that sentence matter:

  1. Performance measure: rationality is always relative to a goal we choose. Choose badly and you get "rational" nonsense. Reward a vacuum robot for "amount of dirt sucked up" and it learns to dump dirt and re-suck it. Writing down the objective is the hardest and most important design step in ML.
  2. Expected: rational ≠ omniscient. If Bolt takes the usual path and a tree falls on it, Bolt wasn't irrational. It did the best it could with the information it had. Chapters 4–5 make "expected" precise with probability and utility.
  3. Given what it has perceived: an agent can't use information it never sensed. It can, however, choose to gather information. Chapter 5 computes exactly how much that is worth (the value of information).
  4. What it knows: built-in knowledge plus what it has learned. A learning agent gets more rational with experience, which is the whole point of ML.

Engineers specify an agent's task with PEAS:

LetterMeaningBolt
PPerformance measureon-time deliveries, food still hot, no collisions, low battery use
EEnvironmentcampus paths, weather, pedestrians
AActuatorswheels, lid lock, speaker
SSensorsGPS, camera, encoders, bump sensor

Properties of environments

The kind of environment decides which algorithm you need. This table is a map of the whole course, so read it carefully:

DimensionEasy endHard endWhere it shows up
Observable?Fully: sensors show the complete statePartially: noisy or missing sensingMDP (full) vs POMDP (partial), §5.2 vs §5.5
Deterministic?Deterministic: action ⇒ one known outcomeStochastic: outcomes have probabilitiesSearch (Ch 3) vs MDPs (Ch 5)
Episodic?Episodic: each decision independentSequential: today's action shapes tomorrowOne-shot decisions (§5.1) vs MDPs (§5.2)
Static?Static: world waits while you thinkDynamic: world changes meanwhileWhy fast approximate algorithms matter
Discrete?Discrete states/actionsContinuousGrid world vs real robot
AgentsSingle agentMulti-agent (cooperative/competitive)Mostly single-agent in this course
Known?Known rules/modelUnknown: must learn the modelPlanning vs learning
Intuition

Chess is fully observable, deterministic, sequential, static (without a clock), discrete and multi-agent. Bolt's world is partially observable, stochastic, sequential, dynamic, continuous and multi-agent, which is about as hard as it gets. Real AI works by simplifying the hard cases into tractable models. A grid world approximates continuous space. An MDP assumes full observability. A Bayes net assumes some variables are independent. Every model is wrong, but some are useful.

Five kinds of agent programs

As agents get more sophisticated, each type adds one ingredient:

  1. Simple reflex agent: if condition then action, using only the current percept. "If the bump sensor fires, stop." Fast, but helpless when the right action depends on history.
  2. Model-based reflex agent: keeps an internal state, a model of the parts of the world it can't currently see. "I saw a pedestrian enter the corridor 2 s ago, so they're probably still there." This is the seed of belief states (§5.5).
  3. Goal-based agent: has an explicit goal and plans action sequences to reach it. This needs search (Ch 3).
  4. Utility-based agent: goals are binary (delivered / not delivered), but outcomes have degrees: fast vs slow, hot vs cold, risky vs safe. A utility function scores how good each state is, and the agent maximizes expected utility (Ch 4–5).
  5. Learning agent: any of the above plus a learning element that improves the agent from feedback. It has a critic (how am I doing?), a learning element (change myself), a performance element (act) and a problem generator (try new things: exploration).
Connections

This list is the course outline in disguise. Utility-based agents need probability and utility (Ch 4), and when decisions are sequential they need MDPs (Ch 5). Model-based agents under uncertainty need Bayesian networks (Ch 7) and belief states (§5.5). Learning agents need everything in Ch 2 (generalization) and Ch 6 (trees). Goal-based agents and learners both need search (Ch 3).

A very short history (so the names make sense)

  • 1950: Turing asks "Can machines think?" and proposes the imitation game.
  • 1956: the Dartmouth workshop coins "Artificial Intelligence."
  • 1960s–80s: symbolic AI and expert systems: hand-written rules. They break down because the world is uncertain and rules don't scale.
  • 1980s–90s: the probabilistic revolution. Pearl's Bayesian networks (Ch 7), decision theory, MDPs (Ch 5). Decision trees (ID3, 1986; Ch 6) and genetic algorithms (Holland, 1975; Ch 3) become popular.
  • 2000s: statistical ML. The focus is on generalization from data (Ch 2).
  • 2012–now: deep learning, large models and reinforcement learning (which is built on MDPs). The fundamentals in this course are exactly the vocabulary these systems are described in.