Agents in Artificial Intelligence (AI)

Table of Content:

Content Highlight:

Agent Overview:

  • Versatile entity with sensors and actuators.
AI Agent Rules:
  • Perception: Gathers information.
  • Decision-Making: Algorithm-driven decisions.
  • Action: Decisions trigger actions.
  • Rationality: Logical alignment of actions.

Rational Agents:

  • Define preferences, model uncertainty, maximize performance.

AI Agent Structure:

  • AI agent = Architecture + Agent program.

PEAS Representation:

  • Model includes Performance, Environment, Actuators, Sensors.
Example (PEAS):
  • Performance: Safety, time, legality, comfort.
  • Environment: Roads, vehicles, signs, pedestrians.
  • Actuators: Steering, accelerator, brake, signal, horn.
  • Sensors: Camera, GPS, speedometer, accelerometer, sonar.

What is an Agent?

In a broader context, an "agent" denotes a versatile entity or system, embodying the capacity to utilize sensors for comprehensive environmental observation and actuators for purposeful action. This overarching concept transcends specific domains, encompassing diverse scenarios where entities, whether human, animal, or mechanical, engage in a perpetual cycle of perceiving, processing, and responding to information in their surroundings. The term "agent" serves as a dynamic descriptor, applicable to a spectrum of situations where active entities play pivotal roles, emphasizing the active involvement in their environment. This inclusive perspective underscores the adaptability of the term, recognizing its relevance across various contexts and fields.

  • Human-Agent: A human agent has sensors in the form of eyes, ears, and other organs, and actuators in the form of hands, legs, and vocal tract.
  • Robotic Agent: A robotic agent can have cameras, infrared range finders, natural language processing (NLP) for sensors, and various motors for actuators.
  • Software Agent: A software agent can receive sensory input such as keystrokes and file contents, act on those inputs, and show output on the screen.

As a result, the environment around us is replete of agents, including thermostats, cellphones, cameras, and even ourselves.

Before we proceed, we must first understand sensors, effectors, and actuators.

  • Sensor: A sensor is an electronic device that detects changes in the environment and transmits the information to other devices. Sensors allow an agent to observe its surroundings.
  • Actuators: These are the mechanical components that turn energy into motion. The actuators' sole function is to move and control a system. An actuator can be anything from an electric motor to gears to rails.
  • Effectors: These are devices that have an impact on the environment. Effectors can be legs, wheels, arms, fingers, wings, fins, and display screen.
An agent

What is an AI agent?

An AI agent is essentially a self-contained entity equipped with sensors and actuators, allowing it to interact autonomously with its environment in pursuit of predefined objectives. This concept draws parallels with the functionality of a thermostat, where the agent continually assesses its surroundings and takes actions to achieve its goals.

The fundamental rules governing an AI agent's behavior can be summarized as follows:

  • Rule 1: Perception
    An AI agent must possess the ability to perceive and gather information from its surroundings. This involves utilizing its sensors to capture relevant data, creating a comprehensive understanding of the environment.
  • Rule 2: Decision-Making
    Decisions made by the AI agent are based on the observations acquired through perception. These decisions are the result of sophisticated algorithms and computational processes that analyze the gathered information to determine the most appropriate course of action.
  • Rule 3: Action
    Every decision made by the AI agent triggers a corresponding action. The agent utilizes its actuators to execute physical or virtual responses, translating its computational decisions into tangible outcomes.
  • Rule 4: Rationality
    The actions undertaken by the AI agent must be rational, aligning with its overarching objectives. Rationality ensures that the agent's responses are logically derived from the observed data, contributing to the efficiency and effectiveness of its interactions with the environment.

In essence, an AI agent operates as an autonomous, goal-oriented entity that continuously learns from its surroundings, making informed decisions and taking rational actions to fulfill its objectives. This framework provides a structured approach to understanding and designing intelligent agents for various applications.

What is Rational Agents?

A rational agent is one who has defined preferences, models uncertainty, and acts in such a way that its performance measure is maximized using all available actions. The proper things are stated to be done by a rational agent. AI is concerned with the development of rational agents for application in game theory and decision theory in a variety of real-world contexts. The rational action is the most crucial for an AI agent because in an AI reinforcement learning algorithm, an agent receives a positive reward for each best feasible action and a negative reward for each incorrect action.

Note: Rational agents in AI are a lot similar to intelligent agents.

What is Rationality?

The performance metric of an agent is used to determine its rationality. The following criteria can be used to assess rationality:

  • The success criterion is defined by a performance metric.
  • The agent has prior knowledge of its surroundings.
  • The most effective activities that an agent can take.
  • The order in which percepts appear.

Note: Rationality varies from Omniscience in that an Omniscient agent understands the actual outcome of its actions and acts appropriately, which is impossible to achieve in reality.

What is the structure of an AI Agents?

AI's objective is to create an agent program that performs the agent function. The architecture and agent program combine to form the framework of an intelligent agent. It can be summed up as follows:

Agent = Architecture + Agent program

The main three terms involved in the structure of an AI agent are as follows:

  • Architecture: Architecture is the machinery on which an AI agent operates.
  • Agent Function: The agent function is used to map a percept to a certain action.

    f:P* → A
  • Agent program: An agent program is a program that performs the function of an agent. To produce function f, an agent program runs on the physical architecture.

What is PEAS Representation?

PEAS is a form of model that an AI agent uses to work. We can organize the properties of an AI agent or rational agent under the PEAS representation model when we define it. It consists of four words:

  • P = Performance measure
  • E = Environment
  • A = Actuators
  • S = Sensors

Here performance measure is the objective for the success of an agent's behavior.

PEAS self driving car.

If we consider a self-driving car, the PEAS representation will be as follows:

  • Performance: Safety, time, legal drive, comfort.
  • Environment: Roads, other vehicles, road signs, pedestrian.
  • Actuators: Steering, accelerator, brake, signal, horn.
  • Sensors: Camera, GPS, speedometer, odometer, accelerometer, sonar.

Example of Agents with their PEAS representation

AgentPerformance measureEnvironmentActuatorsSensors
1. Medical Diagnose
  • Healthy patient
  • Minimized cost
  • Patient
  • Hospital
  • Staff
  • Tests
  • Treatments
Keyboard
(Entry of symptoms)
2. Vacuum Cleaner
  • Cleanness
  • Efficiency
  • Battery life
  • Security
  • Room
  • Table
  • Wood floor
  • Carpet
  • Various obstacles
  • Wheels
  • Brushes
  • Vacuum Extractor
  • Camera
  • Dirt detection sensor
  • Cliff sensor
  • Bump Sensor
  • Infrared Wall Sensor
3. Part -picking Robot
  • Percentage of parts in correct bins.
  • Conveyor belt with parts,
  • Bins
  • Jointed Arms
  • Hand
  • Camera
  • Joint angle sensors.