Skip to main content
Artificial Computational Intelligence

Intelligent Agents and Problem Solving

Published: 2026-08-13
Level: postgraduate
Audience: Postgraduate students in Artificial Computational Intelligence

Prerequisite Knowledge

This lecture builds on the following concepts from earlier lectures. If any feel unfamiliar, review the linked notes before proceeding.

Previously Covered in This Subject

  • The four definitions of AI — thinking humanly, acting humanly, thinking rationally, and acting rationally — covered in Lecture 1 (Introduction to Artificial Intelligence)

2.1 The Four Definitions of AI

2.1.1 The Four Quadrants and the Shift to Acting Rationally

If four different AI researchers each claim their own version of AI is the "real" one, how do we decide who is right? The answer this lecture gives: it depends on which definition of AI you pick — and today the field has largely settled on one.

The course continues where the previous session stopped: the four classic definitions of artificial intelligence, usually drawn as four quadrants. Thinking humanly means creating a system that mimics the way humans actually think. Acting humanly means creating a system that mimics how humans behave. Thinking rationally means doing what is logically correct. Acting rationally means doing the action that gives the best outcome. All four definitions are legitimate — different research schools each believe their quadrant is the real AI and the only AI — but in the last few years the consensus has shifted strongly toward acting rationally. The realization behind that shift: the goal of an AI system is not just to mimic humans. Acting rationally is the more promising goal, and that is the definition this course builds on.

The four quadrants come from combining two independent questions, each with two answers. First: should the AI match human performance, or match an abstract rational standard? Second: does "intelligence" live in the internal thought process, or in the external behavior we observe? Cross those two dimensions and you get exactly four cells.

Visual intuition: the quadrant grid. Picture a 2 × 2 grid. The horizontal axis runs from thought (left) to behavior (right); the vertical axis runs from human (top) to rational (bottom). The top-left cell is thinking humanly, top-right is acting humanly, bottom-left is thinking rationally, bottom-right is acting rationally. As you move around the grid, the methods change too: the two "human" cells are empirical sciences that need psychology-style observation, while the two "rational" cells are mathematics-and-engineering pursuits that connect to statistics, control theory, and economics.

Definition Human vs rational Thought vs behavior What it asks Success measure
Thinking humanly Human Thought Does the system's thinking match how humans think? Match with observed human thought
Acting humanly Human Behavior Does the system behave like a human? A human cannot tell the difference
Thinking rationally Rational Thought Does the system reason with correct logic? Logical correctness of inferences
Acting rationally Rational Behavior Does the system produce the best outcome? The outcome achieved

Each quadrant is easier to grasp through an everyday example.

2.1.2 Thinking Humanly and Thinking Rationally

Thinking humanly. Imagine a human seeing something and saying, "this looks similar to one I saw yesterday — I think the answer is around 50." That answer came from emotions, habits, or past experiences, not from any logic. If an AI starts behaving this way — reflecting human-like thinking that is driven by emotion and memory rather than reasoning — that is thinking humanly.

In the research world, this quadrant is called the cognitive modeling approach: to make a program that thinks like a human, you first need a theory of how humans think, and you gather that theory in three ways — introspection (watching your own thoughts as they pass), psychological experiments (watching people solve problems under controlled conditions), and brain imaging (watching the brain in action). Once the theory exists, you express it as a program; if the program's input–output behavior matches human behavior, that is evidence the same mechanisms may be at work inside people. The classic example is the General Problem Solver (GPS) built by Allen Newell and Herbert Simon: they did not just check that GPS solved problems correctly — they compared the sequence and timing of its reasoning steps with those of human subjects doing the same problems. This meeting point of AI and experimental psychology is the field of cognitive science.

Thinking rationally. Suppose all assignments are due tomorrow. You deduce: "they must be completed by today, because only then can I submit." Then you add: "I also have an AI assignment due tomorrow, so I must complete it today." This is step-by-step reasoning: a chain of if-then deductions, pure logic, independent of emotions. If an AI behaves this way — holding a set of rules and reducing statements through logical reasoning — that is thinking rationally.

This is the oldest approach of all. The philosopher Aristotle tried to codify "right thinking" with syllogisms — argument patterns that always produce correct conclusions from correct premises. The canonical example: "Socrates is a man; all men are mortal; so Socrates is mortal." Nineteenth-century logicians turned such arguments into precise notation, and by 1965 programs could, in principle, solve any solvable problem expressed in logical notation. The researchers who hoped to build intelligence this way are called the logicist tradition.

Scope: thinking rationally demands certainty. Logic as normally practiced needs rules of the world that are known — like the rules of chess. But the rules of politics, weather, or traffic are not known exactly. The theory of probability extends rational thinking to uncertain knowledge, but there is a catch: even a perfect rational thinker may not produce any intelligent behavior. Correct reasoning is one route to a good outcome, but it is not the only one — a reflex can beat careful deliberation. That gap is exactly why the field moved to acting rationally.

2.1.3 Acting Humanly and Anthropomorphism

Acting humanly. A chatbot says, "that sounds stressful — want to talk about it?" It is not thinking like a human internally; it simply acts like one, showing empathy and initiating a conversation. This behavior is genuinely debatable, and it returns late in the course when ethics are discussed. The concern: some AI agents are deliberately tuned this way so that humans become more dependent on them, telling the AI about their day, their problems, and their joys. This is connected to anthropomorphism — giving human-like characteristics to non-humans. Pet parents name their pets and dress them; similarly, a group of people already treats AI like a human, using it as a therapist. Real-world: chatbot companions that encourage exactly this dependence are a known product pattern.

The historical anchor for this quadrant is the Turing test, proposed by Alan Turing in 1950 as a way around the vague question "Can a machine think?" Instead of debating thinking, you run an experiment: a human interrogator types questions and reads written replies, and if the interrogator cannot tell whether the replies come from a person or a computer, the computer passes the test. Passing a rigorously applied version requires a lot of machinery — natural language processing to converse, knowledge representation to store what it hears, automated reasoning to draw conclusions, and machine learning to adapt. A total Turing test goes further and also demands perception and physical manipulation — computer vision and robotics — because the interrogator can then interact with objects in the real world.

2.1.4 Acting Rationally and the Historical Arc

Acting rationally. To reach the office quickly, you check traffic on a maps app, choose the fastest route, and if walking will not do, you book a cab and go. You act to maximize your goal — reaching faster — regardless of how you think internally. Acting rationally is about doing what gives the best outcome, and it is the quadrant that has taken over.

A rational agent (an entity that perceives and acts — Latin agere, "to do") is one that acts so as to achieve the best outcome or, when there is uncertainty, the best expected outcome. This definition has two advantages over the other quadrants. First, it is more general: correct inference is just one possible mechanism for achieving rationality — recoiling from a hot stove is a reflex, not a deduction, yet it is rational because it works. Second, it is more amenable to scientific development: "maximize the expected outcome" is mathematically well defined, so researchers can prove that a given design achieves it — something that is nearly impossible when the goal is to imitate human thought. This idea is so widespread — control theory minimizes cost, economics maximizes utility, statistics minimizes loss — that it is sometimes called the standard model of AI: build machines that do the right thing, where "right" is defined by the objective we give them.

The recap also re-anchored the historical arc: roughly 78 years of AI history from Alan Turing's question "Can machines think?" through the early workshop era to "Attention is all you need." Many fields have contributed — psychology, computer science, economics, mathematics — and applications now touch almost every field. The four-quadrant framework itself grows out of a long deliberation about what intelligence is, whether humans are always intelligent, and whether non-humans like dogs exhibit intelligence.

Recap: four definitions of AI live in a 2 × 2 grid — thinking humanly, acting humanly, thinking rationally, acting rationally. All four are defensible, but acting rationally has become the consensus because it is general and mathematically tractable. Exam note: expect the definitions themselves — all four are legitimate, and the consensus definition is acting rationally — as well as the ability to tell which quadrant a given behavior belongs to.

Real-world connection. Acting rationally is the quiet engine behind nearly every modern AI product. A navigation app chooses the route with the best expected arrival time; a chess engine searches for the move that maximizes its chance of winning; a recommendation engine picks the item that maximizes your expected engagement. None of them claim to think like a human — they are built to produce the best outcome, which is exactly the definition that now leads the field. In the next section, we turn this definition into something concrete: the agent, the entity that does the perceiving and the acting.

2.2 Agents: Perceiving and Acting

2.2.1 The Agent Definition: Sensors and Actuators

The natural next question after "act rationally" is: act rationally how? The answer starts with the agent — the entity that does the acting. An agent is anything that can be viewed as perceiving its environment through sensors and acting upon that environment through actuators. Perception comes first: only if the agent knows what is around it and what is happening can it act sensibly. In simple terms, any agent has two functions: perceiving and acting. To perceive it uses sensors — the input channel. To act it uses actuators — the output channel.

Three terms carry the whole framework. The environment is the part of the universe whose state matters to the agent — the part that affects what the agent perceives and is affected by the agent's actions. A percept is the content the agent's sensors take in at one instant; the percept sequence is the complete history of everything the agent has ever perceived. The agent's next action can depend on its built-in knowledge and on the whole percept sequence to date — but not on anything it has not perceived. If you could specify the agent's action for every possible percept sequence, you would have said almost everything there is to say about that agent.

Think of the agent as a worker wearing a headset: the headset's microphone is the sensor (it hears instructions), the speaker is the actuator (it replies), and the office around the worker is the environment. The analogy holds as long as we remember that the agent only knows what comes through the headset — anything not picked up by the microphone simply does not exist for the agent.

2.2.2 Human, Robotic, and AI Agents

A human agent illustrates this directly: our sensory organs — eyes, ears, and so on — are the sensors; our body parts — mouth, legs, hands — are the actuators. A robotic agent uses cameras, infrared, and range finders as sensors to know its environment, and motors of various kinds as actuators to act on it. An AI agent is the modern version: an intelligent entity powered by large language models (LLMs), capable of perceiving its environment, reasoning about goals, and executing actions. The same perceive-and-act skeleton applies — it senses its environment, processes information, makes decisions, and performs actions aligned with achieving the assigned objective. The new emphasis, especially in the recent wave of reasoning models, is on how the AI got to the goal, not just on the action itself.

Software agents fill the same skeleton without any body. Their sensors read file contents, network packets, and human input from a keyboard, mouse, touchscreen, or voice; their actuators write files, send network packets, and display text, images, or sound. The environment of a software agent is the computer's data and network — a perfectly valid environment even though it is not physical.

2.2.3 AI Agent versus Agentic AI

This course treats "agent" as a rational agent in general, not as any specific embodiment. The distinction still matters in industry, so it is worth fixing the vocabulary: the difference between an AI agent and agentic AI is the level of autonomy. An AI agent is a single bot trained on past FAQs and learned logic, following predefined scripts: it answers within its scope and nothing more — beyond its control it can only say "do you want to talk to a human agent?" When such an agent is wrapped in software — an input box, a chatbot — that packaging is an AI assistant; the agent is the core part actually powered by the scripts and the LLM. Agentic AI is a network of AI agents that not only answers FAQs but also escalates issues, analyzes customer sentiment, adapts responses, and coordinates with back-end systems — autonomously. That needs real software engineering: orchestration, pipelining, tool calling, and protocols.

Q: On the previous slide, the difference between an AI agent and an agent is the reasoning part, correct? A: Reasoning exists in any agent, but an AI agent places a lot more emphasis on it — especially lately, because we want to know the thought process behind an action. That is why commercial tools like ChatGPT, Gemini, and Claude show a "thinking" phase before producing output, or do some planning first, and many of these apps have modes you can configure.

The same contrast applies one step up the ladder. A typical AI agent is a single agent with predefined scripts, learned logic, its own memory and databases; it just behaves, and it does no tool calling and no talking to other agents. Agentic AI has more autonomy: a network of agents that can escalate, adapt to sentiment, coordinate with back-end systems, and contact other agents — which is why it needs orchestration and pipelining, and why technologies like tool calling, the Model Context Protocol (MCP), and agent-to-agent protocols exist.

Q: You mentioned autonomy — but autonomy exists at the AI agent level too, right? A: Yes, that is exactly it — the difference is the level of autonomy. A typical AI agent is a single agent with predefined scripts, learned logic, its own memory and databases; it just behaves, and it does no tool calling and no talking to other agents. Agentic AI has more autonomy: a network of agents that can escalate, adapt to sentiment, coordinate with back-end systems, and contact other agents — which is why it needs orchestration and pipelining, and why technologies like tool calling, the Model Context Protocol (MCP), and agent-to-agent protocols exist.

A natural worry when you hear "the agent runs on scripts": does the agent need its own data before it can act? The answer is no — the intelligence lives in the underlying model, not in a dataset attached to the agent.

Q: Does an AI agent or agentic AI request data in order to act? Can I have an agent without a dataset? A: Yes, you can. An AI agent or agentic AI is itself just software, but it is powered by an LLM, and that LLM is trained on data. The agent does not need its own dataset to work — its capability comes from the model.

If "anything that perceives and acts is an agent," then the definition must also include people — which turns out to be exactly what the theory wants.

Q: So is a human an agent? A: Yes — a human perceives through sensory organs and acts through body parts, so a human is an agent. And a system of agents working together is agentic AI; an individual agent has limited autonomy. A single autonomous agent with wide capabilities is still just one AI agent.

2.2.4 Examples of Agents

Agents come in many embodiments. Examples include physically grounded agents, intelligent buildings (which can perceive the weather and act on it), autonomous spacecraft, expert systems, and today's trending AI tools (which perceive what you type and take actions from it). Anything that perceives and acts is an agent.

2.2.5 The Agent Function and the Agent Program

Under the hood, every agent contains an agent function — the mapping from percept histories to actions. The agent perceives something in the environment, and something inside the agent translates that percept into an action; that translation is the agent function. The agent program is what runs on a physical architecture to produce that function. In the simplest equation: agent = architecture + program. There are different ways to build this internal mapping — goal-oriented, utility-oriented, and others — which the agent architectures section covers in depth.

Scope: the agent function is an abstract, mathematical description — the full table of "for this percept sequence, do that action." For any realistic agent that table is astronomically large or infinite. The agent program is the concrete, finite piece of code that produces the same behavior without ever storing the full table. Confusing the two — treating the idealized function as something you could simply list — is the trap that led early researchers to the doomed "table lookup" design discussed later in this lecture.

Real-world: virtually every commercial app you chat with — customer support bots on food delivery apps and similar — is technically an AI agent: trained on past FAQs, scripted, low autonomy. The industry is now moving up the autonomy ladder with agentic AI, MCP, and agent-to-agent communication.

Recap: an agent perceives through sensors and acts through actuators; the agent function maps percept histories to actions, and the agent program implements that function on hardware. The vocabulary ladder to keep straight: agent → AI agent → agentic AI, where each rung raises the level of autonomy. Exam note: the autonomy distinction between AI agent and agentic AI is exactly the kind of vocabulary contrast exams probe — be ready to give the definition of each and the single difference that separates them.

2.3 The Vacuum Cleaner Agent

The classic worked example of everything above is a vacuum cleaner agent with exactly two rooms, A and B. It is deliberately tiny, but it shows the full picture: what the agent can perceive, what it can do, and how percepts drive actions.

2.3.1 The Setup: Rooms, Percepts, and Actions

The setup. The agent can perceive four things: A,clean (room A is clean), A,dirty, B,clean, and B,dirty. It can perform four actions: move left, move right, suck, and no-op (no operation — doing nothing). Not every action is legal in every state: from room A the agent cannot go left, because the room ends there; from room B it cannot go right. The legal choices from A are "go right" or "suck"; from B they are "go left" or "suck"; if both rooms are clean it does no-op and keeps quiet.

Every agent has its own action space — the set of actions it can execute — but in a given state only some of those actions are legal. Legality is a property of the state: in the vacuum world, moving into a wall is simply not a possible transition. Designing an agent means specifying both what it can do in general and what it is allowed to do right now. Later in this lecture this same idea returns in a sharper form: the transition model of a search problem, which lists exactly which actions succeed from which states.

2.3.2 The Percept–Action Table

The percept–action table. The heart of the example is a tiny table mapping each percept to an action:

Worked example — the percept–action table. Reading each row: look at the percept, do the listed action.

Percept Action
A, clean Go right — move to room B to check whether it has dirt
A, dirty Suck — remove the dirt
B, clean Go left — back to room A
B, dirty Suck — remove the dirt
A, clean then A, clean First no-op (wait), then go right
A, clean then A, dirty First no-op (wait), then suck

The first four rows are reflex rules: the agent decides from the current percept alone. The last two rows are different — they depend on the history of percepts, which is why the table needs longer percept sequences as rows. Sense-check: every row respects the room boundaries — there is no "go left from A" row because that action is illegal in that state.

The table is only a partial tabulation of the agent function. The full table would need a row for every percept sequence the agent could ever experience — for example, a third reading of A,clean, or any longer history — which is why a real agent program can never store the whole table but must compute the answer from rules.

2.3.3 Waiting: Repeated Percepts

The first two rows are straightforward: if A is clean, go right to inspect B; if A is dirty, suck. The interesting rows are the repeated percepts. Perceiving A,clean once does not mean "immediately move right." The agent can be designed to wait — one reading is not enough. On the first A,clean it does no-op and keeps waiting; on the second A,clean it decides the room is genuinely clean and moves right to B. The professor's verbal account: "the first time when it saw clean, what did it do? No-op — it kept waiting. Let me not quickly hurry and go to the other room. Let me wait for some more time." Likewise, if the second reading is A,dirty, the agent should not go to the other room — it should first suck the dirt. You can push this further and configure the agent to require three clean readings (clean, clean, clean → right), and if a dirty reading appears in between, suck instead. The behavior is fully configurable by the developer.

Why wait at all? Waiting is the agent's way of trusting a noisy sensor. If a single "clean" reading might be a sensor glitch, one observation is not enough evidence; two or three consistent readings raise confidence before the agent commits to moving on. This is a miniature version of information gathering — the agent delays action to collect evidence, a behavior that returns in the discussion of rational agents.

2.3.4 Student Questions and Answers

Q: Should the percept "A, clean" be represented as "A, no-op"? A: No — no-op is not a percept value; it is an operation, an action of doing nothing. So in the table you can put no-op as the action: the room was clean, the agent did nothing and kept quiet. If it is dirty, it sucks.

That correction fixes the vocabulary: percepts are what the agent observes, actions are what the agent does. "No-op" never appears in the percept column, only in the action column.

Q: Is it like waiting for some amount of time? A: Exactly — the wait is configured by the developer. You decide that the agent perceives every 5 seconds, or every 10 microseconds, and you can even make it wait for three clean readings before moving on. All of that configuration is part of designing the agent.

And what happens when the agent stops waiting and starts moving? The same rule-based logic applies on the other side of the room.

Q: What about the percept sequence A,clean then B,clean? A: From A, clean it waits a while and then moves right; in B, clean it waits again and moves back left — and if it keeps finding no dirt, it keeps doing no-op and going back and forth. All of that is legal, as long as the room boundaries are respected.

The point of the whole slide: based on the percept, an agent takes actions; some actions are legal and some are illegal in a given state; and the agent's behavior is decided by its developers. So far this is just "an agent." The next question — what makes such an agent rational — is where the real definition of AI intelligence begins.

Recap: the vacuum world is a complete miniature agent design — four percepts, four actions, a percept–action table, and a configurable waiting policy. Its real lesson: agent behavior is decided by the developer, and every action must respect the laws of the state. Exam note: know the table — especially that no-op is an action (not a percept) and that some actions are illegal in some states, such as moving left from room A.

2.4 Rational and Ideal Rational Agents

2.4.1 The Rational Agent and Its Performance Measure

Recall the fourth quadrant: the AI should act rationally. A plain agent only perceives and acts; a rational agent (also called an intelligent agent) strives to do the right thing, based on what it can perceive and the actions it can perform. The right action is the one that will cause the agent to be the most successful. For the vacuum cleaner: if there is dirt, the right thing is to clean it; if the room is clean, the right thing is not to sit idle forever — it is to go check the other room; from B the agent should not move right, because there is no room to the right. An agent consciously designed to strive for the right thing will succeed.

But how does the agent know what "the right thing" is? We have to decide first, for every agent, what its performance measure is — an objective criterion for the success of the agent's behavior. For the vacuum cleaner, candidate measures include the amount of dirt cleaned up, the amount of time taken, the amount of electricity consumed, and the amount of noise generated. Notice the judgment embedded in the first one: if there is dirt and the agent does not perceive it, or perceives it and does not clean, it is not doing the right thing — so "amount of dirt cleaned" captures that. Performance alone is not enough, though: we need a full specification of performance, environment, actuators, and sensors — the PEAS specification in the next section.

Scope: a performance measure is only as good as the objective it encodes. A famous warning from control theorist Norbert Wiener: make sure the purpose you put into the machine is the purpose you really want. Measure the vacuum agent by "dirt cleaned up in one shift" and a rational agent will happily clean the floor, dump the dirt back on it, and clean it again — maximizing the measure while achieving nothing. A better measure rewards the outcome: one point for each clean square at each time step, with penalties for electricity and noise. Design measures by what you actually want the world to look like, not by how you imagine the agent should behave.

What counts as rational at any instant depends on four things: the performance measure that defines success, the agent's prior knowledge of the environment, the actions it can perform, and its percept sequence to date. In the 1980s people built agents this way: fully rule-based systems where you program everything and the agent matches certain rules. That is still an agent — just the simplest kind of internal design.

2.4.2 The Ideal Rational Agent

The ideal rational agent. The definition to learn carefully: for each possible percept sequence, an ideal rational agent does whatever action is expected to maximize its performance measure, on the basis of the evidence perceived so far and its built-in knowledge. Three words here, and they mean different things. An agent perceives and acts — simple. A rational agent strives to do the right thing, where "right" is configured either by humans or by self-learning, and comes with a specification. An ideal rational agent knows its possible percept sequences and its possible actions, and picks the one that maximizes its performance measure — possibly optimizing several measures at once (time taken, electricity consumed, and so on). Critically, the choice is based on the evidence perceived so far and the built-in knowledge given to the agent at creation. It can maximize one performance or multiple.

A useful human analogy: at any point in life, with a stable mind, we take the decision we expect to maximize our potential based on that day's knowledge. The phrase "I could have done better" makes no sense in hindsight: had I known more, yes — but I did not know that. An ideal rational agent can likewise go wrong in the future and fail to maximize its performance; you still cannot blame it, because at that moment, given what it had perceived and its built-in knowledge, it took the action it expected to maximize the measure. Whether it really maximized it or not is not the question. If it behaves in this fashion, it is an ideal rational agent.

Worked example — rationality is not hindsight. You are walking along a quiet street, no traffic anywhere, and you start crossing to greet a friend on the other side. Halfway across, a cargo door falls off a passing airliner and lands on the spot where you were walking. Were you irrational to cross? No one would say so: given what you could perceive at that moment, crossing was the action with the best expected outcome. Rationality maximizes expected performance; perfection would maximize actual performance. If being rational meant "always take the action that turns out best after the fact," no one could design such an agent without a crystal ball.

2.4.3 Rationality versus Omniscience

Rationality is distinct from omniscience. Omniscience means all-knowing, with infinite knowledge. Humans do not have omniscience — we have finite knowledge — and neither does any real agent. Rationality only demands the best action given that finite knowledge.

Intuition: rationality is a standard for decisions, not a guarantee of outcomes. Two agents facing the same percepts and the same built-in knowledge are both rational if they both pick the action that maximizes the expected performance measure — even when one of them gets unlucky. The rational standard never requires knowing the future; it requires using well everything you do know at decision time.

2.4.4 Acting to Gather Information

Agents can act to gather information. Agents may perform actions to modify future percepts so as to get useful information — exploring before deciding, to expand the "knowledge so far." You have seen this in bot interactions: you give ChatGPT a long task, and it replies with "here is what I have perceived, here is what I can do, can you give me this more information?" or it presents a plan of action first. It is exploring, gathering a little more information so that its answer pleases you — and pleasing you is nothing but maximizing its performance. Agents can be tuned to do exactly this.

The everyday version is crossing a busy road: it would not be rational to step out without looking, because the percept sequence from not looking tells you nothing about the truck approaching. The rational action is to look first — performing an action whose purpose is to shape future percepts — and then decide. Looking is information gathering in exactly the sense defined here.

2.4.5 Autonomy and the Possibility of Ideal Agents

Autonomy. An agent is autonomous if its behavior is determined by its own experience, with the ability to learn and adapt. Are ideal rational agents possible in practice? The honest answer sits in between: you cannot claim 100 percent possibility, but it is the direction the field is heading — in real-world settings, where things are uncertain and we cannot observe everything, we usually end up with good but suboptimal solutions rather than truly optimal agents.

Why require learning at all? Rationality demands using the evidence perceived so far — and an agent that never learns is stuck with only its designer's prior knowledge. A rational agent should learn what it can to compensate for partial or incorrect prior knowledge. Extreme counter-examples show what happens without learning: the sphex wasp drags a caterpillar to its burrow, checks the burrow, and repeats the whole drag-check cycle dozens of times even when an experimenter moves the caterpillar a few inches away each time. Its fixed program cannot adapt, so it keeps failing. Learning is what lets one rational agent succeed in a vast variety of environments instead of one fixed script.

Recap: a rational agent strives to do the right thing, measured by its performance measure; an ideal rational agent picks the action expected to maximize that measure given the percepts so far and its built-in knowledge. Rationality ≠ omniscience, and rational agents gather information and learn. Exam note: be ready to state the ideal-rational-agent definition and to separate the three terms — agent, rational agent, ideal rational agent — plus the one-sentence lesson of the "I could have done better" analogy: expected best, not actual best.

Real-world connection. Modern AI systems live inside this definition. Recommender systems gather information (your clicks) before acting, then pick the recommendation expected to maximize engagement — their performance measure. Self-driving cars constantly look (sensor information gathering) before acting, then choose the action with the best expected safety and legality. Even ChatGPT's clarifying questions are information gathering in the textbook sense: the model asks before answering because more percepts raise its expected performance. The next section turns the four ingredients of this definition — performance, environment, actuators, sensors — into the PEAS checklist used to design any agent.

2.5 PEAS Specification

2.5.1 The Four Components

When designing any agent, the first step is to fill in its PEAS — the standard framework for specifying an agent: P for performance measure, E for environment, A for actuators, and S for sensors. Sensors are for input — observing, like eyes, nose, and ears for humans. Actuators are for action — like hands, mouth, and legs. The framework is used constantly in agent design: for any agent you should be able to propose the performance measures, the environment it works in, the actuators it acts with, and the sensors it perceives with. There is no single exact answer — different valid answers are all correct — but you cannot be radically wrong: for a factory robot, an environment that has nothing to do with the factory, the conveyor belt, and the parts would simply be wrong.

PEAS is the task environment specification: it defines the "problem" to which the agent is the "solution." The first step of designing any agent is to write it out as fully as possible — the performance measure defines success, the environment defines what exists outside the agent, the actuators define what the agent can do, and the sensors define what the agent can observe. Everything else in agent design follows from these four answers.

2.5.2 Worked Example: The Automated Taxi

Worked PEAS: the automated taxi. Performance measure: safety, speed, legality, comfort, maximizing profits — all of these. Environment: roads, traffic signals, pedestrians, other cars, signals. Actuators: the steering wheel, accelerator, brake, turn signal, horn. Sensors: cameras, GPS, sonar, keyboard, engine sensors. The lists are not exhaustive.

Notice the conflicts hiding inside the performance measure: fast and safe are both desirable, yet pushing the accelerator hard pursues the first and endangers the second. A real taxi agent must make tradeoffs between them — which is exactly why the performance measure has several parts rather than one. Also note the richer sensor set a real self-driving taxi would carry: video cameras, lidar and ultrasound distance sensors, a speedometer, an accelerometer, engine sensors, GPS, and touchscreen or voice input for the passenger's destination.

2.5.3 Worked Example: The Medical Diagnosis System

Worked PEAS: the medical diagnosis system. A diagnostic system is trained on medical knowledge; you query it and get advice. Performance measure: a healthy patient, minimized costs, fewer lawsuits. Environment: the patient, the hospital, the staff — the world the system acts in. Actuators: the screen display that shows questions, tests, and diagnosis. Sensors: the keyboard where you enter symptoms, findings, and the patient's answers.

The actuator point is worth dwelling on: the system's only way of affecting the world is the display screen. It cannot perform surgery or prescribe directly — it acts by presenting questions and diagnoses. Its sensors are likewise limited to whatever you type in. This is typical of software agents: the actuator is not the output itself, but the mechanism that produces it.

2.5.4 Activity: The Part-Picking Robot

Activity: the part-picking robot. On a conveyor belt, many parts move past and a robot picks them up, arranges them, and sorts them by color.

Q: For the part-picking robot working on a conveyor belt, what is the PEAS? A: Several answers are right. Performance measures: correct part classification, the percentage of parts placed in the correct bins, accuracy, and the number of items picked. Environment: the conveyor belt with parts and bins. Actuator: the robotic arm. Sensors: a camera with color coding, joint angle sensors, and so on. None of these lists is exhaustive — different answers are fine as long as they are not radically wrong.

Notice how the answers share a pattern with the taxi and the diagnosis system: the performance measure is stated as observable outcomes (percentage in correct bins), the environment is the physical setting, the actuator is the moving mechanism, and the sensors are the perception devices. Once you can fill all four for a new agent, you have its task environment specified.

2.5.5 What the Developer Decides

After listing the possibilities, the developer decides: which performance measure to optimize, what type of environment it is, which actuators and sensors to use, and what each costs. For software agents this shrinks dramatically: sensors reduce to text, voice, or Braille input, and actuators reduce to whatever engine produces the output — text, image, voice, or video. The actuator is not the output itself; it is the mechanism that produces it — the robotic arm in the factory, or an LLM API or image generator in software.

A compact way to remember the whole framework: every agent uses its sensors in its environment E to optimize its performance P using its actuators A. The PEAS specification belongs in the documentation of a system — the world need not know about it in the release, but the documentation should carry it.

Exam note: being able to produce a PEAS specification for any given agent is worth one mark in the mid-sem assessment. There are practice exercises asking for exactly this — solve them for the agents given, and note that every agent yields a whole family of valid performance measures, not one fixed answer. Practice the canonical set: taxi, medical diagnosis system, and part-picking robot.

Real-world connection. PEAS is the standard way industry documents an AI product's contract. A food-delivery bot's PEAS, for example, is: performance — resolved issues and customer satisfaction; environment — the chat window and the order database; actuators — the reply generator; sensors — the incoming message text. RoboCup teams write PEAS for their robots before writing any code. It is also the natural bridge to the next topic: once P, E, A, and S are fixed, the environment — the E — carries its own properties that decide which agent design will work, and those properties are the subject of the next section.

2.6 Properties of Environments

PEAS tells us what the agent is and where it works; now the environment itself deserves a close look. Actuators and sensors are low-level hardware discussions — for software agents they reduce to input and output, text or multimedia — but the environment has a set of properties that determine how the agent must be designed. Six properties matter: observability, deterministic versus stochastic, episodic versus sequential, static versus semi-dynamic versus dynamic, discrete versus continuous, and single-agent versus multi-agent. The environment type largely determines the agent design.

2.6.1 Observability: Fully, Partially, and Unobservable

Can the agent's sensors give it access to the complete state of the environment at each point in time? If yes, the environment is fully observable. A chess or tic-tac-toe game is fully observable: at any point the agent knows where all the pieces are, what it has moved, and what the opponent has moved. The other extreme is completely unobservable: a completely dark room with zero visibility, where the agent has no information at all. In the middle sits partially observable: a partially lit room, or a poker game, where you know your own cards but not the randomly assigned cards of the other players. Autonomous driving is partially observable too.

Q: Why is autonomous driving partially observable and not fully observable? A: Because you only know what your sensors can sense at the moment. A vehicle miles behind you, a traffic signal that could change — you have no complete access to the whole system at any point. Even with sensors, you can sense maybe one kilometer, not more. A chess board, by contrast, is completely knowable at any instant.

An unobservable environment is an extreme and rare case, but it exists: when an agent's sensors fail, it has no percept at all and no knowledge of what is going on — a software agent that cannot take input has no information. In the AI world it happens when sensors fail, actuators are failing, or the database is crashing.

Q: Can you give an example of a non-observable environment? A: It is rare in practice. A blind person still hears and touches, so the world stays partially observable for them. When a person has multiple disabilities — say, someone in a coma — there is no sense of what is going on, and the world becomes not observable at all. In the AI world, the same happens when the sensors fail, the actuators fail, or the database crashes: the agent has no percept and no context.

When the environment is not observable, every other property stops mattering — sequential, continuous, stochastic, all of it. An unobservable environment leaves only one action: make it observable. That is the only reactive mode the agent should enter — contact a human, escalate, do whatever restores at least partial observability.

Scope: observability is about what the sensors reveal, not about the environment itself. The same chess board is fully observable to a chess agent (all pieces visible) but would be partially observable to an agent with a damaged camera. Note also that fully observable environments are convenient because the agent need not maintain any internal state to track the world — everything it needs is in the current percept.

Q: Can we say that a fully observable environment is small enough for the agent to cover, while large environments are only partially observable? A: Yes, that intuition is correct: a small, contained environment can be fully observable; a large one typically cannot, which is why partial observability is the norm in the real world.

2.6.2 Deterministic versus Stochastic

The next state of the environment is deterministic when it is completely determined by the current state and the action executed by the agent. A calculator is deterministic: the same action always produces the same result, like a function call. The environment is stochastic when there is uncertainty in the next state — the weather changes regardless of what the agent currently observes or does, and a robot trying to kick a goal in football operates in a stochastic environment because other players can intervene. In simpler words: the same action leading to the same result is deterministic; the same action leading to different results is stochastic.

Q: Determinism is about the same action giving the same result — not about different actions giving different results, right? A: Exactly. Think of a dice: the action is the same every time — I roll it — yet today I get 2, the next roll 5, the next roll 6. Same action, different outputs: stochastic. In chess, moving the queen is always the same move; it cannot produce different outputs. That is why chess is deterministic. Determinism is not about the end result of a whole game; it is about the action itself.

One more push on the chess example, because it trips up many students: the outcome of a game depends on the opponent too, and the opponent's replies are uncertain — but that uncertainty lives in the opponent, not in the action.

Q: If I make a move in chess, different results can follow — so is it stochastic after all? A: No. We are talking about the move itself, not the result. A bishop move can vary in the number of steps, but the move itself cannot go differently. Same action, same outcome. The end result of the game is a different matter — the opponent's replies create uncertainty there, but that does not make the move stochastic.

2.6.3 Episodic versus Sequential

An episodic environment divides the agent's experience into atomic episodes, and the choice of action in each episode depends only on that episode. A spam email filter classifies one email as spam or not, and the story ends; give the agent one image and ask "is there a cat or not?" — that episode has nothing to do with the next one. This resembles a session in software: whatever you do is independent. A sequential environment is the opposite: current decisions affect future decisions or rely on previous ones, so long-term planning is needed. Pac-Man, an investment portfolio bot, and even chess are sequential — every decision you take now impacts your future moves.

Q: Can you explain the difference between sequential and episodic? A: Take two tasks. You give me a photo and ask how many people are in it — I answer and forget about it. You give me an email and ask whether it is spam — I classify it and forget. Each episode is independent: that is episodic. Now a financial bot: before deciding, it must look at what I have invested, where I have invested, and how the market is doing; and this decision will lead me somewhere tomorrow. Current decisions affect future decisions and rely on previous ones: that is sequential, and long-term planning is needed.

Q: So for episodic decisions, no memory of the past is needed — we can expire it? A: Correct. An episodic agent is not impacted by the past and does not impact the future, so it does not need context in memory — ordinary RAM is enough. A sequential agent needs the context, so you have to play around with short-term and long-term memory.

Dimension Episodic Sequential
Past Does not matter Current decisions rely on previous ones
Future Does not affect it Current decisions affect future ones
Memory None needed — RAM is enough Needs short-term and long-term context
Example Spam filter, image classifier Chess, Pac-Man, portfolio bot, taxi driving

Memory is where the operating system world inspired a classic line of research: how does an OS manage memory when RAM is limited (say 16 GB) but the disk is huge (say 500 GB)? Virtualization, paging, cache memory — the same ideas have been applied to agents: can an agent keep a short-term memory, a cache, and manage out-of-the-box context? Tools like LangChain and LangGraph now handle exactly this agent-memory management. Knowledge graphs are another interesting line in the same direction.

2.6.4 Static, Semi-Dynamic, and Dynamic

A static environment is unchanged while the agent is deliberating or thinking. You think about your next move in a Rubik's cube or a crossword puzzle; the cube does not rearrange itself while you think. A dynamic environment changes while the agent thinks — it is raining, or traffic signals change while you are driving. You wanted to move past, then the light turned red, so you had to stop: because the environment changed, your thinking and your action had to change. Semi-dynamic sits between: the environment itself does not change with time, but the performance score does. Chess with timing is the example — the board does not change while you think, but your score depends on how fast or late you make each move.

Scope: the agent's deliberation time is the reference point. A crossword is static because the grid sits unchanged while you think. Traffic is dynamic because the world keeps moving while you think — and if you have not decided yet, that in itself counts as deciding to do nothing. Semi-dynamic is the special case where only the clock moves: the world stands still, but your score keeps ticking.

2.6.5 Discrete versus Continuous

A discrete environment has limited, countable states — clear, defined percepts and actions. Chess again: all moves are finite and concrete; the number of combinations may run into millions, but the states are discrete values, and each piece has only discrete moves. A continuous environment has infinite possibilities. Driving a taxi involves speed, position, and angle — all continuous variables with continuous values. The real world, with weather and climate, is continuous.

2.6.6 Single-Agent versus Multi-Agent

Is the agent operating by itself in the environment, or are there other agents present? Other agents are anything that changes from step to step or can sense and act. In the software world this property maps directly onto the earlier vocabulary: a single agent is most probably an AI agent — a bot trained on a bunch of things that can do one thing and not beyond that; a multi-agent setup is most probably agentic AI, because the agents work together, orchestrate, and accomplish common goals — like the robots on a car manufacturing line, all working together.

Multi-agent environments come in two flavors. In a competitive one, the other agent's success is your loss — chess against an opponent whose performance measure is to beat you. In a cooperative one, everyone benefits from the same outcome — drivers avoiding collisions all gain from safety, which is why taxi driving is partially cooperative (though also partially competitive: only one vehicle can take a parking space). Communication often emerges as rational behavior in multi-agent settings, and in competitive games randomized behavior can be rational because it keeps you unpredictable.

2.6.7 The Real World: Applying All Six Properties

Now the payoff question: what is the real world like? Go through the properties one by one. Is the real world fully observable? No — it is partially observable: if it were fully observable, we would all be far better informed about everything. Deterministic or stochastic? Life is never deterministic; there is a lot of probability — the real world is stochastic. Episodic or sequential? Sequential — an action taken today impacts tomorrow, and yesterday's decision impacts today; if it were episodic, we could forget the past and restart every day, which is not possible. Static or dynamic? Dynamic — while you deliberate, the world around you keeps changing: a new tool arrives, an action you take influences your whole career. Discrete or continuous? Continuous — the states you can be in are not countable. And the real world has multiple agents — you are not the only one out there.

The real world's report card: partially observable, stochastic, sequential, dynamic, continuous, and multi-agent. That is the hardest combination to design for — which is why real AI systems are good-but-suboptimal rather than perfect, and why the field keeps developing agents that gather information, learn, and plan ahead.

Reading a table of environments row by row helps fix the combinations. Taxi driving: partially observable, multi-agent (other vehicles), stochastic, sequential, dynamic, continuous. A crossword puzzle (or an English tutor): fully observable, single agent, deterministic, sequential (what you fill now affects later moves), static (nothing changes while you think), and discrete — a defined number of states, one of which is the correct answer to the puzzle.

Q: In real-world settings where things are uncertain and we cannot observe everything, can we design a truly optimal agent, or do we usually end up with a good solution? A: Usually only a good solution. We do not have fully optimal solutions for such environments; what we end up with are suboptimal solutions that work well. Fully ideal rational agents are the direction the field is heading, not the everyday reality.

2.6.8 Activities: Deep Blue and Robot Football

Worked example — Deep Blue. Deep Blue — the machine that defeated Garry Kasparov at chess — makes a good classification exercise. Chess is fully observable (without a clock), deterministic, static, discrete, and sequential, because what you do affects your future moves; and it is multi-agent, because you are not playing alone — there is a human agent, Kasparov, across the board.

Sense-check each answer against the definitions: every piece and every move is visible (fully observable); the same move always produces the same board (deterministic); the board does not change while you think (static); the moves are finite and countable (discrete); each move shapes your future options (sequential); the opponent actively works against you (multi-agent).

Worked example — robot football. Robot football (RoboCup, where multiple robots play football) shows the opposite profile. First, it is multi-agent — many players. It is not fully observable: even with a 360-degree view you do not have complete access to every player and what they are doing. It is stochastic — very probabilistic. It is dynamic — while you are playing, someone behind you can act and change the game. It is continuous, and it is sequential.

Sense-check: if the environment class changes almost every property, the agent design must change with it — a static discrete board game and a dynamic continuous football match need completely different architectures.

2.6.9 Additional Student Questions

Q: Episodic and discrete sound similar — how are they different? A: Discrete describes the states of the agent itself — limited, countable states. Episodic describes the overall behavior — my past experience does not influence my future decisions. Different dimensions: one is about the state space, the other about how decisions relate across time.

Exam note: interesting inferences can be drawn between these properties — for example, an environment that is stochastic cannot simultaneously be deterministic, and a fully observable, small environment behaves very differently from a large, partially observable one. Deductions of this kind between the properties are exam-relevant, so practice reasoning across the whole set rather than memorizing each property in isolation.

Real-world connection. Every AI product lives in one of these environment profiles, and the profile dictates the engineering. A self-driving system is built for a partially observable, stochastic, dynamic, multi-agent world — so it needs sensor fusion, prediction, and safety fallbacks. A chess engine gets a fully observable, deterministic, static world — so it can use exhaustive search. A spam filter gets an episodic world — so it classifies each email with no memory. The environment properties are not classroom trivia: they are the specification that selects the agent design, which is exactly the topic of the next section.

2.7 Agent Architectures: Filling the Question Mark

The agent diagram shows an environment, an agent, and a question mark between "perceived via sensors" and "act via actuators." What is the magic in between? The question mark can be filled in many ways — those are the different agent types, or agent architectures. The first attempt historically was the table lookup agent: in the 1970s, when this line of work started, people kept a table of percept sequences, and the agent simply looked up the current percept in the table and returned the mapped action. It is as simple as a search through a huge list: exact match found, take that action. The drawbacks are severe: a huge table is needed, it takes a long time to build, there is no autonomy (it is pure matching), even with learning the table entries take long to learn, and if something does not match, the agent cannot do much. Table lookup was the starting point, not the destination.

After it come the five canonical agent types: simple reflex, model-based reflex, goal-based, utility-based, and learning-based. Each adds a capability to the previous one — that is how they evolved, not a hierarchy, but a useful ladder.

2.7.1 The Table Lookup Agent

Already covered above: percept in, action out, via a lookup table. It is the simplest possible filling of the question mark, with no internal state and no learning.

Scope: the table-lookup idea fails by sheer size. The table needs one row per possible percept sequence — for a lifetime of percepts drawn from possibilities, that is rows. For a self-driving car with camera input at roughly 70 megabytes per second, an hour of driving needs a table with over entries — more than the number of atoms in the observable universe. Even chess, a tiny well-behaved world, needs at least entries. No machine could store such a table, no designer could build it, and no agent could learn it. This is why the architectures that follow matter: they replace the vast table with a small program.

2.7.2 The Simple Reflex Agent

The simple reflex agent interprets its input and matches it against condition-action rules — plain if-else logic. The vacuum cleaner rules are exactly this: if the status is dirty (this came from the percept — the agent sensed the room is dirty), then return "suck"; else if the location is A, return "right" so you can go to the B room; else if in B, go left. Interpreting the input, doing the rule matching, returning the action — done. The drawback is obvious: how many if-else conditions will you write for a real agent? This tiny agent has a few possible actions, so if-else works; for a real agent it does not.

Condition–action rules (also called situation–action rules, productions, or if-then rules) are the skeleton of the reflex agent: the input percept is interpreted into a state description, the first rule whose condition matches that state fires, and its action is returned. The vacuum program is tiny compared with its table: ignoring the percept history cuts the relevant cases from sequences down to just 4 current-percept cases. One structural limit follows immediately: the reflex agent can only act correctly when the current percept carries all the information needed to decide — that is, when the environment is fully observable.

2.7.3 The Model-Based Reflex Agent

The model-based reflex agent keeps more than rules: it also tracks how the world evolves and what my actions do — all captured in an internal model. Whatever it senses gets written back into its state: the previous state, the state before that, and so on. This gives the agent an idea of how the world is evolving and some past data, and the model guides the action. Driving with blind spots is the everyday version: whenever you go through that stretch, you explore the environment, and that knowledge goes into your model, so the next time you have information about that area.

Why the model matters: the agent's internal state is its best guess about the world, updated from percepts using two kinds of knowledge — a transition model (how the world changes, both because of the agent's actions and on its own) and a sensor model (how the world state shows up in percepts). This is what rescues the agent from the reflex limit: with a model, a partially observable world can still be navigated, because the agent carries its history inside rather than needing it all in the current percept.

2.7.4 The Goal-Based Agent

Add a goal, and you get the goal-based agent: it knows what it would be like if it did action A — because the model lets it simulate consequences — and it picks the action that moves toward its goal. The goal comes from the PEAS specification: the performance part defines what the agent was optimized for, and the goal is fed into "what action should I do now." If an action takes the agent toward the goal, take it; otherwise take another. Example: navigation from place A to place B — the agent has a goal, and the percepts plus the model guide it there.

The contrast with reflex behavior is fundamental. The reflex agent brakes when it sees brake lights — period; it has no idea why. The goal-based agent brakes because that is the action its model predicts will achieve the goal of not hitting anything. The goal-based design is more flexible: change the destination and the goal changes, and the same machinery plans a new route — while a reflex agent's rules for when to turn would all have to be rewritten.

2.7.5 The Utility-Based Agent

On top of the goal sits utility — how happy the agent will be in a state, how much utility it gets from doing something. The utility-based agent wants the best outcome, not just any path to the goal. Going from home to office is a goal; any route gets you there. But the utility-based agent asks which route gives the best experience: a long route with traffic and frustration makes you unhappy; a simpler, faster route makes you happy. So it optimizes the choice, not just the arrival. Utility maximization is still goal-oriented — that is why utility builds on top of the goal: you want to achieve the goal, but with the best possibility.

Utility (from economics — "the quality of being useful") is a number assigned to each world state that measures how happy the agent would be in it. The utility-based agent chooses the action that maximizes the expected utility — the average utility over all possible outcomes, weighted by their probabilities. Goals give only a coarse binary: happy or unhappy. Utility lets the agent compare two ways of reaching the same goal — which is essential when goals conflict (speed versus safety) or when no goal is guaranteed (a route that usually works versus one that rarely does).

2.7.6 The Learning Agent

The learning agent adds a critique: it improves based on feedback. The structure has a learning element that produces learning goals, a performance element that acts, and a critic that evaluates the result; a generator can even make the performance element select suboptimal actions so that the agent has a chance to learn, and the learning element then selects a better action next time.

The braking example makes it concrete. Input percept: a red traffic signal. The performance element is triggered; the output is "press the brake." Now suppose the resulting state is bad: the car should have stopped before the zebra crossing, but it came too far. That is a negative critique — exactly like reinforcement learning. At 50 meters the agent performed a 17K Newton braking force and went way past the zebra crossing, so it got a negative critique.

Worked example — the braking agent learns. The agent drives toward a red signal and must stop before the zebra crossing. It perceives "50 meters to the crossing," applies a braking force, and observes the result.

  • Attempt 1: 17,000 Newtons of braking force at 50 meters. Result: the car crosses past the zebra line — a bad outcome.
  • The critic assigns a negative critique: the performance element's action was not good enough.
  • The learning element adjusts the policy, and the next time the agent faces the same percept ("50 meters"), it applies a corrected force.

The loop is textbook reinforcement learning: act, receive a reward or penalty signal, adjust the action for the next time. Sense-check: the corrected force must be larger than 17,000 Newtons — the car came too far, so it needs stronger braking, not weaker — and after a few rounds the agent reliably stops before the line.

Q: In the braking example, you said next time apply 15K instead of 17K — but if 17K at 50 meters took the car past the zebra crossing, shouldn't the agent apply more force, not less? A: Good catch — yes. To stop before the crossing the agent should apply more braking force, not less. The point of the example stands: the negative critique tells the learning element to adjust the next action, so next time, with a similar percept, the agent applies a corrected force and keeps improving. Another comment added that utility maximization is goal-oriented, which is why utility builds on top of the goal.

The next time it faces the same percept — 50 meters away — the agent does not repeat the mistake: it adjusts the force, the model updates, and the behavior improves. That is learning.

2.7.7 Student Questions and Answers

Q: Which of the five agents is the fastest? A: The reflex agent — the word itself says it. It just does a lookup: if a condition matches, it returns the action. No model referencing, no goals list, no optimization. It is fast, but its performance is not always guaranteed, and it cannot capture all the possibilities — the table goes beyond its limit for a big agent.

Speed is one axis; structure is another. The ladder order tempts many students into thinking the types are ranked — they are not.

Q: Are these agent types a hierarchy? A: No — the order given (simple to model, model to goal, utility, and learning) is the order in which the types evolved, but they are not hierarchical. They are different ways to fill the question mark, and you can combine them: goal plus utility, or goal plus utility without the learning loop. An agent that is not learning-based just keeps working on goal and utility with no feedback loop.

Since the types are combinable building blocks, the practical question is which ones a real product needs.

Q: Should all these agents work in tandem to serve a real use case? A: Not necessarily. If you built a small agent that does only one part of a job, you do not need utility and learning — for some actions a simple reflex is good enough. The model itself is a black box for now: you could build your own or use an existing one; the software engineering of where the model comes from is out of scope here.

Q: What is the difference between optimize and improve? A: Optimizing is about the end result — you want the best outcome, which is what the utility-based agent does, like choosing the best route from home to office. Improving is about the agent itself — the agent learns from data, like a recommendation engine that gets better with what you like. Optimize stays within the current model; improve updates the agent, so later outputs get better too.

And because each rung of the ladder does more work, the response time grows as you climb.

Q: By the sequence from reflex to learning agents, does the time taken to act increase? A: Of course — it depends on the design, but reflex is the fastest by construction, because it does nothing but match. The later types spend time referencing the model, the goals list, and the utility, so the time taken to act increases down the list. These are architectural decisions: fast but not necessarily optimal in terms of the performance measure.

Correlate the ladder with humans: are we rule-driven? In some cases, yes — fire will hurt, so we pull our hand back; simple reflexes are hard-coded from childhood (with research even debating whether they pass through DNA). Are we model-based? Also yes — you have not explored part of a city, you go there, details go into your mind, and the next time it guides you; people telling you the Taj Mahal is crowded in the summer is your model guiding your percepts. Goal-based: you have a goal to reach and percepts and the model guide you there. Utility-based: route optimization. Learning-based: recommendations that learn what you like.

Recap: the five architectures fill the question mark with progressively more machinery — rules, internal model, goals, utility, and learning — and each addition costs response time. They are combinable, not hierarchical. Exam note: the contrast pair to know cold is optimize (the end result, utility-based) versus improve (the agent itself, learning-based), plus the fact that the reflex agent is the fastest because it does nothing but match.

Real-world connection. Every agent product is a mixture of these five designs. Recommendation engines (Netflix, music apps) are everyday learning agents: a critic scores your engagement, and the model improves with what you like. Navigation apps are everyday utility-based agents: they evaluate routes by expected happiness — time, traffic, tolls — not just by arrival. Simple reflex rules survive in safety-critical microcontrollers — a factory robot's emergency stop is pure condition-action logic. Agentic AI architecture in general is a much bigger software layer on top of these fundamental agent types, but this course stays at the fundamentals.

2.8 Problem-Solving Agents and Search Problems

A large share of early AI work was about problem-solving agents (PSA): formulating a problem as a search problem. A surprising number of problems can be modeled this way and then solved by search. The recipe has three steps. First, formulate: define the problem and its components. Second, search: solve the problem using search algorithms. Third, execute: run the solution as a fixed sequence of actions.

The pseudo-code of a problem-solving agent works like this. It has a problem (the problem formulation), a goal (initially null), a state (a description of the current world state), and a sequence of actions. When a percept arrives, the agent updates its state with this new information. If the action sequence is empty — nothing has been done yet, this is the first time — the agent creates the goal, formulates the problem, and searches. If a sequence is found, it sends back the next action; otherwise it reports failure.

Search is the computational process of looking ahead for a sequence of actions that will achieve the goal; a search algorithm takes the problem as input and returns a solution or a failure report. The full problem-solving loop has four phases: goal formulation (adopt the goal — goals organize behavior by limiting which actions are worth considering), problem formulation (build an abstract model of states and actions), search (simulate action sequences inside the model until one reaches the goal), and execution (carry out the solution actions one at a time).

2.8.1 What a Problem-Solving Agent Is

A problem-solving agent takes a goal and turns the world into a search problem: start at some initial state, apply actions, check for the goal. Not every problem can be modeled this way — but most can, and that is where the field started: people cared about modeling a problem as a search problem (initial state, goal state, transition, possible states, cost) and then applying search techniques on top. Every search technique has its own pros and cons.

2.8.2 The Five Components of a Search Problem

Every search problem has five components: the initial state, the possible actions (also called operators) that the agent can apply, the successor function — given an action, where will the agent reach? (also called the transition model) — the goal test, which checks whether a state is the goal, and the path cost. A path is a series of actions, each action carrying a cost that depends on the problem; the path cost is a function assigning a numeric cost to each path — the minimum duration, the money involved, or any performance metric you choose. A solution is the path plus its cost; an optimal solution reaches the goal with the least cost.

Each component has a standard form. The transition model is a function that maps a state and an action to the resulting state:

The goal test is a function that decides whether a state is a goal state:

The path cost adds up the costs of every action in the path — costs are assumed additive:

where is the numeric cost of one action — for route finding, the length in kilometers or the time in minutes. Writing these five things is what formulating a problem for a problem-solving agent means.

2.8.3 State, State Space, Path, and Solution

A state is all the information about the environment needed to make a decision for the task at hand — not "fully observable," but the whole set you know about the environment now (partial observability, stochasticity, dynamism included). The state space is the set of all states reachable from the initial state: I am here, where can I go from here. The state space forms a graph in which the nodes are states and the arcs between nodes are actions. In that graph, a path is a sequence of states connected by a sequence of actions — and the state-to-state transitions carry costs. The solution of a problem is a path in this graph from the initial state to the goal state. The state-space representation is the basis of most AI methods.

State space versus search tree: the state space is the graph of all reachable states and the actions between them — it exists whether or not the agent explores it. The search tree is what the agent actually builds while searching: a node for each visited state, with the root at the initial state. The same state can appear in many nodes of the tree (through different paths), and each node has a unique path back to the root. The tree is the working memory of the search; the state space is the territory being explored.

2.8.4 Worked Example: Arad to Bucharest

Worked example — Arad to Bucharest, the five components. A map with cities and roads is the classic concrete example. The agent is in Arad; the goal is to reach Bucharest. The five components:

  • Initial state: in(Arad) — the agent's start state. (This notation, incidentally, comes from Prolog, an English-like language with predicates, covered in the later half of the course.)
  • Possible actions: the set of applicable actions in the current state. From in(Arad) the applicable actions are go(Sibiu), go(Timisoara), go(Zerind) — the three roads leaving Arad. The action itself is "go."
  • Transition model: the resulting state of an action in a given state, modeled as a result function: . For example, , , and . From Sibiu, new possibilities open: go(Rimnicu Vilcea) or go(Fagaras).
  • Goal test: — pass in in(Bucharest), the answer is yes; pass in in(Sibiu), the answer is no — you have not reached the goal, so you keep expanding from the new state.
  • Path cost: a function assigning a numeric cost to each path. From Arad to Sibiu the cost is 140 units, and you keep adding the cost of each action until you reach the goal: .

With the real road distances: Arad–Sibiu = 140, Arad–Timisoara = 118, Arad–Zerind = 75, Sibiu–Rimnicu Vilcea = 80, Sibiu–Fagaras = 99, Rimnicu Vilcea–Pitesti = 97, Fagaras–Bucharest = 211, Pitesti–Bucharest = 101. The cheapest route is Arad → Sibiu → Rimnicu Vilcea → Pitesti → Bucharest with total cost . The detour through Fagaras costs — a valid solution, but not the optimal one. Sense-check: every city touched is reachable by an actual road, every number is a real road distance, and the optimal path has the smallest total — you can verify no other route beats 418 by summing each alternative.

Q: Where do we define the goal in this problem? A: The goal is defined in advance — a priori — before the search begins: we want to reach Bucharest. The goal state, the initial state, and the rest are all part of the problem formulation.

Abstraction is part of the formulation. In reality, the agent in Arad has many possible states — it might be in the middle of the city, near the airport, at a shopping center, in a hotel — and many possible actions: it can halt, take a detour, turn on the radio, and so on. All of that is irrelevant to finding the path to Bucharest, so we abstract it away. The formulation keeps only the details that matter for the goal; that is why problem formulation is a process of deciding what actions and states to consider given the goal. The abstraction must be valid — every real-world state that counts as "in Arad" must be able to reach some state that counts as "in Sibiu" by driving — and it must be useful — the abstract action "drive from Arad to Sibiu" must be easy to carry out without further search. Remove as much detail as possible while keeping both properties.

2.8.5 Worked Example: The Vacuum World Formulation

Worked example — the vacuum world as a search problem. Revisit the vacuum cleaner.

  • States: two rooms, each clean or dirty, plus the agent's location — eight combinations: . In general, rooms give states.
  • Initial state: any state with the agent's position and the dirt conditions.
  • Actions: left, right, suck.
  • Transition model: left moves the agent to the left location, except when it is already in the leftmost location; right is analogous; suck removes the dirt from the current room.
  • Goal test: checks whether all locations are clean.
  • Path cost: each step costs 1, so the path cost is the total number of steps.

The designer decides only the path cost and the goal test; the rest follows from the world. The transition diagram maps all eight states and every move: from the leftmost state, "left" keeps you where you are; "suck" removes the dirt but you remain in the same room; moving right crosses to the other room, and so on. Sense-check the count: the agent has 2 possible locations, and each room independently holds dirt or not — , matching the eight nodes of the state-space diagram.

2.8.6 Worked Example: The 8-Puzzle

Worked example — the 8-puzzle. The 8-puzzle is a grid with eight numbered tiles and one empty spot.

  • Start state: a given scrambled arrangement.
  • Goal state: the tiles arranged 1, 2, 3, 4, 5, 6, 7, 8 with the empty spot at the end.
  • Actions: move a tile up, down, left, or right into the empty spot. (Equivalently, think of the blank space itself moving up, down, left, or right — this is the simpler description.)
  • Transition model: for example, move tile 2 down, and you reach the next state; move tile 4 left, and you reach another; move 6 up; move 8 right — you can keep drawing the transition diagram, the state-space diagram, from any state. When the blank is at an edge or corner, some actions are not applicable.
  • Path cost: one per move, like the vacuum world.

The exercise is to produce the five components yourself, and to sketch the transition diagram. The puzzle is also where a compact goal representation pays off, because the goal can be written as a condition rather than a picture. One mathematical way to write the goal condition: for every position from 1 to 8, the tile sitting in position must hold the value , and position 9 must be empty — a compact formula of the form

Sense-check: with a formula, the goal needs no diagram at all — any arrangement satisfying the condition is the goal state, which is exactly what a search program can test mechanically.

Q: Can I represent the 8-puzzle goal state as a mathematical formula — each tile is an increment of the next? A: Yes, exactly — you have to represent the goal state, and you can define it compactly: the tile in position holds the value (one plus the previous position), with the last cell empty. For larger puzzles, a formula is the only practical representation — you cannot draw a picture of the goal state for a 15-puzzle or a 999-puzzle, but the condition scales perfectly.

Search, then, is the process of looking for a fixed sequence of actions that reaches the goal, and a search algorithm is what takes the problem as input and outputs that sequence. For most problems — tic-tac-toe, games, route planning, many more — formulate them as search problems, apply a search algorithm, and the result is what people call intelligent software.

ACI Lecture 2 notes · Intelligent Agents and Problem Solving

Artificial Computational Intelligence· postgraduate· 2026-08-13

Sections Breakdown

12.1 The Four Definitions of AI

The four quadrants formed by human versus rational and thought versus behavior, thinking rationally versus thinking humanly, anthropomorphism and the Turing test, and why acting rationally has become the consensus definition.

22.2 Agents: Perceiving and Acting

Sensors and actuators, human, robotic, and AI agents, the AI agent versus agentic AI distinction, examples of agents, and the agent function implemented by an agent program.

32.3 The Vacuum Cleaner Agent

The two-room vacuum agent: four percepts and four actions, the percept-action table, waiting on repeated percepts, and student questions and answers.

42.4 Rational and Ideal Rational Agents

The performance measure, the definition of the ideal rational agent, rationality versus omniscience, acting to gather information, and autonomy and the possibility of ideal agents.

52.5 PEAS Specification

The four components of PEAS, worked examples for the automated taxi and the medical diagnosis system, the part-picking robot activity, and what the developer decides.

62.6 Properties of Environments

Observability, deterministic versus stochastic, episodic versus sequential, static versus dynamic, discrete versus continuous, single-agent versus multi-agent, the real-world profile, and the Deep Blue and robot football activities.

72.7 Agent Architectures: Filling the Question Mark

The table lookup agent and its size failure, the simple reflex, model-based reflex, goal-based, utility-based, and learning agents, and student questions and answers.

82.8 Problem-Solving Agents and Search Problems

What a problem-solving agent is, the five components of a search problem, state, state space, path and solution, and the worked examples of Arad to Bucharest, the vacuum world, and the 8-puzzle.

92.9 Uninformed and Informed Search

Uninformed search with BFS, DFS, and uniform-cost search, informed search and heuristics with the A* evaluation function, and study advice and exam notes.

10Exam Guidance Summary

The EC1 assessment structure and where the marks live in the content: PEAS, the four definitions, agent vocabulary, environment properties, architectures, search components, and vocabulary precision.

11Key Industry Applications

The real-world applications named in the session: customer-support bots, agentic AI orchestration, reasoning phases of ChatGPT, Gemini, and Claude, agent memory, Deep Blue, RoboCup, autonomous taxis, and more.

Postgraduate students in Artificial Computational Intelligence

Exam Revision Notes

Below is the distilled, exam-ready core. Every entry comes from the full explanation above. Use this section for rapid review; return to the main notes when a point needs more context.

2.1 The Four Definitions of AI

Must-know: All four definitions of AI are legitimate, but acting rationally is the consensus definition: do the action that gives the best (expected) outcome.

⚠️ Top pitfall: Confusing thinking with acting: thinking rationally demands certain knowledge and correct inference, while acting rationally is broader — a reflex can be rational without any reasoning.

Self-check: A chatbot says "that sounds stressful" — which quadrant does its behavior belong to, and what is the concern attached to it?

Connects to: 2.2 Agents: Perceiving and Acting

2.2 Agents: Perceiving and Acting

Must-know: Agent = perceives via sensors + acts via actuators; AI agent vs agentic AI differ by level of autonomy; agent = architecture + program.

⚠️ Top pitfall: Treating the agent function as a storable list of rules — for any real agent the percept-sequence table is astronomically large or infinite; a finite agent program must produce the behavior instead.

Self-check: A human perceives through sensory organs and acts through body parts — is a human an agent?

Connects to: 2.1 The Four Definitions of AI, 2.3 The Vacuum Cleaner Agent, 2.7 Agent Architectures: Filling the Question Mark

2.3 The Vacuum Cleaner Agent

Must-know: Percept-action table of the vacuum agent: dirty -> suck, clean -> move to the other room, repeated clean -> wait (no-op) then move. No-op is an action, not a percept.

⚠️ Top pitfall: Calling no-op a percept value — no-op is an action of doing nothing; percepts are observations, actions are operations.

Self-check: The agent sees A,clean twice in a row — what does it do, and why does it wait?

Connects to: 2.2 Agents: Perceiving and Acting, 2.4 Rational and Ideal Rational Agents, 2.8 Problem-Solving Agents and Search Problems

2.4 Rational and Ideal Rational Agents

Must-know: For each possible percept sequence, an ideal rational agent does whatever action is expected to maximize its performance measure, based on the evidence perceived so far and its built-in knowledge.

⚠️ Top pitfall: Judging rationality by the outcome instead of the decision: an agent that picks the expected-best action and still fails is not irrational — rationality maximizes expected, not actual, performance.

Self-check: A car starts crossing an empty street and a cargo door falls nearby — was the driver irrational?

Connects to: 2.1 The Four Definitions of AI, 2.5 PEAS Specification, 2.2 Agents: Perceiving and Acting

2.5 PEAS Specification

Must-know: For any agent, be able to state PEAS: performance measure, environment, actuators, sensors — worth one mark in the mid-sem assessment.

⚠️ Top pitfall: Listing the output itself as the actuator — the actuator is the mechanism that produces the output (robotic arm, LLM API, screen display), not the output text or image.

Self-check: Give the PEAS for a part-picking robot sorting parts by color on a conveyor belt.

Connects to: 2.4 Rational and Ideal Rational Agents, 2.6 Properties of Environments

2.6 Properties of Environments

Must-know: The six environment dimensions and the real-world profile: partially observable, stochastic, sequential, dynamic, continuous, multi-agent. Deep Blue (fully observable, deterministic, static, discrete, sequential, multi) vs robot football (opposite on almost every dimension).

⚠️ Top pitfall: Calling chess stochastic because the game's outcome varies with the opponent — determinism is about the action itself: the same move cannot produce different outputs.

Self-check: Classify the crossword-puzzle environment on all six properties.

Connects to: 2.5 PEAS Specification, 2.7 Agent Architectures: Filling the Question Mark

2.7 Agent Architectures: Filling the Question Mark

Must-know: Five architectures in evolution order: simple reflex, model-based reflex, goal-based, utility-based, learning-based — combinable, not hierarchical. Reflex is the fastest agent; optimize targets the result, improve targets the agent.

⚠️ Top pitfall: In the braking example, applying less force after overshooting the crossing — the negative critique demands MORE braking force, not less.

Self-check: Which agent type keeps an internal model of how the world evolves, and why does that let it handle partial observability?

Connects to: 2.4 Rational and Ideal Rational Agents, 2.6 Properties of Environments, 2.5 PEAS Specification

2.8 Problem-Solving Agents and Search Problems

Must-know: The five components of a search problem: initial state, actions, transition model result(s,a)=s', goal test IsGoal(s), and additive path cost g(path)=sum of c(a). Optimal solution = least-cost path from initial to goal state.

⚠️ Top pitfall: Forgetting abstraction: keeping irrelevant details (radio, detours, exact position inside the city) in the formulation makes the problem intractable — the formulation keeps only details that matter for the goal.

Self-check: From in(Arad), which actions are applicable, and what is the optimal route to Bucharest?

Connects to: 2.3 The Vacuum Cleaner Agent, 2.9 Uninformed and Informed Search, 2.7 Agent Architectures: Filling the Question Mark

2.9 Uninformed and Informed Search

Must-know: Uninformed search works only on the problem's own information (BFS, DFS, UCS); informed search adds heuristics. UCS is Dijkstra's algorithm by another name. A* evaluation function: f(n) = g(n) + h(n).

⚠️ Top pitfall: Calling the problem's own costs "heuristics" — costs in the graph are part of the problem; only extra information beyond the problem counts as a heuristic.

Self-check: Why is a graph's edge costs not a heuristic, and what would make the search informed?

Connects to: 2.8 Problem-Solving Agents and Search Problems

Exam Guidance Summary

Must-know: PEAS specification is worth one mark in the mid-sem assessment; environment-property inferences and the vocabulary contrasts (agent vs rational vs ideal rational; AI agent vs agentic AI; optimize vs improve; deterministic vs stochastic) are exam-relevant.

⚠️ Top pitfall: Treating exercises as the deliverable — they are practice, not marks; the goal is to do two tasks cold: give a PEAS for any agent and classify any environment.

Self-check: How many marks is EC1 worth, and how are the two quizzes combined?

Connects to: 2.5 PEAS Specification, 2.6 Properties of Environments

Key Industry Applications

Must-know: Every AI product is an agent with a PEAS specification, an environment profile, and a fundamental architecture: recommendation engines are learning agents, navigation apps are utility-based agents, financial bots are sequential decision-makers.

⚠️ Top pitfall: Pigeonholing a product into one architecture — real systems combine designs (goal + utility, or goal + utility without learning).

Self-check: Why are recommendation engines called everyday learning agents?

Connects to: 2.2 Agents: Perceiving and Acting, 2.7 Agent Architectures: Filling the Question Mark, 2.5 PEAS Specification

Was this lecture useful?

Loading comments…
🤖

BitsNotes AI Assistant

Subject Notes Assistant

Configure AI Chat

Choose how to access the chatbot
Have your own API key?

Switch to "Bring Your Own Key" tab above for unlimited access with any OpenAI-compatible provider.

🔑 Enter API key above to fetch live models from provider, or enter model name manually.
OpenAI-Compatible API Support

Choose any provider preset (Gemini, DeepSeek, Kimi, GLM, MiniMax, Qwen, OpenAI, Groq, Ollama, etc.) or enter a custom endpoint URL.

Security & Privacy First

Your API key is sent directly from your browser to your specified provider. BitsNotes servers never store or see your key.