A topic in the Open Knowledge Graph — a free, open map of 15,495 topics and the order to learn them in.
An agent is anything that perceives its environment through sensors and acts on it through actuators, such as a robot, a chess program or a thermostat. A rational agent chooses, for each sequence of percepts, the action expected to do best on a stated performance measure, given what it has perceived and what it knows. Designing an agent starts with describing its task environment, often with the PEAS checklist (Performance measure, Environment, Actuators, Sensors), and classifying that environment, for example as fully or partially observable. That classification largely decides which kind of agent program, from simple reflex to utility-based learning agent, is appropriate.
Follow the opening chapters of Russell and Norvig's *Artificial Intelligence: A Modern Approach*: write a PEAS description for several tasks (a vacuum robot, a taxi driver, a spam filter, a crossword solver), then classify each environment on every dimension. Implement a reflex agent for a two-square vacuum world and show where it fails, then add internal state and a goal. Discuss how a badly chosen performance measure produces technically rational but unwanted behavior.
Much of AI can be described with one idea: an agent acting in an environment. The agent receives percepts through its sensors and changes the world through its actuators. A robot vacuum senses dirt and bumps and drives wheels and a brush. A chess program perceives the board and outputs moves. Mathematically, an agent's behavior is an agent function from the whole percept history to an action. The code that computes it is the agent program.
What makes an agent good? Russell and Norvig define a rational agent as one that, for each possible percept sequence, selects the action expected to maximize its performance measure, given its percepts and built-in knowledge. Three points follow. The performance measure must be stated by the designer, and it should reward what we actually want: a vacuum scored on "dirt picked up" might dump dirt and pick it up again. Rationality is about expected results, not guaranteed ones. And a rational agent should gather information and learn when that improves its expected performance.
Before designing an agent, describe its task with PEAS: Performance measure, Environment, Actuators, Sensors. Then classify the environment along several separate dimensions:
These answers guide the design. A simple reflex agent maps the current percept to an action with if-then rules. It is enough only when the environment is fully observable. A model-based reflex agent keeps internal state to track what it cannot currently see. A goal-based agent considers future action sequences that reach a goal, which leads directly to search and planning. A utility-based agent compares outcomes by how desirable they are, which matters when goals conflict or results are uncertain. Any of these can become a learning agent that improves its own components from experience.
The rest of an AI course can be read through this lens. Search and planning serve goal-based agents. Probability serves partially observable, stochastic worlds. Learning serves unknown ones.