Part 2: Rational Agents

Source deck: FAI_Part2_RationalAgents_25-26.pdf, 21 PDF pages (p.20 is the summary, p.21 is the closing "Questions?" slide).

Page-number convention for this Part: the printed slide numbers equal the PDF page indices (p.2 prints "2", p.19 prints "19"), so there is no drift to correct. Every citation below is a PDF page index.

Printed copy: all task answers are expanded below their tasks.

What this chapter assumes

1. The claim that organises the Part

Slide p.2 is a recap rather than new material, and the lecturer opens the Part by presenting it as one. All three of its bullets already stand on p.63 of the Part 1 deck, and the only textual difference is the phrase "(or performance measure)" added to the second bullet (verified by comparing p.2 against Part 1 p.63 directly):

  1. An agent is an entity that perceives and acts.
  2. A rational agent selects actions that maximize its (expected) utility (or performance measure).
  3. "Characteristics of the percepts, environment, and action space dictate techniques for selecting rational actions."

What changes between the two decks is which bullet does the work. In Part 1 the third bullet was a promise; here it is the thing being developed. Statement 3 is the thesis of the whole Part, and pp.6, 7 and 8 each repeat it as a banner line: "The environment largely determines the agent design!". The practical reading is a pipeline: you describe the task environment (Section 2), you classify it (Section 3), and the classification narrows the set of algorithms that can legally be applied (Section 11). Get the description wrong and you will apply a correct algorithm to the wrong problem.

Slide p.3 makes the pipeline concrete by putting Pacman in the agent box of the same diagram. Pacman perceives the grid (walls, dots, ghost positions) and acts by moving up, down, left or right. Nothing about the diagram changed: only the contents of percepts, actions and environment changed, and those contents are exactly what PEAS records.

Lecturer aside

dependent on how you defined each of these aspects, how you formulated the problem, the problem will be easier or will be harder to solve. And that's something very important to realize. (Lecturer, T1)

He is talking about problem formulation, and this is the single most repeated methodological message in the course. It has a sharp consequence for this chapter: the answers you give on the classification axes are properties of your formulation, not properties of the universe. Two correct formulations of the same real task can land in different cells of the p.19 grid and therefore call for different algorithms.

2. PEAS: how to name a task environment

PEAS is the four-part specification of a task environment: Performance measure, Environment, Actuators, Sensors. On pp.4 and 5 the tables carry a leading "Agent Type" column, so the columns read Agent Type, then P, E, A, S from left to right.

The four slots are easy to recite and easy to fill in wrongly. The discipline that keeps them honest:

PEAS table for the automated taxi driver: performance measure, environment, actuators, sensors
Part 2, PDF p.4: PEAS table for the automated taxi driver
Task 1 · name the trap

In this table, touchscreen is listed under Sensors while display and speech are listed under Actuators. In a real taxi these are one panel and one speaker assembly bolted to the same dashboard. State the principle that puts them in different columns, and then say which column a passenger-facing microphone belongs in.

Answer (click)

PEAS classifies by direction of information flow relative to the agent, not by hardware unit. The touchscreen is where the customer enters a destination, so information flows world to agent: a sensor. The display and synthesised speech are how the agent emits information into the world: actuators. A microphone carries speech from the passenger to the agent, so it is a sensor.

Why it matters: the same physical device can appear in both columns if it has both directions, and an "actuator" does not have to be a motor. On p.5 the medical diagnosis system's actuators are "Display of questions, tests, diagnoses, treatments", which are pure output channels. Any answer that reasons "actuators are the moving parts" fails on every software agent in these two tables.

Slide p.5 supplies five further rows: medical diagnosis system, satellite image analysis system, part-picking robot, refinery controller, interactive English tutor. Read them as a range test on your intuitions. The satellite image analysis system has one sensor (a high-resolution digital camera) and one actuator (display of scene categorization); the refinery controller has valves, pumps, heaters, stirrers and displays as actuators, and temperature, pressure, flow and chemical sensors as sensors (note that displays appear as actuators here, for the reason given in Task 1). The English tutor's performance measure is the student's score on a test, which is a measure taken on the world, well after the agent has acted, and which the agent cannot directly observe. That last point is the seed of the "performance measure known or not known" axis on p.8.

Task 2 · write one yourself

constructed example Write the PEAS description for an autonomous drone that inspects wind-turbine blades for cracks. Write all four slots before opening the answer. Then check your P: does it score something in the world, and is it aggregatable to one number?

Model answer (click)

P: the fraction of real cracks that are found, the number of false alarms (cracks reported where there is none), blades inspected per battery charge, no contact with the blade, drone returned to base. Aggregation: treat "no contact" and "returns to base" as hard constraints, then maximize a weighted sum of cracks found, minus a penalty per false alarm, minus flight time.
E: the turbine (rotating or feathered), the blade surfaces, wind and gusts, rain and light conditions, the tower and nacelle, ground crew, other aircraft, no-fly boundaries.
A: four rotors (thrust and attitude), camera gimbal (pan and tilt), zoom, illumination lamp, radio downlink to report findings.
S: RGB camera, thermal camera, GPS, IMU (attitude and acceleration), barometric altimeter, lidar or ultrasonic proximity sensor, anemometer or wind estimate, battery-state sensor.

Marking notes: putting "detect cracks" in Actuators is the most common error (that is the goal, so it belongs in P). Putting "wind" in Sensors is the second most common (wind is part of E; the anemometer is the sensor). "Fly safely" is P, not A.

Constructed, in the sample paper's format (not a past question)

In the PEAS description of the automated taxi driver on p.4, the touchscreen is listed as an actuator.

False. p.4 lists the touchscreen last in the Sensors column, after cameras, radar, speedometer, GPS, engine sensors, accelerometer and microphones. The customer types a destination into it, so the information flows world to agent.

Why "True" is wrong: it classifies by hardware ("a screen is an output device", "it is part of the dashboard") instead of by direction of information flow. The same dashboard also supplies display and speech, which p.4 does put under Actuators, and on p.5 the medical diagnosis system's actuators are nothing but displays. An actuator need not move anything.

Marking arithmetic: +0.5 correct, -0.25 wrong, 0 blank; EV of answering = 0.75p minus 0.25, so answer on anything better than a one-in-three hunch.

3. The classification axes (pp.6, 7, 8)

Six axes on pp.6 and 7, plus two extra ones on p.8. For each, the deck gives a question to ask and, in most cases, the design consequence in a one-line arrow. Learn the consequences, because that is what turns the classification into an engineering decision.

3.1 Fully observable vs partially observable (p.6, called accessible vs inaccessible)

Question on the slide: "Are the relevant aspects of the environment accessible to the sensors?" Consequence: partially observable means the agent requires memory, that is, an internal state. The load-bearing word is relevant. A chess player cannot see the opponent's intentions, yet chess is fully observable, because the board plus whose turn it is is all the state the transition model needs. Observability is about the state variables of your formulation, not about everything you might like to know.

3.2 Deterministic vs stochastic (p.6)

Question: "Is the next state of the environment completely determined by the current state and the selected action?" The slide adds a named special case: if only the actions of other agents are nondeterministic, the environment is called strategic. Consequence: stochastic means the agent may have to prepare for contingencies, that is, a plan that is a single action sequence is no longer enough.

Two traps. First, determinism is relative to how coarse your state is: a robot gripper that "sometimes" drops a slippery object is deterministic given a fine enough state (friction coefficient, grip force) and stochastic given the state you actually chose to represent. Second, stochastic is not the same as partially observable. Backgammon on p.10 is fully observable and stochastic (you see everything, the dice are random). Poker is partially observable and stochastic (hidden cards and shuffling). Keeping these apart is worth a mark.

Constructed, in the sample paper's format (not a past question)

Backgammon is a partially observable task environment, because the outcome of the dice roll is not known in advance.

False. p.10 marks backgammon Fully observable and Stochastic. Observability asks whether the relevant aspects of the current state reach the sensors, and in backgammon the whole board, both players' checkers and the dice just thrown are visible. Not knowing a future outcome is stochasticity, which is a different column of the same table.

Why "True" is wrong: it collapses two axes into one. The table separates them in adjacent rows on purpose: poker is Partially observable (the opponents' cards are hidden now) and Stochastic (the shuffle), while backgammon is Fully observable and Stochastic. The design consequences differ too: partial observability buys the agent an internal state (p.6), stochasticity forces contingency planning.

Marking arithmetic: +0.5 correct, -0.25 wrong, 0 blank. Even a coin flip is worth +0.125 here, so never leave the box empty.

3.3 Episodic vs sequential (p.6)

Question: "Can the quality of an action be evaluated within an episode (perception + action), or are future developments decisive for the evaluation of quality?" An episode is one percept plus the action taken on it. Episodic therefore means that credit assignment (deciding which earlier action deserves the credit or the blame for a later outcome) is local: classify this image, score this image, move on. Sequential means a present action can only be scored through its downstream consequences, which is exactly the condition that makes search, planning and MDPs necessary. Note that "episodic" is a statement about credit assignment, not about whether the task repeats: an image classifier run a million times is still episodic.

3.4 Static vs dynamic (p.7)

Question: "Can the environment change while the agent is deliberating?" The slide names the in-between case: if the environment does not change but the agent's performance score changes as time passes, the environment is semi-dynamic. Consequence: static means the agent has time to compute a rational decision, so an algorithm that takes as long as it needs (uninformed search, exhaustive CSP solving) is admissible engineering. Dynamic forces a time budget, which is where depth limits and evaluation functions come from in part07.html.

3.5 Discrete vs continuous (p.7)

Question: "Is the environment discrete (chess) or continuous (a robot moving in a room)?" Consequence on the slide: continuous time implies a continuously operating controller. The axis applies separately to time, to the state variables, to percepts and to actions, and a task can be mixed (a car has continuous position and a small discrete set of gear choices). Everything the course does algorithmically assumes a discrete state and action set.

3.6 Single agent vs multi-agent (p.7)

Question: "Which entities have to be regarded as agents?" The slide notes both competitive and cooperative scenarios, and gives the consequence: multi-agent means the agent may need to behave randomly. The reason given in the lecture is that randomness is what keeps a game interesting, so a multi-agent setting typically builds in a random effect. (Added note, not from the deck: in a competitive setting randomization is also a defence, because a rule that always answers the same way can be predicted and exploited by the opponent.) Note the phrasing of the question. Whether the pedestrian is an agent or part of the weather is a modelling choice: treat an entity as an agent when its behaviour is best predicted as maximizing an objective that depends on what you do.

3.7 The two extra axes (p.8)

Rule to carry forward

The classification describes the task environment as you formulated it. When an exam question asks you to classify, the defensible answer names the axis value and the feature of the formulation that forces it ("partially observable, because the sensor model gives only the 5x5 window around the agent"). A bare label with no justification is what loses the marks on open questions.

Constructed classification item (pack). Not a past question; the sample paper's own MC block is true/false

A robot at the end of a conveyor belt picks parts out of a bin. Its only percepts are a camera looking down on the top layer of the bin and a force sensor in the gripper. It picks one part per cycle, and each pick is scored on its own as a success or a failure. Classify this task environment on the observability and episodic axes.

B, partially observable and episodic, which is exactly how p.10 marks the part-picking robot row (Partially, Single, Stochastic, Episodic, Dynamic, Continuous). Name the feature that forces each half, because that is what earns the marks: the camera cannot see what lies under the top layer, so part of the state the pick depends on is outside every percept; and the quality of a pick is settled within the one percept-plus-action episode, so credit assignment is local.

Why the others are wrong. A calls it fully observable by counting sensors rather than asking whether the relevant state reaches them. C reads "the belt keeps moving and parts keep coming" as sequential, but repetition is not sequentiality: an episodic task can run a million times (p.6 defines episodic by whether future developments decide the quality of the present action). What the moving belt does force is Dynamic on the static axis, a different column. D makes both errors at once.

Marking arithmetic: the real paper scores this style as true/false at +0.5 correct, -0.25 wrong, 0 blank; on a four-way item like this one a blind guess is p = 0.25, which is below the 1/3 break-even, so on a four-option item guess only after eliminating at least one option.

4. Pacman on the axes (p.9)

Slide p.9 puts the running example beside five of the axes. Count the bullets in the figure below and you get five: observability, deterministic vs stochastic, episodic vs sequential, discrete vs continuous, single vs multi-agent. The static/dynamic axis of p.7 and the two known/unknown axes of p.8 are not among them, which you can check against the reproduced slide. Pacman is useful here precisely because several of its answers flip between variants of the game, which makes the point of Section 3 unavoidable.

Pacman screenshot beside the five environment axes
Part 2, PDF p.9: Pacman classified along the environment axes
Task 3 · fill the blanks

Fill in the five cells for standard Pacman, then for each cell say what change to the game would flip it. Write your five answers before revealing.

AxisStandard PacmanWhat flips it
Observable??
Deterministic??
Episodic??
Discrete??
Agents??
Answer (click)

The classification worked through in the lecture, with the variant dependencies he flagged:

AxisStandard PacmanFlips when
ObservableFully observable: the whole maze, all dots, both ghosts are in the percept.The percept is restricted to a local window (for example a 5x5 view), or walls off-screen are hidden. Then it is partially observable and the agent needs memory.
DeterministicDeterministic for Pacman's own moves: pressing left always moves left. Ghosts are deterministic too if they follow a fixed rule (for example, always take the first legal turn clockwise).Ghosts move randomly. Then the environment is stochastic, and the right machinery is expectimax (part08.html) or an MDP (part09.html) rather than plain search.
EpisodicSequential: you cannot score the current move on its own, because eating a dot now may trap you against a ghost later.Nothing sensible; this one is structural to the game.
DiscreteDiscrete: finitely many grid cells, four actions, discrete time steps.Continuous positions and velocities (an arcade-physics remake).
AgentsMulti-agent: the ghosts are agents whose behaviour depends on Pacman.Remove the ghosts, or model them as a fixed random process rather than as decision makers. Then it is single-agent, and a search formulation is enough.

The transferable lesson: only one of the five answers (sequential) is forced by the task. The other four are forced by the variant plus the formulation, which is why "it depends, and here is what it depends on" is a full-credit answer on an open question and a nonsense answer on a true/false item.

5. The reference table (p.10)

Slide p.10 is the compressed version of the entire Section 3: ten task environments (crossword puzzle, chess with a clock, poker, backgammon, taxi driving, medical diagnosis, image analysis, part-picking robot, refinery controller, English tutor) by six characteristics. Pack guidance: treat it as the densest slide in the Part and a likely source of true/false items, since every cell is a small, checkable judgement.

Table of ten task environments classified by observable, agents, deterministic, episodic, static, discrete
Part 2, PDF p.10: Task environments x characteristics table
Task 4 · name the trap

The "Static" column contains the value Semi exactly twice. Name both rows, define semi-dynamic using the wording of p.7, and explain why Chess with a clock is not simply dynamic.

Answer (click)

The two rows are Chess with a clock and Image analysis.

p.7 defines it: "if the environment does not change but if the agent's performance score changes as time passes by the environment is denoted as semi-dynamic". Chess with a clock is exactly that. The board is frozen while you think, so no state variable changes under you, but your clock is running, so the quantity you are being scored on degrades with deliberation time. Image analysis is the same shape: the image does not change while you process it, but throughput or latency counts against you.

Why it matters: semi-dynamic is the condition that makes depth limits and anytime behaviour (an algorithm that can be interrupted at any moment and still return the best answer it has so far) rational rather than lazy. It is the formal reason the game-tree chapter cuts off at a fixed depth and calls an evaluation function (part07.html), instead of searching to terminal states.

Three more cells from this table repay attention, because they are the ones students argue with:

Constructed, in the sample paper's format (not a past question)

In the table of task environments on p.10, the medical diagnosis system is classified as a multi-agent environment.

False. The medical diagnosis row reads Partially, Single, Stochastic, Sequential, Dynamic, Continuous. Patients and doctors are in the Environment slot on p.5, but the table does not model them as choosing actions in response to the diagnostic system, so they are environment, not agents.

Why "True" is wrong: it counts the humans in the room instead of asking p.7's question, "which entities have to be regarded as agents". Whether an entity is an agent is a modelling choice. The row that is Multi on the same table is the interactive English tutor, because the student adapts to the tutor, and the taxi row is Multi because other traffic responds to what the taxi does.

Marking arithmetic: +0.5 correct, -0.25 wrong, 0 blank. The p.10 cells are the intended answers, so on any classification item answer from the table first and from the real world second.

6. Exam signal: the self-driving car item

2023 sample theory exam, Part 1 multiple choice, item 1.1, verbatim

Part 1 of the theory paper is multiple choice, 4 points, one true/false item per lecture. Item 1 is the Part 2 item, and it reads verbatim:

"The task environment for self-driving cars is fully observable."

False. The taxi driving row of p.10 is Partially observable. A car's sensors do not deliver the other drivers' intentions, the traffic behind an occluding truck, the state of the road surface beyond sensor range, or a pedestrian about to step off the kerb. The percept covers only part of the state that the performance measure depends on. The design consequence from p.6 follows immediately: the agent needs an internal state.

Why "True" is wrong (the classic mistake): reading "fully observable" as "has a lot of sensors" or as "we know the rules of the road". Sensor count is irrelevant, and knowing the rules is the known axis of p.8, not the observability axis. A second, subtler mistake is answering from the world rather than from the course table: p.10 fixes the intended classification, and the exam item is testing that row.

Marking arithmetic: the sample paper prints "+0.5 point if correct, -0.25 point if wrong, 0 points if both empty" above this block. Expected value of answering = 0.5p minus 0.25(1 minus p) = 0.75p minus 0.25, positive whenever p > 1/3. A blind coin flip on a true/false item has p = 0.5, so EV = +0.125. Answer it; a blank is strictly worse.

Lecturer aside · how to score this block

you get plus uh a half a point if it is correct, minus a quarter of the point if it is wrong and zero points if uh both of the boxes are empty (Lecturer, T9)

Compute the expected value before you decide to skip anything. With p the probability your answer is right, EV = 0.5p minus 0.25(1 - p) = 0.75p minus 0.25, which is positive whenever p > 1/3. This block is true/false, so even a pure coin flip has p = 0.5 and EV = +0.125. Never leave a true/false item blank. The printed instruction on the sample paper is "Mark an X in the correct column or leave both empty", which invites you to skip; the arithmetic says do not.

Task 5 · the full classification drill

Classify the automated taxi driver of p.4 on all six axes of pp.6 and 7 plus the two of p.8, giving the feature of the task that forces each answer. Then state which of the four algorithm families on the p.19 grid this classification rules out, and why.

Answer (click)
AxisValueForced by
ObservabilityPartially observableOcclusion, sensor range, other drivers' intentions are not in any percept.
AgentsMulti-agent (competitive and cooperative at once)Other traffic and pedestrians respond to what the taxi does.
DeterminismStochasticBraking distance on a wet road, engine faults, unpredictable pedestrians.
Episodic?SequentialA lane change now determines which exit is reachable later.
Static?DynamicThe world moves while the planner is thinking, so deliberation has a hard deadline.
Discrete?ContinuousPosition, velocity, steering angle and time are all continuous.
Known?Broadly known, locally unknownTraffic rules and vehicle dynamics are known; friction on an unfamiliar surface is not, which is why exploration or online estimation appears in real systems.
P known?Known but multi-dimensional and contestedp.4 lists six components (safe, fast, legal, comfortable, profitable, low impact on others) whose weights are a policy decision.

This is precisely the combination that p.20 calls the most demanding: partially observable, non-deterministic, dynamic, continuous and multi-agent, all at once.

What it rules out on the p.19 grid: all four families, taken literally. Classical search (part04.html) needs deterministic, fully observable, discrete and single-agent; CSPs (part06.html) need a finite set of variables with finite domains and no dynamics at all; MDPs (part09.html) accept the stochasticity but still require full observability and a discrete state set; STRIPS planning (STRIPS is the classical planning language of part11.html, in which every action carries preconditions and effects) requires deterministic actions and a discrete state under a closed-world assumption (anything the state description does not mention is taken to be false). The honest conclusion, and the one worth writing on an exam: the real task must first be reformulated (discretize into lanes and time steps, abstract other traffic into a stochastic model, fix a finite action set) before any family applies. That reformulation is the skill quoted in the aside in Section 1.

7. Reflex agents (pp.11 to 15)

Slide p.11 reopens the agent diagram with the "?" still in it. Slides p.12 onwards fill it in, in increasing order of capability. Two families are worked through in detail here, the reflex agent (p.12) and the goal-based or planning agent (p.16). Two more are named without being developed: the lecturer names the utility-based agent at this point and defers it, and the summary slide p.20 lists learning agents, which improve their behavior over time.

Lecturer aside · the third type

you also have different types of agents. Uh and I will discuss only two now, but there is also a third type, the utility based agent that we will discuss later in the course (Lecturer, T1)

Worth marking, because the deferred type is where the course spends its second half. A goal-based agent asks whether a state satisfies the goal, a yes or no test. A utility-based agent scores states and action outcomes on a scale, which is what lets it compare partial successes and weigh a risky option against a safe one. That is the machinery of expectimax in part08.html and of rewards, values and policies in part09.html, and it is already implied by the definition of rationality on p.2 (maximize expected utility), which is why Part 2 can define rationality with utilities while its two worked agent types do not use them.

Reflex agent architecture: sensors to what the world is like now, condition-action rules to what action I should do now, to actuators
Part 2, PDF p.12: Reflex agent architecture
Task 6 · state the property that fails

Compare this diagram with the goal-based diagram of p.16 (Section 8 below) and list what is missing here. Then state the property of the environment that a reflex agent can still handle correctly, and the one it cannot.

Answer (click)

Missing from p.12, five elements: State (the internal state box), How the world evolves, What my actions do, What it will be like if I do action A, and Goals. Equivalently: no explicit internal state, no model of change, and no goal, therefore no evaluation of hypothetical futures.

Can still handle: partial observability, up to a point. p.12 explicitly allows memory or a model of the world's current state, which is the design consequence p.6 attaches to partial observability. Note that this memory is inside the "condition-action" loop and is not drawn as a separate State box, which is exactly the difference from p.16. It also handles dynamic environments well, because the response time is one rule lookup.

Cannot handle: sequential environments (p.6). If the quality of an action is only decided by future developments, an architecture with no representation of the future cannot evaluate it. The p.15 stall described below is that failure made visible, and it is the reason the course spends Parts 3 to 11 on the other family.

The bullets on p.12: choose action based on current percept (and maybe memory); may have memory or a model of the world's current state; do not consider the future consequences of their actions; consider how the world is. The diagram is a straight line from Sensors to "What the world is like now" to a match against "Condition-action rules" to "What action I should do now" to Actuators. There is no branch that represents a hypothetical future.

The second bullet is the model-based case in Russell and Norvig's terminology, the textbook the deck draws on (p.1). The distinction that matters: the model here answers "what is the world like now, given what I have seen so far", which is what partial observability demands (p.6). It does not answer "what would the world be like if I did A", which is what p.16 adds. A model-based reflex agent is still reflex: it has memory, not foresight.

Slide p.13 gives the smallest possible instance, an agent program in Python for Pacman:

class GoWestAgent(Agent):
    def getAction(self, percept):
        if Directions.WEST in percept.getLegalPacmanActions():
            return Directions.WEST
        else:
            return Directions.STOP

This is the whole agent program: one condition-action rule, plus a default. It is also the cleanest illustration of what an agent program is, a function from a percept to an action.

Slides p.14 and p.15 show two reflex agents running (videos from UC Berkeley CS188). The first, in a simple layout, eats dots successfully. The second uses the rule "move towards the nearest visible food". It performs well while food is visible and then stalls when no food is in the percept, while the score keeps decreasing with each time step. The diagnosis is architectural, not a bug: the rule set is a lookup table over percepts, so when the percept contains no dot there is no rule that makes progress, and the agent has no mechanism for reasoning that moving away from where the food was could bring it back into view.

Worth noticing for later: this stall has exactly the shape of a local optimum in greedy local search (part05.html), where an algorithm that only looks at the immediate improvement has no move that looks good and therefore stops short of the goal.

8. Goal-based / planning agents (pp.16, 17)

Goal-based agent architecture with state, how the world evolves, what my actions do, what it will be like if I do action A, and goals
Part 2, PDF p.16: Goal / planning-based agent architecture

The bullets on p.16: decisions based on evaluating future action sequences, so the agent asks "what if" questions and considers how the world would be; it must have a model of how the world evolves in response to actions; it must formulate a goal (test); optimal means achieving the goal at least cost; and the arrow at the bottom: this "Involves reasoning!".

Read the diagram as a data-flow graph and its boxes line up with the ingredients Part 3 will use to define a search problem, which is why this slide is the hinge of the Part:

part03.html turns this picture into its Five Ingredients, printed on Part 3 p.9: States (with the warning that only the relevant aspects go in, so a state is always an abstraction), Actions, Initial State, Goal Formulation, and Specification of the search costs, which that slide marks OPTIONAL. Note the shape of the list: the model of change is folded into Actions there, and cost is optional rather than mandatory. Part 3 then adds a further layer of concepts on its p.10, including state space, transition model, goal test, path, path cost, search cost, total cost, solution and optimal solution, so the mapping above is where the two chapters meet, not the whole of Part 3.

Slide p.17 shows the planning agent in Pacman: it pauses first, computing an action sequence that eats all the dots in the fewest moves, and then executes it to a maximum score. The pause is the visible cost of reasoning, and it is exactly what a dynamic environment (p.7) will not tolerate, which is the tension that later Parts manage with depth limits and heuristics.

Task 7 · complete the diagram

You are handed a partly drawn agent architecture containing: Sensors, "What the world is like now", State with both arcs (dashed into State, solid out of it), "How the world evolves", "What my actions do", "What action I should do now", Actuators. Which two elements must you add for it to be a goal-based agent as p.16 defines it, and what would it be if you added only one of them?

Answer (click)

You must add (1) the "What it will be like if I do action A" node, fed by the two model boxes, and (2) the Goals box feeding the action choice.

With only the model boxes and the State update loop, and no hypothetical-successor node, you have a model-based reflex agent: it knows where it is even under partial observability, but it still picks actions by rules over the current state (the p.12 family).

With the successor node but no Goals box, you can predict outcomes but have no criterion for preferring one, so no action follows. The p.16 bullets make this explicit: the agent "must formulate a goal (test)". The goal test is what converts prediction into decision, and adding a cost on top of it is what converts decision into optimal decision.

9. Atomic, factored, structured (p.18)

A goal-based agent has to represent states in order to predict them. Slide p.18 gives the three levels of representation the course uses, drawn as the transition from one state B to a successor C at each level.

Three panels: atomic states as labelled boxes, factored states as vectors of variables, structured states as objects with relations
Part 2, PDF p.18: Spectrum of state representations: atomic, factored, structured

The trade-off runs one way: expressiveness increases left to right, and so does the leverage you can get from a single state description, but reasoning becomes harder and the algorithms become more specialised.

Task 8 · pick the level

For each of the following, name the leftmost (simplest) representation level from p.18 that can express it without an explosion in the number of named states.

  1. The shortest driving route between two Belgian cities, where a state is "which city am I in".
  2. A map colouring where each of seven regions takes one of three colours, and neighbours must differ.
  3. "The key is inside the locked box, which is on the table", in a world where new boxes and keys can be introduced.
Answer (click)

1. Atomic. The algorithm only needs city identity and step costs. Nothing inside a city is inspected, so a name is enough.

2. Factored. Seven variables with domain size three. Atomic would work in principle (3^7 = 2187 named complete states) but it throws away exactly the structure the CSP algorithms exploit: you could not talk about a partial assignment, propagate a constraint, or eliminate a value from a domain, because atomic states have no parts to eliminate.

3. Structured. The sentence is about objects (key, box, table) and relations between them (inside, on, locked), and the object set is open. A factored representation would need one Boolean variable per (object, object, relation) triple, fixed in advance, which fails as soon as a new box appears. This is the case that forces first-order representations and STRIPS-style operators.

10. The course grid (p.19)

Slide p.19 crosses the representation spectrum of p.18 with the deterministic/stochastic axis of p.6 and drops the course's algorithm families into the resulting cells. It is titled "Outline of the course" and it means it.

Grid with atomic, factored, structured on one axis and deterministic, stochastic on the other, containing Search, MDPs, CSPs and Planning
Part 2, PDF p.19: Course outline: deterministic/stochastic crossed with atomic/factored/structured (two arrows, 3x2 cells)

Reading the grid: the green arrow runs deterministic to stochastic, the blue arrow runs atomic to factored to structured, and four families are placed on it.

Task 9 · read the empty cells

The grid has three representation levels and two dynamics values, so six cells, and only four are filled. Which two are empty, and what does that emptiness tell you about what the course will and will not teach?

Answer (click)

Empty: factored + stochastic and structured + stochastic. The stochastic column contains only MDPs, at the atomic level.

What the grid itself shows: uncertainty is placed at exactly one point, and at that point the representation drops back to the simplest one. CSPs and Planning are placed in the deterministic column only, and nothing is drawn in the factored or structured cells of the stochastic column. So if a question hands you a task that is both stochastic and needs variables or objects, the move the grid supports is a reformulation (flatten the factored state into an atomic state space and treat it as an MDP), not a hybrid family read off this picture.

One nuance: chance appears elsewhere in the course too, in game trees with uncertainty (part08.html), which sit alongside MDPs on the stochastic side. The grid does not show them because it is organised by representation, and expectimax states are atomic as well.

Why this slide repays memorising rather than merely reading: it comes back, and that is checkable. The same grid is slide p.9 of the Part 6 deck (identical, same title "Outline of the course"), and it reappears twice in the Part 10 deck (pp.2 and 29) retitled "Environments in this course", with the factored cell expanded to "CSPs/SAT, Propositional Logic" and the structured cell carrying "First-Order Logic" above "Planning" on two lines, and with the p.18 representation icons drawn beside the axes. The lecturer is using one picture as the spine of the whole course.

Lecturer aside · why the grid is an exam object

the theory exam... tests both for factual knowledge as well as for synthetic knowledge... we also want to see that you can uh bring things across different chapters uh together because as you know by now uh the course is largely incremental. (Lecturer, T9)

Synthetic questions need a structure to synthesise on. This grid plus the eight axes of pp.6 to 8 is that structure: it lets you answer "which method applies here and why" for a task you have never seen, which is the shape of the open questions.

Lecturer aside · what counts as the source

the slides and the material for the exercise sessions uh are the main source of reference. So that's the basis of what you need to know uh for the evaluation. (Lecturer, T1)

Concretely for this Part: the p.10 table is the authority on how a given task environment is classified, even where you could argue for a different reading of the real world. The sample-exam item in Section 6 is scored against that table.

Constructed, in the sample paper's format (not a past question)

On the course outline grid of p.19, CSPs are placed in the stochastic column.

False. The grid places CSPs at factored and deterministic. Only one family sits in the stochastic column at all, MDPs, and it sits there at the atomic level; the factored and structured cells of the stochastic column are empty, as Task 9 above works out.

Why "True" is wrong: it confuses the algorithm with the environment. Backtracking search over a CSP can make arbitrary or randomised choices (value ordering, random restarts), but the axis asks whether the next state is determined by the current state and the selected action (p.6), and assigning a value to a variable determines the next partial assignment exactly. A stochastic task that needs variables has to be reformulated (flatten to an atomic state space and treat it as an MDP), not read off a cell the grid does not draw.

Marking arithmetic: +0.5 correct, -0.25 wrong, 0 blank, so answer it. The four filled cells (Search atomic-deterministic, MDPs atomic-stochastic, CSPs factored-deterministic, Planning structured-deterministic) are worth memorising as four facts, because the same grid returns as Part 6 p.9 and Part 10 pp.2 and 29.

11. The bridge: what search silently assumes

This is the connection the theory exam actually tests, because it is where Part 2 stops being vocabulary and becomes a precondition check on everything that follows.

The bridge, stated explicitly

The search formulation of part03.html and the algorithms of part04.html and part05.html are only valid on a task environment that is fully observable, deterministic, known, discrete, static, single-agent, sequential, with an atomic state representation.

Each assumption does specific work. Fully observable plus deterministic plus known together mean the agent can compute the entire consequence of a plan offline, before executing a single action, which is why a solution can be a fixed action sequence rather than a policy (a rule that names an action for every state the agent could end up in). Discrete makes the successor set enumerable, which is what "expand a node" means. Static means the world is still the same when the search terminates. Single-agent means nobody is choosing against you. Sequential is why you need search at all: on an episodic task a reflex rule would do.

Then the rest of the course is the systematic relaxation of that list, one assumption at a time:

Assumption droppedWhat breaksWhere the course fixes it
Single-agentA fixed action sequence can be defeated by an opponent's reply.Game trees, minimax and alpha-beta pruning (skipping branches that cannot change the result) (part07.html).
DeterministicA single successor per action no longer exists, so a plan must branch on outcomes.Chance nodes and expectimax (part08.html); MDPs and policies (part09.html).
AtomicYou cannot reason about part of a state, so you cannot prune with constraints.Factored states and CSPs (part06.html); propositional logic and SAT (part10.html).
Atomic, furtherYou cannot describe an open set of objects and their relations.Structured states, first-order logic and STRIPS planning (part10.html, part11.html).
StaticDeliberation time costs score, so search must terminate on a budget.Depth limits plus evaluation functions in game trees (part07.html).
KnownThe transition model itself is unavailable, so it would have to be learned by exploration.Not covered in this course: reinforcement learning is out of scope.

Notice what the grid on p.19 does not have: an axis for observability. Check the reproduced figure in Section 10 and you will find two arrows, deterministic to stochastic and atomic to factored to structured, and nothing on the picture that refers to what the agent can see. So observability is not what selects a family on this map. The design consequence p.6 attaches to partial observability is a different kind of answer: give the agent memory, an internal state, which is a change to the agent rather than a change of algorithm family.

Task 10 · classification implies method

constructed example For each task, give the classification feature that decides the matter and name the family from the p.19 grid.

  1. Assigning 40 exams to 6 rooms and 3 time slots so that no student has two exams at once and no room is over capacity.
  2. Finding the cheapest sequence of flights from Brussels to Osaka, given a fixed timetable.
  3. Choosing where a warehouse robot should move next, when its wheels slip and it reaches the intended cell only 80 percent of the time.
  4. Producing a sequence of operations that gets a set of blocks into a described configuration, where the number of blocks varies per instance.
Answer (click)

1. CSP (factored, deterministic). Deciding feature: the state is naturally a set of variables (one per exam) with finite domains (room, slot) and constraints between them, and there is no sequential dynamics at all. You want an assignment, not a path.

2. Search (atomic, deterministic). Deciding feature: deterministic transitions, fully observable, known timetable, and what you want is a least-cost path. State = (airport, time), treated as an atom.

3. MDP (atomic, stochastic). Deciding feature: the action outcome is stochastic while the state is fully observable and discrete, so the solution must be a policy rather than a fixed sequence. This is the only stochastic cell filled on the p.19 grid.

4. Planning (structured, deterministic). Deciding feature: objects and relations with a variable object count, so the state must be described by predicates and the actions by preconditions and effects rather than enumerated.

The general recipe, and the one to write in an exam: name the axis value, say which representation the state naturally takes, then read the cell off the grid.

Constructed, in the sample paper's format (not a past question)

Because the task environment is assumed to be fully observable, deterministic and known, a solution to a classical search problem may be a fixed sequence of actions rather than a policy.

True, and the three assumptions are doing the work together: known gives the agent the transition model, deterministic gives each action exactly one successor, and fully observable fixes which state it starts in. Under all three the agent can compute the entire consequence of a plan offline, before executing a single action, so a plan need not say what to do in states it will never be in.

Why "False" is wrong: it usually comes from remembering the conclusion (search returns a sequence) without the premises, and then doubting the premises. Test them by dropping one: drop determinism and an action has several successors, so the agent must be told what to do in each of them, which is a policy and lands you in Parts 8 and 9. Drop static and the world moves while you plan; drop single-agent and the opponent replies to your sequence.

Marking arithmetic: +0.5 correct, -0.25 wrong, 0 blank. This is also the cross-chapter form the theory exam likes: quote the assumption, name what breaks, name the Part that repairs it.

12. The summary slide (p.20)

p.20 compresses the Part into five statements. Three of them are worth re-reading before an exam:

Exam signal · where else Part 2 can surface

On the 2023 sample paper, Part 2 appears once, as the true/false item in Section 6. The pack's list of exercise archetypes begins at Part 3 (state-representation design), and the first exercise session, Representing Search Problems, works on Part 3 material (farmer, fox, goose and grain; Towers of Hanoi). Pack guidance follows from that, not a rule: prepare Part 2 in two forms, as factual true/false items on the axes, and as the justification step inside any open question that asks why a method applies. The second form is the one the vocabulary of Section 3 and the grid of Section 10 are for.

Classic mistake to avoid on the open form: asserting a classification without naming the feature that forces it. "Stochastic, so we use an MDP" earns much less than "the action succeeds only 80 percent of the time, so the successor is a distribution rather than a single state, so a fixed action sequence is not a solution and we need a policy, which is an MDP".

What this sets up

Term box

TermPrecise definitionPlain paraphraseExam phrasing
PEAS The four-slot specification of a task environment: Performance measure (the criterion on environment states, set by the designer), Environment (everything outside the agent that the criterion depends on), Actuators (agent to world channels), Sensors (world to agent channels). pp.4, 5. The job description you write before choosing an algorithm. Not in the 2023 sample paper; the p.4 taxi table is the format a written answer should imitate.
Fully observable vs partially observable (accessible vs inaccessible) Fully observable if the sensors deliver every aspect of the environment state that is relevant to the choice of action at every step; otherwise partially observable. Design consequence on p.6: partially observable implies the agent requires memory (internal state). Can I see everything I need right now, or do I have to remember? "The task environment for self-driving cars is fully observable." (2023 theory MC 1.1, answer False)
Deterministic vs stochastic (and strategic) Deterministic if the next environment state is completely determined by the current state and the selected action. Otherwise stochastic. p.6 names the special case strategic: only the actions of other agents are nondeterministic. Consequence: stochastic implies preparing for contingencies. Does doing X always give the same result? Not in the 2023 sample paper as a Part 2 item; the concept is tested through MDPs (MC 1.7, Part 9).
Episodic vs sequential Episodic if the quality of an action can be evaluated within one episode (one perception plus the action that follows it). Sequential if future developments decide the quality of a present action. p.6. Is each decision scored on its own, or only through what it leads to? Not in the 2023 sample paper. Sequential is the property that makes search necessary at all.
Static vs dynamic (and semi-dynamic) Static if the environment cannot change while the agent deliberates. Semi-dynamic if the environment does not change but the agent's performance score changes with the passing of time (p.7). Dynamic otherwise. Consequence: static implies the agent has time to compute a rational decision. Does the world (or the clock) move while I think? Not in the 2023 sample paper. On p.10, "Semi" appears for chess with a clock and for image analysis.
Discrete vs continuous Discrete if time, states, percepts and actions take values from finite or countable sets (chess); continuous otherwise (a robot moving in a room). p.7. Consequence: continuous time implies a continuously operating controller. Can I enumerate the next states, or is it real-valued? Not in the 2023 sample paper. Every algorithm family in the p.19 grid assumes discrete.
Single agent vs multi-agent Multi-agent if other entities must be modelled as choosing actions to maximize their own performance measure, which may depend on yours; competitive and cooperative variants both count. p.7. Consequence: multi-agent implies the agent may need to behave randomly. Is anyone else deciding, and do they care what I do? Not in the 2023 sample paper as a Part 2 item; the consequence is examined through game trees (MC 1.8, Part 7).
Environment known vs not known Whether the agent knows the rules or physics of the environment, that is, the transition model. Independent of observability (p.8). Consequence: unknown physics implies a need for exploration. A companion axis asks whether the performance measure is known; if not, observe or interact with the human principal. Do I know the rules of the game, as opposed to seeing the board? Not in the 2023 sample paper. The classic confusion is answering the observability item with this axis.
Reflex agent An agent whose program selects an action by matching the current percept (optionally plus memory) against condition-action rules; it does not consider the future consequences of its actions and considers only how the world is. pp.12, 13. A lookup table from what I see to what I do. Not in the 2023 sample paper. p.13's GoWestAgent is the minimal instance.
Model-based (reflex) agent The variant allowed by p.12's second bullet: the agent keeps memory or a model of the world's current state, so it can act correctly under partial observability. The model answers "where am I now", not "what happens if I do A". A reflex agent with a memory, still no lookahead. Not in the 2023 sample paper. Distinguishing it from goal-based is a standard trap.
Goal-based / planning agent An agent that evaluates future action sequences: it holds a model of how the world evolves and of what its actions do, computes "what it will be like if I do action A", tests against explicit Goals, and (optimally) achieves the goal at least cost. p.16. Asks "what if" before moving, and has something to aim at. Not in the 2023 sample paper directly; its boxes map onto the Five Ingredients of Part 3 p.9.
Utility-based agent The third agent type, named in the lecture as the agent types are introduced (around p.11) and then deferred to later Parts: instead of a yes/no goal test it scores states and outcomes on a scale, so it can trade off partial successes and weigh risk. It is what the p.2 definition of rationality (maximize expected utility) actually requires, and it is developed in Parts 8 and 9. Not "did I reach the goal" but "how good is this, on average". Not in the 2023 sample paper as a Part 2 item; examined through MDP items (MC 1.7, exercise Q2, Part 9).
Atomic representation A state is an indivisible token with no internal structure; algorithms may only test identity and goalhood. p.18 panel (a). Used by search (Parts 3 to 5) and MDPs (Part 9). A state is just a name. Not in the 2023 sample paper. Named on the p.19 grid axis.
Factored representation A state is a fixed set of variables, each holding a value, so partial assignments, constraints and propagation over parts of a state become possible. p.18 panel (b). Used by CSPs (Part 6) and SAT (Part 10). A state is a row of named slots. Not in the 2023 sample paper. Named on the p.19 grid axis.
Structured representation A state consists of objects and relations between them, with no fixed a priori variable list, which supports quantification and an open object set. p.18 panel (c). Used by first-order logic (Part 10) and STRIPS planning (Part 11). A state is a little world of things and how they relate. Not in the 2023 sample paper. Named on the p.19 grid axis; open question 3.2 on STRIPS assumes it.

Constructed fill-in, in the format of the sample paper's Part 2 (not a past question)

Fill-in 1 (1 point). An environment that cannot change while the agent is deliberating, but in which the agent's performance score changes as time passes, is called  ................................ . Name the axis this value belongs to, and give the two rows of p.10 that carry it.

Model answer (click)

Semi-dynamic. Axis: static vs dynamic (p.7), whose question is "can the environment change while the agent is deliberating?". The two rows on p.10 that carry Semi in the Static column are chess with a clock and image analysis.

What earns the marks: the exact term plus the p.7 wording that defines it, "if the environment does not change but if the agent's performance score changes as time passes by the environment is denoted as semi-dynamic". Writing only "dynamic" scores nothing, because the board does not change under you; writing "the clock is running" without the term scores nothing either. The answer box on the real paper is one or two lines, and the lecturer says the box size indicates the expected length, so a term plus one justifying clause is the right size.