×

Intelligent Agents | Agents in AI

What is an Agent?

An agent can be viewed as anything that perceives its environment through sensors and acts upon that environment through actuators.

For example, human being perceives their surroundings through their sensory organs, known as sensors and take actions using their hands, legs, etc., known as actuators.

Diagrammatic Representation of an Agent

Diagrammatic Representation of an Agent

Agents interact with the environment through sensors and actuators

Intelligent Agents

An intelligent agent is a goal-directed agent. It perceives its environment through its sensors using observations and built-in knowledge and acts upon the environment through its actuators.

Rational Agents

A rational agent takes the right action for every perception, hence maximising its performance measure. This makes any agent appear successful based on the current situation.

Example: Chess AI

Omniscient Agents

An omniscient agent is an agent which knows the actual outcome of its action in advance. However, such agents are impossible in the real world.

Example: Tic-tac-toe AI is the closest example

Software Agents

It is a software program that works in a dynamic environment. These agents are also known as Softbots because all body parts of software agents are software only. For example, video games, flight simulators, etc.

Behaviour of an Agent

Mathematically, agent behaviour can be described in two parts:

Agent Function: It is the mapping of a given percept sequence to an action. It is an abstract mathematical explanation.

Agent Program: It is the practical and physical implementation of the agent function.

For example, an automatic hand dryer detects signals (hands) through its sensors. When we bring hands near the dryer, it turns on the heating circuit and blows air. When the signal detection disappears, it breaks the heating circuit and stops blowing air.

Rationality of an agent

It is expected by an intelligent agent to act in a way that maximises its performance measure. Therefore, the rationality of an agent depends on four things:

  • The performance measure which defines the success criterion.
  • The agent's built-in knowledge about the environment.
  • The actions that the agent can perform.
  • The agent’s percept sequence until now.

Example: Our exam score not only depends on what we know but also on what is asked in the exam itself.

Note: Rationality maximises the expected performance, while perfection maximises the actual performance, which leads to omniscience.

Task Environment

A task environment is a problem to which a rational agent is designed as a solution. Consequently, in 2003, Russell and Norvig introduced several ways to classify task environments. However, before classifying the environments, we should be aware of the following terms:

Performance Measure (P)

It specifies the agent’s sequence of steps taken to achieve its target by measuring different factors.

Environment (E)

It specifies the interaction of the agent in different environments.

Actuators (A)

It specifies the way the agent affects the environment by taking expected actions.

Sensors (S)

It specifies the way the agent gets information from its environment.

These terms are acronymically called as PEAS. To understand this in more detail, let’s discuss each element in the following example:

Agent TypePerformanceEnvironmentActuatorsSensors
Taxi DriverSafe, fast, correct destinationRoads, trafficSteering, horn, breaksCameras, GPS, speedometer
PEAS summary for an automated taxi driver

Comparing different Task Environments

Fully Observable vs. Partially Observable

When an agent’s sensors allow access to the complete state of an environment at each point in time, then the task environment is fully observable, whereas if the agent does not have complete or relevant information about the environment, then the task environment is partially observable.

Example: In a game like chess, the agent can completely observe the environment, whereas in a game like poker, the agent can only observe the environment partially, as it cannot see the cards of the other agent.

Single-agent vs. multi-agent

When only one agent works to achieve a goal, it is known as a single agent, whereas when two or more agents work together to achieve a goal, they are known as multi-agents.

Example: Solving a sudoku puzzle (single agent), playing chess (multi-agent – 2 agents)

Deterministic vs. Stochastic

If the agent's current state and action completely determine the next state of the environment, then the environment is deterministic, whereas if the next state cannot be determined from the current state and action, then the environment is stochastic.

Example: Image analysis (Deterministic), driving a car in traffic (Stochastic)

Note: If the environment is partially observable, it may appear as Stochastic.

Episodic vs. Sequential

If the agent's episodes are divided into atomic episodes and the next episode does not depend on the previous state actions, then the environment is episodic, whereas if current actions may affect the future decision, such environment is sequential.

Example: Part-picking robot (Episodic), playing chess (Sequential)

Static vs. Dynamic

If the environment changes with time, such an environment is dynamic; otherwise, the environment is static.

Example: Crossword puzzles have a static environment, while the Physical world has a dynamic environment.

Discrete vs. Continuous

If an agent has a finite number of actions and states, then the environment is discrete; otherwise continuous.

Example: A game of chess is discrete since it has a finite number of moves, whereas driving a truck is continuous as one cannot tell for how long it would go on.

Known vs. Unknown

In a known environment, agents know the outcomes of their actions, but in an unknown environment, agents need to learn from the environment to make good decisions.

Example: A tennis player knows the rules and outcomes of their actions, while a new player needs to learn the rules and conditions.

Note: A known environment is partially observable, but an unknown environment is fully observable.

Structure of Agents | Agent Structure in AI

The goal of artificial intelligence is to design an agent program that implements an agent function, i.e., mapping from senses into actions. A program requires some computer devices with physical sensors and actuators for execution, which is known as the agent architecture.

Therefore, an agent is the combination of the architecture and the program, i.e.

AGENT = ARCHITECTURE + PROGRAM

Note: The difference between the agent program and agent function is that an agent program takes the current percept as input, whereas an agent function takes the entire percept history.

Types of Agent Programs

Varying in the level of intelligence and complexity of the task, the following four types of agents are there:

1) Simple reflex agents

It is the simplest agent that acts according to the current percept only and pays no attention to the rest of the percept history. The agent function of this type relies on the condition-action rule – "If condition, then action." It makes correct decisions only if the environment is fully observable. These agents cannot ignore infinite loops when the environment is partially observable but can escape from infinite loops if the agents randomise their actions.

Schematic Diagram of a Simple Reflex agent

Example: iDraw, a drawing robot that converts the typed characters into writing without storing the past data.

Note: Simple reflex agents do not maintain the internal state and do not depend on the percept theory.

2) Model-based agent

These types of agents can handle partially observable environments by maintaining some internal states. The internal state depends on the percept history, which reflects at least some of the unobserved aspects of the current state. Therefore, as time passes, the internal state needs to be updated, which requires two types of knowledge or information to be encoded in an agent program, i.e., the evolution of the world on its own and the effects of the agent's actions.

Model based reflex agent

Example: When a person walks in a lane, he maps the pathway in his mind.

3) Goal-based agents

It is not sufficient to have the current state information unless the goal is not decided. Therefore, a goal-based agent selects a way among multiple possibilities that helps it to reach its goal.

Note: With the help of searching and planning (subfields of AI), it becomes easy for the Goal-based agent to reach its destination.

Goal based agent

4) Utility-based agents

These types of agents are concerned about the performance measure. The agent selects those actions which maximise the performance measure and devote towards the goal.

Utility Based

Example: The main goal of chess playing is to 'check-and-mate' the king, but the player completes several small goals previously.

Note: Utility-based agents keep track of their environment, and before reaching their main goal, they complete several tiny goals that may come in between the path.

5) Learning agents

The main task of these agents is to teach the agent machines to operate in an unknown environment and gain as much knowledge as they can. A learning agent is divided into four conceptual components:

  • Learning element: This element is responsible for making improvements.
  • Performance element: It is responsible for selecting external actions in accordance with the inputs taken.
  • Critic: It provides feedback to the learning agent about how well the agent is doing, which could maximise the performance measure in the future.
  • Problem Generator: It suggests actions that could lead to new and informative experiences.

Example: Humans learn to speak only after they are born.

Note: The objective of a Learning agent is to improve the overall performance of the agent.

General Learning Agent

Working on an agent program's components

The function of agent components is to answer some basic questions like “What is the world like now?”, "what do my actions do?” and many more.

We can represent the environment inherited by the agent in various ways by distinguishing on an axis of increasing expressive power and complexity as discussed below:

Atomic Representation

Here, we cannot divide each state of the world. So, it does not have any internal structure. Search, game-playing, Hidden Markov Models, and Markov decision process all work with the atomic representation.

Factored Representation

Here, each state is split into a fixed set of attributes or variables having a value. It allows us to represent uncertainty. Constraint satisfaction, propositional logic, Bayesian networks, and machine learning algorithms work with the Factored representation.

Note: Two different factored states can share some variables like current GPS location, but two different atomic states cannot do so.

Structured Representation

Here, we can explicitly describe various and varying relationships between different objects that exist in the world. Relational databases and first-order logic, first-order probability models, and natural language understanding underlie structured representation.

Related Posts:


Related Topics

The Wumpus World

The Wumpus world is a game playing which provides an environment to the knowledge-based agent to showcase its stored knowledge. It was developed by Gregory Yob in 1973. About the game:  It...

3 minutes read.

Artificial Intelligence vs. Machine learning

Artificial Intelligence This word is trending in the world of technology. Artificial means something which was not present naturally, and it is built by humans, and intelligence means the ability to...

4 minutes read.

Top 10 Artificial Intelligence Technologies in 2024

Artificial Intelligence Technologies in 2020 1. Augmented Reality This is one of the most fascinating technology nowadays. Augmented Reality is the use of text, graphics, audio, etc. in real time. In Simple...

4 minutes read.

Uninformed Search Strategies - Artificial Intelligence

Breadth-first search (BFS) It is a simple search strategy where the root node is expanded first, then covering all other successors of the root node, further move to expand the next...

8 minutes read.

Resolution Method in AI

Resolution Method in AI Resolution method is an inference rule which is used in both Propositional as well as First-order Predicate Logic in different ways. This method is basically used for proving the...

5 minutes read.

Alpha-beta Pruning | Artificial Intelligence

Alpha-beta pruning is an advance version of MINIMAX algorithm. The drawback of minimax strategy is that it explores each node in the tree deeply to provide the best path among all the...

3 minutes read.

Unsupervised Learning in AI

Unsupervised Learning in AI Unsupervised LearningIntroductionClusteringComparison between Supervised, Unsupervised, and Reinforcement Learning. Unsupervised Learning This is the third major category of Machine Learning. Unsupervised learning happens when we have data without additional feedback,...

2 minutes read.

Knowledge Representation in AI

In this section, we will understand how to represent the knowledge in the form which could be understood by the knowledge-based agents. The knowledge that is stored in the system is related to...

5 minutes read.

Backward Chaining in AI: Artificial Intelligence

Backward Chaining is a backward approach which works in the backward direction. It begins its journey from the back of the goal. Like, forward chaining, we have backward chaining for Propositional logic as...

6 minutes read.

Propositional Logic

It is a branch of logic which is also known as statement logic, sentential logic, zeroth-order logic, and many more. It works with the propositions and its logical connectivities. It deals with the...

5 minutes read.

Inference Rules in Proposition Logic

Inference rules are those rules which are used to describe certain conclusions. The inferred conclusions lead to the desired goal state. In propositional logic, there are various inference rules which can be applied to...

3 minutes read.

Quantifying Uncertainty

The concept of quantifying uncertainty relies on how an agent can keep away uncertainty with a degree of belief. The term uncertainty refers to that situation or information which is either unknown or...

5 minutes read.

Classical Planning

Classical Planning is the planning where an agent takes advantage of the problem structure to construct complex plans of an action. The agent performs three tasks in classical planning: Planning: The agent plans after...

4 minutes read.

Informed Search/ Heuristic Search in AI

An informed search is more efficient than an uninformed search because in informed search, along with the current state information,  some additional information is also present, which make it easy to reach the...

6 minutes read.

Supervised Learning in AI

Supervised Learning in AI Learning Supervised LearningClassification TasksNearest Neighbor ClassificationK nearest neighbor AlgorithmPerceptron LearningSupport Vector MachineRegression TasksLoss FunctionOverfittingRegularizationScikit LearnK Nearest Neighbor ImplementationPerceptron Algorithm ImplementationSupport Vector Machine Algorithm ImplementationRegression Implementation Machine Learning In the Artificial...

33 minutes read.

Cryptarithmetic Problem in AI

Cryptarithmetic Problem Cryptarithmetic Problem is a type of constraint satisfaction problem where the game is about digits and its unique replacement either with alphabets or other symbols. In cryptarithmetic problem, the...

3 minutes read.

Neural Networks

Neural Networks are one of the most popular techniques and tools in Machine learning. Neural Networks were inspired by the human brain as early as in the 1940s. Researchers studied the...

5 minutes read.

Hidden Markov Models

Hidden Markov Model is a partially observable model, where the agent partially observes the states. This model is based on the statistical Markov model, where a system being modeled follows the Markov process...

4 minutes read.

Hill Climbing Algorithm in AI

Hill Climbing Algorithm: Hill climbing search is a local search problem. The purpose of the hill climbing search is to climb a hill and reach the topmost peak/ point of...

4 minutes read.

Probabilistic Reasoning

Probabilistic Reasoning Probabilistic Reasoning is the study of building network models which can reason under uncertainty, following the principles of probability theory. Bayesian Networks Bayesian network is a data structure which is used to represent the dependencies among variables....

7 minutes read.