Agents in Artificial Intelligence (AI)

In this page, we will learn about Agents in Artificial Intelligence (AI), What is an Agent?, Intelligent Agents, What is Rational Agents?, What is Rationality?, What is the structure of an AI Agents?, What is PEAS Representation?, and Example of Agents with their PEAS representation.

Agents in Artificial Intelligence

The study of the rational agent and its environment can be defined as an AI system. The agents use sensors to sense their surroundings and actuators to act on their surroundings. Knowledge, belief, purpose, and other mental qualities can be possessed by an AI agent.

What is an Agent?

An agent is anything that uses sensors to observe its environment and actuators to act on that environment. The cycle of perceiving, thinking, and action is followed by an Agent. An agent can be any of the following:

  • 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.
Agents in Artificial Intelligence

Intelligent Agents:

An intelligent agent is a self-contained creature that uses sensors and actuators to interact with its surroundings in order to achieve its objectives. To attain their objectives, an intelligent agent can learn from their surroundings. An intelligent agent is something like a thermostat.

The four main rules for an AI agent are as follows:

  • Rule 1: An AI agent must be able to perceive its surroundings.
  • Rule 2: Decisions must be made based on the observation.
  • Rule 3: A decision must be followed by action.
  • Rule 4: An AI agent's actions must be rational.

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
(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.