2 Intelligent agents
Intelligent Agents
Agents
Definition: An agent is anything that can perceive its environment through sensors and act upon it through actuators.
Human Agents: Use eyes, ears (sensors); hands, legs, mouth (actuators).
Robotic Agents: Utilize cameras and infrared range finders (sensors); various motors (actuators).
Software Agents: Perceive through keystrokes, file contents, and network packets; act by displaying information on screens, writing files, and sending packets.
Every agent can perceive its own actions but not always the effects of those actions.
Agent Structure
Components:
Sensors: Devices that gather data from the environment.
Actuators: Mechanisms that execute actions based on decisions.
Environment: The external context in which an agent operates.
Percept and Percept Sequence
Percept: The agent's perceptual inputs at any moment.
Percept Sequence: The complete history of the agent's perceptions.
An agent's choice of action can depend on the entire percept sequence. This implies the need for a specified action choice for every possible percept sequence.
Agent Function & Agent Program
Agent Function: Mathematically describes agent behavior, mapping percept sequences to actions (f: P* -> A).
It can be represented by a table, which becomes impractical in real-time situations.
Agent Program: The implementation of the agent function, functioning within the agent architecture.
Difference: The agent function is abstract; the program is concrete.
Vacuum Cleaner World Example
Environment: Consists of two locations: square A and square B.
Perceptions: Clean or Dirty?
Actions: Move left, Move right, suck dirt, or do nothing.
Example of Agent Function:
If the current square is dirty, then suck dirt; otherwise, move to the other square.
Percept-Sequencing Actions:
Percept Sequence | Action |
|---|---|
{A, Clean} | Right |
{A, Dirty} | Suck |
{B, Clean} | Left |
{B, Dirty} | Suck |
Concept of Rationality
Rational Agent: One that consistently does the right thing, where correct actions yield the most success.
Performance Measure: Assesses actions based on their desirability, although there is no universal measure applicable to all agents.
Performance Measure
An objective function that quantifies agent performance based on actions taken influenced by percepts.
Example metrics include amount of dirt cleaned, time taken, electricity consumed, and noise generated.
Specifying Task Environment
The design of an agent begins by specifying its task environment using four parameters:
Performance
Environment
Actuators
Sensors
Known together as PEAS (Performance, Environment, Actuator, Sensor) specification.
PEAS Examples
Automated Taxi Driver
Performance Measure: Metrics include reaching destination, minimizing fuel and trip time, adhering to traffic laws, and ensuring safety and comfort.
Environment: Interactions with roads, traffic signals, other vehicles, pedestrians, and customers.
Actuators: Control over vehicle operation systems.
Sensors: Systems for location and vehicle detection.
Medical Diagnosis System
Performance Measure: Healthy patients, minimal costs, and avoiding lawsuits.
Environment: Hospital setting with patients and staff.
Actuators: Displays for diagnostic and treatment information.
Sensors: Inputs for symptoms and patient responses.
Part Picking Robot
Performance Measure: Success rate of parts sorted into correct bins.
Environment: Conveyor belt with parts and bins.
Actuators: Robotic arm movement.
Sensors: Cameras and joint angle detectors.
Online English Tutor
Performance Measure: Students’ test scores.
Environment: Engaging with learners.
Actuators: Displays for exercises and suggestions.
Sensors: Input through keyboard entries.
Types of Environments
Fully Observable vs. Partially Observable:
Fully observable environments provide complete visibility for agents.
Partially observable environments leave gaps in the agent’s knowledge due to sensor limitations or noise.
Deterministic vs. Stochastic:
Deterministic environments have predictable outcomes based on current state and actions.
Stochastic environments introduce unpredictability, such as traffic conditions in driving.
Episodic vs. Sequential:
Episodic environments handle independent tasks; actions are evaluated in isolation.
Sequential environments are interdependent, where previous actions affect future choices.
Static vs. Dynamic:
Static environments remain unchanged while the agent makes decisions; dynamic environments evolve simultaneously with the agent's actions.
Discrete vs. Continuous:
Discrete environments feature defined states and actions.
Continuous environments involve fluid changes, like speed in driving scenarios.
Single Agent vs. Multi-Agent:
Single agent scenarios involve one agent operating independently, while multi-agent environments involve interactions among agents, whether competitive or cooperative.
Structure of Agents
An agent consists of architecture and a program:
Architecture: Computing device with sensors and actuators.
Program: Function implementing the agent mapping.
Types of Agent Programs
Simple Reflex / Reactive Agents: Based on current percepts with condition-action rules for decision making.
Model-Based Reflex Agents: Incorporate internal state knowledge to strategize in partially observable environments.
Goal-Based Agents: Utilize goals alongside knowledge of the environment for action selection.
Utility-Based Agents: Evaluate actions to maximize utility rather than merely achieving goals.
Learning Agents: Adapt based on previous experiences, capable of improving through learning mechanisms.
Learning Agents Core Components
Learning Element: Adapts based on environmental feedback.
Critic: Evaluates agent performance against standards; provides feedback.
Performance Element: Executes external actions.
Problem Generator: Suggests actions that promote new learning opportunities.