2.2 Agent Architecture (BT104CO)
1. The Agent Equation
In the framework of Russell and Norvig, the internal structure of an AI is defined as the Agent Architecture. It is the relationship between physical hardware and controlling software.
- Architecture: The physical device or computing platform (e.g., PC, robotic chassis, cloud server).
- Program: The computer code that implements the Agent Function (mapping percepts to actions).
The Architecture makes percepts from sensors available to the Program, runs the logic, and feeds the chosen actions to the Actuators.
2. Basic Architecture Diagram
The architecture serves as the "bridge" between the software logic and the physical world.
3. Four Basic Types of Agent Architectures
Agent programs are categorized based on how the architecture processes information. As we move down this list, the "internal mind" becomes more complex.
A. Simple Reflex Agent
Acts based only on the current percept, using pre-defined condition-action rules.
- Logic: "If [Condition], then [Action]."
- Best For: Fully observable environments.
- Examples:
- Medical System: If "high fever", prescribe paracetamol.
- Thermostat: If "temp < 20°C", turn on heater.
- Automated Camera: If "lighting is dark", activate flash.
B. Model-Based Reflex Agent
Maintains an internal state that depends on the percept history to handle partially observable environments.
- Logic: "What is the world like now? (Even the parts I can't see)."
- Best For: Environments requiring "memory" of the past.
- Examples:
- Self-Driving Car: Remembers a cyclist in the blind spot from 2 seconds ago.
- Dishwasher: Knows it's in the "rinse cycle" even if current sensor readings match the "wash cycle".
C. Goal-Based Agent
Uses goals to guide its actions, choosing those that lead to a desired state via search and planning.
- Logic: "What will happen if I do Action X, and will it get me closer to my Goal?"
- Best For: Complex tasks where the right action depends on the destination.
- Examples:
- GPS/Maps: Evaluates thousands of turns to find the sequence ending at the goal.
- Robotic Arm: Plans joint trajectories to reach a specific coordinate ("place bolt").
D. Utility-Based Agent
Chooses actions to maximize a utility function ("happiness" or "success") when there are multiple paths or trade-offs.
- Logic: "How happy will I be in this state? Is this path better?"
- Best For: Environments with conflicting requirements (e.g., speed vs. safety).
- Examples:
- Automated Taxi: Chooses the fastest, cheapest, and most comfortable route among many.
- Trading Bot: Balances potential gain against risk of loss.
4. The Learning Agent Architecture
Any of the above architectures can be turned into a Learning Agent, allowing the AI to improve over time.
5. Summary Comparison
| Agent Type | Main Feature | Core Question | Analogs |
|---|---|---|---|
| Simple Reflex | Condition-Action Rules | What do I see now? | Light switch |
| Model-Based | Internal State | What is the hidden state? | Driver in fog |
| Goal-Based | Future Planning | Will this get me there? | Chess player |
| Utility-Based | Preferences | How good is this path? | Travel agent |