The agent view gives a single, clear way to describe all AI systems, from a thermostat to a self-driving car.
Agents and Rationality
An agent is anything that perceives its environment through sensors and acts on it through actuators. A person has eyes and ears as sensors and hands as actuators. A robot has cameras and motors. A software agent has input data and output actions. The percept sequence is the history of all that the agent has perceived. The agent function maps a percept sequence to an action. A rational agent chooses, for every percept sequence, the action that is expected to maximise its performance measure, using what it knows. Rationality is not omniscience, since an agent can act only on what it perceives.
Definition: Intelligent agent. An entity that perceives its environment through sensors and acts upon it through actuators so as to achieve its goals, choosing the actions that maximise a performance measure.
Types of Agents
A simple reflex agent acts only on the current percept by condition-action rules, such as a thermostat. It works only when the environment is fully observable. A model-based reflex agent keeps an internal model of the world, so it can handle partial observability, for example a robot that remembers where it has been. A goal-based agent has a goal and chooses actions that lead to it, using search and planning. A utility-based agent has a utility function that measures how good a state is, so it can choose among several ways to reach the goal, for example the safest and fastest route. A learning agent improves its performance from experience, and has a learning element, a performance element, a critic and a problem generator.
Table 1.5: Types of agents
| Agent | Uses | Example |
|---|---|---|
| Simple reflex | Condition-action rules | Thermostat |
| Model-based | Internal model of the world | Robot vacuum with a map |
| Goal-based | Goals and planning | Route planner |
| Utility-based | Utility of states | Self-driving car |
| Learning | Experience | Spam filter |
Example 1.5: Choosing an agent type
Problem: Choose the agent type for (a) an automatic door that opens when it senses a person, (b) a navigation app that finds a route to a place, (c) a navigation app that must trade time against toll cost.
Solution:
- The door acts on the present percept by a rule, so it is a simple reflex agent.
- The route finder has a goal, to reach the place, so it is goal-based.
- Trading time against cost needs a measure of how good each outcome is, so it is utility-based.
Result: (a) simple reflex, (b) goal-based, (c) utility-based.
Common mistakes
- Confusing the sensors, which give percepts, with the actuators, which carry out actions.
- Thinking that a rational agent never makes a mistake. It maximises expected, not actual, performance.
- Using a simple reflex agent where the environment is only partly observable.
Key takeaways
- An agent perceives with sensors and acts with actuators.
- A rational agent maximises its expected performance measure.
- The types are simple reflex, model-based, goal-based, utility-based and learning.
- A learning agent improves with experience.
Practice questions
- What is an intelligent agent?
- Name the five types of agents.
- How does a utility-based agent differ from a goal-based agent?
Answers to the practice questions
- An entity that perceives its environment with sensors and acts on it with actuators to achieve goals.
- Simple reflex, model-based, goal-based, utility-based and learning.
- It measures how good each state is, so it can choose among several ways of reaching the goal.
Sources
- Official BCA syllabus Artificial Intelligence and Expert Systems, course code 25BCA405DS02, Unit I
