Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
160 views25 pages

Unit I - Introduction To AI

Uploaded by

Yashaswini Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
160 views25 pages

Unit I - Introduction To AI

Uploaded by

Yashaswini Gowda
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 25

UNIT I

INTRODUCTION - ARTIFICIAL INTELLIGENCE

Introduction- What is Artificial Intelligence, Foundations of AI, History, AI - Past, Present and Future.
Intelligent Agents- Environments- Specifying the task environment, Properties of task environments,
Agent based programs-Structure of Agents, Types of agents- Simple reflex agents, Model-based reflex
agents, Goal-based agents; and Utility-based agents.

1.1 Introduction – What is Artificial Intelligence


Artificial intelligence (AI) refers to computer systems capable of performing complex tasks that
historically only a human could do, such as reasoning, making decisions, or solving problems. AI is a
derived technology term that includes a wide variety of technologies, such as Neural networks, machine
learning, deep learning, generative AI, explainable AI, and natural language processing (NLP).

ChatGPT is an AI application that uses large language models (LLMs) to generate text in response to
query or questions or comments posed to it. Google Translate is an AI application that uses deep
learning algorithms to translate text from one language to another. Netflix is an AI application uses
machine learning algorithms to create personalized recommendation for users based on their previous
viewing history. Tesla uses computer vision to power self-driving features on their cars.

Definitions
 Artificial intelligence (AI) is a computer science field that studies and develops intelligent
machines.
 Artificial intelligence (AI) refers to the simulation or approximation of human intelligence in
machines. The goals of artificial intelligence include computer-enhanced learning, reasoning, and
perception.
 AI, is technology that enables computers and machines to simulate human intelligence and
problem-solving capabilities.
 Artificial intelligence, the ability of a computer or computer-controlled robot to perform tasks
commonly associated with intelligent beings.
 Artificial intelligence (AI) makes it possible for machines to learn from experience, adjust to new
inputs and perform human-like tasks.

1.1.1 Foundations of AI

Foundations of AI describes the brief history of the disciplines that contributed ideas, viewpoints,
and techniques to AI. Kind of ideas and views contributed by Philosophy, Mathematics, Economics,
Neuroscience, Psychology, Computer engineering, Control theory and Cybernetics and Linguistics are
discussed in brief. The ideas related to AI around the period of time can be organized as a series of
questions and given in the respective disciplines.

Philosophy (B.C 428 - present)


Can formal rules be used to draw valid conclusions?
How does the mental mind arise from a physical brain?
Where does knowledge come from?
How does knowledge lead to action?

Mathematics (B.C 800 -present)

What are the formal rules to draw valid conclusions?


What can be computed?
How do we reason with uncertain information?

Economics (AD 1776-present)

How should we make decisions so as to maximize payoff?


How should we do this when others may not go along?
How should we do this when the payoff may be far in the future?

Neuroscience (AD 1861-present)

How do brains process information?

Psychology (AD 1879-present)

How do humans and animals think and act?

Computer engineering (AD 1940-present)

How can we build an efficient computer?

Twentieth Century

With the invention of the digital computer in the mid-20th century, scientists started to ask
whether computers would be able to go beyond simply performing computations and executing hard-
coded instructions.
In other words, could this machine demonstrate intelligence? Could it think like a human? This
question opened up a range of philosophical inquiries because the definition of human intelligence
might include difficult concepts, like consciousness.
Alan Turing, the founder of modern computer science, proposed a method to measure machine
intelligence. In his seminal work, Computing Machinery and Intelligence, Turing reformulated the
question of "Can a machine think?" to ask whether a machine could exhibit human intelligence through
its behavior and imitate the ability to think.

1.1.3 History of AI - Past, Present and Future

Past AI

Before 1949 computers lacked a key prerequisite for intelligence: they could not store
commands, only execute them. In other words, computers could be told what to do but could not
remember what they did. Second, computing was extremely expensive.

1950
The history of artificial intelligence (AI) began in the 1950s. In the first half of the 20th century,
science fiction familiarized the world with the concept of artificially intelligent robots.
By the 1950s, we had a generation of scientists, mathematicians, and philosophers with the
concept of artificial intelligence (or AI) culturally assimilated in their minds. One such person was Alan
Turing, a young British polymath who explored the mathematical possibility of artificial intelligence.
Turing suggested that humans use available information as well as reason in order to solve
problems and make decisions, so we make the machines do the same thing. This was the logical
framework of his 1950 paper, Computing Machinery and Intelligence in which he discussed how to build
intelligent machines and how to test their intelligence.

1956
The term "Artificial Intelligence" was coined in 1956 by American computer scientist John
McCarthy at the Dartmouth Conference. The conference was organized by McCarthy, Marvin Minsky,
Nathaniel Rochester, and Claude Shannon. The participants aimed to develop programs that could
simulate human intelligence.
The first AI program was Logic Theorist, which was presented at the Dartmouth Summer
Research Project on Artificial Intelligence (DSRPAI) in 1956. Logic Theorist was designed to mimic human
problem solving skills.

1957
AI flourished from 1957 to 1974 as computers became faster, cheaper, and more accessible.
However, in 1974, the U.S. and British Governments stopped funding undirected research into artificial
intelligence. The difficult years that followed would later be known as an "AI winter".

1980
In the 1980’s, AI was relighted by two sources an expansion of the algorithmic toolkit and a boost of
funds. John Hopfield and David Rumelhart popularized Deep Learning Techniques which allowed
computers to learn using experience. On the other hand Edward Feigenbaum introduced Expert
Systems which mimicked the decision making process of a human expert. The program would ask an
expert in a field how to respond in a given situation, and once this was learned for virtually every
situation, non-experts could receive advice from that program.
Expert systems were widely used in industries. The Japanese government heavily funded expert
systems and other AI related endeavours as part of their Fifth Generation Computer Project (FGCP).
From 1982-1990, they invested 400 million dollars with the goals of revolutionizing computer
processing, implementing logic programming, and improving artificial intelligence. Unfortunately, most
of the ambitious goals were not met. However, it could be argued that the indirect effects of the FGCP
inspired a talented young generation of engineers and scientists. Regardless, funding of the FGCP
ceased, and AI fell out of the limelight.

1997
In 1997, reigning world chess champion and grand master Gary Kasparov was defeated by IBM’s
Deep Blue, a chess playing computer program. This highly publicized match was the first time a reigning
world chess champion loss to a computer and served as a huge step towards an artificially intelligent
decision making program.
In the same year, speech recognition software, developed by Dragon Systems, was implemented
on Windows. This was another great step forward in the field of Artificial Intelligence.

2000
In 2000, autonomous robots were designed to operate remotely from humans. They were
designed to perform hazardous, tedious tasks. Researchers began focusing on engineering robots that
could interact and cooperate with people as opposed to just taking orders from them.
Japanese automobile giant Honda took the lead in showing the world the first two-legged,
walking humanoid in the early 2000s. ASIMO was created as an entirely new kind of robot that could
function in society and serve as a partner to people.
The next stage in humanoid robots added social abilities. Researchers from MIT engineered a
smart bot capable of socially interacting with people and demonstrating emotional expressions named
Kismet. Both bots were revolutionary in the field of AI and contributed to further research on the
potential this technology harbors.
Within the same general time period, new achievements in machine reading were developed.
Autonomous understanding of text was refined and the first mass produced autonomous robotic
vacuum was introduced. Roomba is the first AI machines to become available to the everyday
household and demonstrate how the technology can streamline daily tasks.

Present AI

2010
In 2010 the world was introduced to the first intelligent personal assistant. It was incorporated
right into Apple’s iPhone 4s. Siri was created to serve as a “do engine”, allowing people to hold
conversations with the internet and receive instant answers to voice search queries. Utilized for
directions, hands-free call and text, reminders and more, Siri was a real breakthrough in the quest to
incorporate AI into our daily lives.

2014
By 2014 Amazon released a rival Alexa smart speaker meant to serve as a personal home
assistant, known as Alexa.

The capabilities of these intelligent assistants have continued to advance over the past several
years, enabling the average person to convert their entire home into an intelligently connected hub.
Now with Alexa and Google Home, a simple “good morning” statement can turn on the coffee maker,
play a favourite song and give you the weather forecast.

AI technology improves businesses activities with notable benefits. AI is used to improve


customer experience and engagement across a number of platforms. Powered by machine learning,
chatbots understand the intent of the words spoken to them and continuously get smarter from the
conversations they have with people. This has proven incredibly beneficial for companies who are using
chatbots as customer support assistants. They are available 24/7 and can effectively handle almost any
issue they’re presented with.

2016
In 2016, DeepMind's AlphaGo program, powered by a deep neural network, beats Lee Sodol, the
world champion Go player, in a five-game match.

2023
In 2023, A rise in large language models, or LLMs, such as ChatGPT, create an enormous change
in performance of AI and its potential to drive enterprise value.

The current trends in AI include a wide spectrum of technologies such as AutoML, Multi-modal
AI, Explainable AI, Computer Vision, Neural Networks, Digital Twins, Natural Language Processing,
Generative AI etc. These AI trends drive sustainable growth for businesses across industries, structures
the way we work, dramatically changes the teaching -learning process, and the way of interaction with
technology.

Future AI

Digital existence is both enhancing human potential and upending long-standing human
customs. With ambient information and connection reaching over half of the world's population, code-
driven systems present both unparalleled potential and hazards.

The experts predicted networked artificial intelligence will amplify human effectiveness but also
threaten human autonomy, agency and capabilities. They spoke of the wide-ranging possibilities that
computers might match or even exceed human intelligence and capabilities.

Tasks such as complex decision-making, reasoning and learning, sophisticated analytics and
pattern recognition, visual perception, speech recognition and language translation AI will do better
than human. They said “smart” systems (called as AI) in communities, in vehicles, in buildings and
utilities, on farms and in business processes will save time, money and lives and offer opportunities for
individuals to enjoy a more-customized future.

Numerous speakers centered their upbeat remarks on healthcare and the overabundance of
potential uses of AI in patient diagnosis, treatment, and assisting elderly individuals in leading more
fulfilling lives. They were also quite excited about the potential contribution of AI to large-scale public
health initiatives based on the vast volumes of data on nutrition and personal genomics that may be
collected in the upcoming years.

Several of these academics also forecasted that AI would facilitate long-expected modifications
to formal and informal education systems.

1.1.3 Artificial Intelligence Types

According to the functionality Artificial Intelligence can be classified as follows,

Artificial Intelligence based on Capability

Narrow AI
Narrow AI is a goal-oriented Artificial Intelligence. It is trained to perform a specific task. It is
most common and currently available all around us today. Examples of narrow AI includes Apple’s Siri
and IBM’s Watson supercomputer.
Narrow AI is also referred to as weak AI. Because it operates within a limited and pre-defined set
of parameters, constraints, and contexts. For example, use cases such as Netflix recommendations,
purchase suggestions on ecommerce sites, autonomous cars, and speech & image recognition fall under
the narrow AI category.

General AI
General AI is an AI version that performs any intellectual task with a human-like efficiency. The
objective of general AI is to design a system capable of thinking for itself just like humans do. Currently,
general AI is still under research, and efforts are being made to develop machines that have enhanced
cognitive capabilities.

Super AI
Super AI is the AI version that surpasses human intelligence and can perform any task better
than a human. Capabilities of a machine with super AI include thinking, reasoning, solving a puzzle,
making judgments, learning, and communicating on its own. Today, super AI is a hypothetical concept
but represents the future of AI.
Artificial Intelligence based on functionality

Reactive machines
Reactive machines are basic AI types that do not store past experiences or memories for future
actions. Such systems only focus on current scenarios and react to them based on the best possible
action. Popular examples of reactive machines include IBM’s Deep Blue system and Google’s AlphaGo.

Limited memory machines


Limited memory machines can store and use past experiences or data for a short period of time.
For example, a self-driving cars can store recent speed of nearby cars, the distance of other cars, speed
limit, and other information to navigate the road through the traffic.

Theory of mind
Theory of mind refers to the type of AI that can understand human emotions and beliefs and
socially interact like humans. This AI type has not yet been developed but is in contention for the future.

Self-aware AI
Self-aware AI deals with super-intelligent machines with their consciousness, sentiments,
emotions, and beliefs. Such systems are expected to be smarter than a human mind and may
outperform us in assigned tasks.
Self-aware AI is still a distant reality, but efforts are being made in this direction.

1.2 Intelligent Agents

1.2.1 Introduction

Intelligent agents in AI are autonomous entities that act upon an environment using sensors and
actuators to achieve their goals. In addition, intelligent agents may learn from the environment to
achieve those goals. Driverless cars and the Siri virtual assistant are examples of intelligent agents in AI.

Intelligent agents are independent programs that use sensors to perceive and interact with the
real environment. It can make a decision, and it react with the real environment using actuators. An
intelligent agent could be a robot, machine, or even a human or an animal. The sensors in the
environment could be a camera, rain sensor, or nose (in case of human intelligent agent).
The intelligent agent processes information and decides to act upon it. The action could be
saving a video, turning off a sprinkler system, or looking for the nearest pizza shop.

The actuator is the part that takes action. Intelligent agents make decisions in real time, and the
rate of success versus error varies. The purpose of an intelligent agent is to respond to the environment
around it. In addition, intelligent agents may learn from the environment to achieve their goals. A
robotic agent might have cameras and infrared range finders for sensors and various motors for
actuators.

For example, vacuum-cleaner world with just two locations A and B to be cleaned is illustrated below.

Percept sequence Action


[A, Clean] Right
[A, Dirty] Suck
[B, Clean] Left
[B, Dirty] Suck
[A, Clean], [A, Clean] Right
[A, Clean], [A, Dirty] Suck
… …

[A, Clean], [A, Clean], [A, Clean] Right


[A, Clean], [A, Clean], [A, Dirty] Suck
Partial tabulation of an agent function for the vacuum-cleaner world
Agents in applications of artificial intelligence
Agents/Intelligent AI are a versatile and powerful tool in artificial intelligence that can help
solve a wide range of problems in different fields.

Robotics
Agents can be used to control robots and automate tasks in manufacturing, transportation, and
other industries.
Smart homes and buildings
Agents can be used to control heating, lighting, and other systems in smart homes and buildings,
optimizing energy use and improving comfort.
Transportation systems
Agents can be used to manage traffic flow, optimize routes for autonomous vehicles, and improve
logistics and supply chain management.
Healthcare
Agents can be used to monitor patients, provide personalized treatment plans, and optimize
healthcare resource allocation.
Finance
Agents can be used for automated trading, fraud detection, and risk management in the financial
industry.
Games
Agents can be used to create intelligent opponents in games and simulations, providing a more
challenging and realistic experience for players.
Natural language processing
Agents can be used for language translation, question answering, and chatbots that can
communicate with users in natural language.
Cybersecurity
Agents can be used for intrusion detection, malware analysis, and network security.
Environmental monitoring
Agents can be used to monitor and manage natural resources, track climate change, and
improve environmental sustainability.
Social media
Agents can be used to analyze social media data, identify trends and patterns, and provide
personalized recommendations to users.

Characteristics of an AI agent

AI tool and agent are software programs designed to automate tasks, it has specific key
characteristics discussed below.
Autonomy
An AI virtual agent is capable of performing tasks independently without requiring constant
human intervention or input.
Perception
The agent function senses and interprets the environment they operate in through various
sensors, such as cameras or microphones.
Reactivity
An AI agent can assess the environment and respond accordingly to achieve its goals.
Reasoning and decision-making
AI agents are intelligent tools that can analyze data and make decisions to achieve goals. They
use reasoning techniques and algorithms to process information and take appropriate actions.
Learning
They can learn and enhance their performance through machine, deep, and reinforcement
learning elements and techniques.
Communication
AI agents can communicate with other agents or humans using different methods, like
understanding and responding to natural language, recognizing speech, and exchanging messages
through text.
Goal-oriented
They are designed to achieve specific goals, which can be pre-defined or learned through
interactions with the environment.

1.2.2 Environments - Agent Environment in AI

Intelligent agents in AI are autonomous entities that act upon an environment using sensors and
actuators to achieve their goals.
An environment is everything in the world which surrounds the agent, but it is not a part of an
agent itself. An environment can be described as a situation in which an agent is present. The
environment is where agent operate and provide the agent to sense and act upon it. An environment is
mostly said to be non-feministic.

1.2.3 Specifying Task Environment


The first step in designing an AI agent is to specify the task environment. A task environment
specification includes the following: Performance measure, External environment, Actuators, Sensors.

PEAS Representation
PEAS is a type of model on which an AI agent works upon. When we define an AI agent or
rational agent, then we can group its properties under PEAS representation model. It is made up 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 for self-driving cars

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.
PEAS for Medical Diagnose

Performance: Healthy patient, Minimized cost


Environment: Patient, Hospital, Staff
Actuators: Tests, Treatments
Sensors: Keyboard (for entering symptoms)

PEAS for Vacuum Cleaner

Performance: Cleanness, Efficiency, Battery life, Security


Environment: Room, Table, floor, Carpet
Actuators: Wheels, Brushes, Vacuum extractor
Sensors: Camera, Dirt detection sensor, cliff sensor, Bump sensor, Infrared wall sensor

PEAS for Part picking robot

Performance: Percentage of parts in correct bins


Environment: Conveyor belt with parts, Bins
Actuators: Jointed Arms, Hand
Sensors: Camera, Joint angle sensors

PEAS for Taxi driver

Performance: Safe, fast, legal, comfortable trip, maximize profits


Environment: Roads, other traffic, pedestrians, customers
Actuators: Steering, accelerator, brake, signal, horn, display
Sensors: Cameras, sonar, speedometer, GPS, odometer, accelerometer, engine sensors

1.2.4 Properties of Environment


As per Russell and Norvig, an environment can have various properties/ features from the view
of an agent. They are,

1. Fully observable vs Partially Observable


2. Static vs Dynamic
3. Discrete vs Continuous
4. Deterministic vs Stochastic
5. Single-agent vs Multi-agent
6. Episodic vs sequential
7. Known vs Unknown
8. Accessible vs Inaccessible
Fully observable vs Partially Observable
If an agent sensor can sense or access the complete state of an environment at each point of
time then it is a fully observable environment, else it is partially observable. A fully observable
environment is easy as there is no need to maintain the internal state to keep track history of the world.
An agent with no sensors in all environments then such an environment is called as
unobservable.

Deterministic vs Stochastic
If an agent's current state and selected action can completely determine the next state of the
environment, then such environment is called a deterministic environment.
A stochastic environment is random in nature and cannot be determined completely by an
agent.
In a deterministic, fully observable environment, agent does not need to worry about uncertainty.

Episodic vs Sequential
In an episodic environment, there is a series of one-shot actions, and only the current percept is
required for the action.
In Sequential environment, an agent requires memory of past actions to determine the next best
actions.

Single-agent vs Multi-agent
If only one agent is involved in an environment, and operating by itself then such an
environment is called single agent environment.
If multiple agents are operating in an environment, then such an environment is called a multi-
agent environment.

Static vs Dynamic
If the environment can change itself while an agent is deliberating, then such environment is
called a dynamic environment else it is called a static environment.
Static environments are easy to deal because an agent does not need to continue looking at the
world while deciding for an action. However, for dynamic environment, agents need to keep looking at
the world at each action.
Taxi driving is an example of a dynamic environment whereas Crossword puzzles are an example
of a static environment.

Discrete vs Continuous
If in an environment there are a finite number of percepts and actions that can be performed
within it, then such an environment is called a discrete environment else it is called continuous
environment.
A chess game comes under discrete environment as there is a finite number of moves that can
be performed. A self-driving car is an example of a continuous environment.
In a known environment, the results for all actions are known to the agent. While in unknown
environment, agent needs to learn how it works in order to perform an action.
It is quite possible that a known environment to be partially observable and an Unknown environment
to be fully observable.

Known vs Unknown
In a known environment, the output for all probable actions is given. Obviously, in case of
unknown environment, for an agent to make a decision, it has to gain knowledge about how the
environment works.

Accessible vs Inaccessible
If an agent can obtain complete and accurate information about the state's environment, then
such an environment is called an Accessible environment else it is called inaccessible.
An empty room whose state can be defined by its temperature is an example of an accessible
environment. Information about an event on earth is an example of Inaccessible environment.

1.3 Structure of an AGENT

The task of AI is to design an agent program which implements the agent function. The structure
of an intelligent agent is a combination of architecture and agent program. It can be viewed as,

Agent = Architecture + Agent Program

The structure of an AI agent is made up of the following components:

Architecture It is the machinery that an agent executes on


Agent Program It is an implementation of an agent function
Agent function Maps a percept sequence to an action
F : P* → A
Where F is Agent function
P is Percept
A is Action
An agent program executes on the physical architecture to produce function F. An AI agent is a device
with sensors and actuators, such as a robotic car, camera, or PC. Actuators are considered as the
muscles of the agent, because it is executing the decisions made by the agent function. Remember and
consider the following diagram as mentioned earlier.

An AI agent is made up of four components: the environment, sensors, actuators, and the decision-
making mechanism.
Environment
The environment refers to the area or domain in which an AI agent operates. It can be a physical
space, like a factory floor, or a digital space, like a website.
Sensors
Sensors are the tools that an AI agent uses to perceive its environment. These can be cameras,
microphones, or any other sensory input that the AI agent can use to understand what is happening
around it.
Actuators
Actuators are the tools that an AI agent uses to interact with its environment. These can be
things like robotic arms, computer screens, or any other device the AI agent can use to change the
environment.
Decision-making mechanism
A decision-making mechanism is the brain of an AI agent. It processes the information gathered
by the sensors and decides what action to take using the actuators. The decision-making mechanism is
where the real magic happens.AI agents use various decision-making mechanisms, such as rule-based
systems, expert systems, and neural networks, to make informed choices and perform tasks effectively.

1.3.1 Agent based Program


The agent program implements the agent function. There exists a variety of basic agent-program
designs, reflecting the kind of information made explicit and used in the decision process. The designs
vary in efficiency, compactness, and flexibility. The appropriate design of the agent program depends on
the nature of the environment. The agent program for a simple reflex agent in the two-state vacuum
environment is given below.

function REFLEX-VACUUM-AGENT([location ,status]) returns an action


if status = Dirty then return Suck
else if location = A then return Right
else if location = B then return Left
Percept sequence Action
[A, Clean] Right
[A, Dirty] Suck
[B, Clean] Left
[B, Dirty] Suck
[A, Clean], [A, Clean] Right
[A, Clean], [A, Dirty] Suck
… …

[A, Clean], [A, Clean], [A, Clean] Right


[A, Clean], [A, Clean], [A, Dirty] Suck

1.3.2 Types of Agents

Agents in Artificial Intelligence can be categorized into different types based on how agent’s
actions affect their perceived intelligence and capabilities, such as

1. Simple reflex agents


2. Model-based agents
3. Goal-based agents
4. Utility-based agents
5. Learning agents

1. Simple Reflex Agent


A simple reflex agent is an AI system that follows pre-defined rules to make decisions. It only
responds to the current situation without considering the past or future consequences and effects.
A simple reflex agent is suitable for environments with stable rules and straightforward actions,
as its behavior is purely reactive and responsive to immediate environmental changes.
simple reflex agent executes its functions by following the condition-action rules, which specifies what
action to be take in a certain condition. For Example,

A rule-based system is developed to support automated customer support interactions. The system can
automatically generate a predefined response containing instructions on resetting the password if a
customer’s message contains keywords indicating a password reset.

A simple reflex agent program. It acts according to a rule whose condition


matches the current state, as defined by the percepts(condition-action rules).
function SIMPLE-REFLEX-AGENT(percepts) returns an action
static : rules, a set of condition-action rules
state INTERPRET-INPUT(percepts)
rule  RULE-MATCH (state,rules)
action  RULE-ACTION[rule]
return action

Advantages

 Easy to design and implement, requiring minimal computational resources


 Real-time responses to environmental changes
 Highly reliable in situations where the sensors providing input are accurate, and the rules are
well designed
 No need for extensive training or sophisticated hardware

Disadvantages

 Prone to errors if the input sensors are faulty or the rules are poorly designed
 Have no memory or state, which limits their range of applicability
 Unable to handle partial observability or changes in the environment they have not been
explicitly programmed
 Limited to a specific set of actions and cannot adapt to new situations

2. Model-based Reflex Agent

A model-based reflex performs actions based on a current percept and an internal state
representing the unobservable world. It updates its internal state based on two factors

1. How the world evolves independently of the agent


2. How does the agent’s action affect the world

A cautionary model-based reflex agent is a variant of a model-based reflex agent that also
considers the possible consequences of its actions before executing them.
A model-based reflex agent follows the condition-action rule, which specifies the appropriate
action to take in a given situation. But unlike a simple reflex agent, a model-based agent also employs its
internal state to assess the condition during the decision and action process.

The model-based reflex agent operates in four steps

Step 1: Sense It perceives the current state of the world with its sensors.

Step 2 : Model It constructs an internal model of the world from what it sees.

Step 3 : Reason It uses its model of the world to decide how to act based on a set of
predefined rules or heuristics (involving or serving as an aid to learning,
discovery, or problem-solving by experimental and especially trial-and-
error methods)
Step 4 : Act The agent carries out the action that it has chosen.

for Example,
One of the finest examples of a cautionary model-based reflex agent is Amazon Bedrock.
Amazon Bedrock is a service that uses foundational models to simulate operations, gain insights, and
make informed decisions for effective planning and optimization.

By relying on various models, Bedrock gains insights, predicts outcomes, and makes informed decisions.
It continuously refines its models with real-world data, allowing it to adapt and optimize its operations.

Amazon Bedrock then plans for different scenarios and selects optimal strategies through simulations
and adjustments to model parameters.

A model-based reflex agent Program. It keeps track of the current state of the
world using an internal model. It then chooses an action in the same
way as the reflex agent

function REFLEX-AGENT-WITH-STATES(percepts) returns an action


static : state, a description of the current world state
rules, a set of condition-action rules
action, the most recent action, initially none
state UPDATE-STATE(state, action, percept)
rule  RULE-MATCH (state, rules)
action  RULE-ACTION[rule]
return action

Advantages

 Quick and efficient decision-making based on their understanding of the world


 Better equipped to make accurate decisions by constructing an internal model of the world
 Adaptability to changes in the environment by updating their internal models
 More informed and strategic choices by using its internal state and rules to determine the
condition

Disadvantages

 Building and maintaining models can be computationally expensive


 The models may not capture the real-world environment’s complexity very well
 Models cannot anticipate all potential situations that may arise
 Models need to be updated often to stay current
 Models may pose challenges in terms of interpretation and comprehension

3. Goal-based Agents

Goal-based agents are AI agents that use information from their environment to achieve specific
goals. They employ search algorithms to find the most efficient path towards their objectives within a
given environment.
These agents are also known as rule-based agents, as they follow predefined rules to accomplish
their goals and take specific actions based on certain conditions.

Goal-based agents are easy to design and can handle complex tasks. They can be used in various
applications like robotics, computer vision, and natural language processing.

Unlike basic models, a goal-based agent can determine the optimal course of decision-making
and action-taking processes depending on its desired outcome or goal.
With a given plan, a goal-based agent attempts to choose the best strategy to achieve the goals, It then
uses search algorithms and heuristics to find the efficient path to the goal.

The working pattern of the goal-based agent can be divided into five steps:

Step 1 : Perception
The agent perceives its environment using sensors or other input devices to collect information
about its surroundings.
Step 2 : Reasoning
The agent analyzes the information collected and decides on the best course of action to
achieve its goal.
Step 3 : Action
The agent takes actions to achieve its goal, such as moving or manipulating objects in the
environment.
Step 4: Evaluation
After taking action, the agent evaluates its progress towards the goal and adjusts its actions, if
necessary.
Step 5 : Goal Completion
Once the agent has achieved its goal, it either stops working or begins working on a new goal.
For Example,
We can say that Google Bard is a goal-based agent. It is also a learning agent. As a goal-based agent, it
has a goal or objective to provide high-quality responses to user queries. It chooses its actions that are
likely to assist users in finding the information they seek and achieving their desired goal of obtaining
accurate and helpful responses.

Advantages
 Simple to implement and understand
 Efficient for achieving a specific goal
 Easy to evaluate performance based on goal completion
 It can be combined with other AI techniques to create more advanced agents
 Well-suited for well-defined, structured environments
 It can be used for various applications, such as robotics, game AI, and autonomous vehicles.
Disadvantages

 Limited to a specific goal


 Unable to adapt to changing environments
 Ineffective for complex tasks that have too many variables
 Requires significant domain knowledge to define goals

4. Utility-based Agents
Utility-based agents are AI agents that make decisions based on maximizing a utility function or
value. They choose the action with the highest expected utility, which measures how good the outcome
is.
This helps them deal with complex and uncertain situations more flexibly and adaptively. Utility-
based agents are often used in applications where they have to compare and select among multiple
options, such as resource allocation, scheduling, and game-playing.
A utility-based agent aims to choose actions that lead to a high utility state. To achieve this, it
needs to model its environment, which can be simple or complex.

Then, it evaluates the expected utility of each possible outcome based on the probability
distribution and the utility function. Finally, it selects the action with the highest expected utility and
repeats this process at each time step.

For Example,
Anthropic Claude, an AI tool which is a utility-based agent whose goal is to help card members to
maximize their rewards and benefits from using cards. To achieve its goal, it employs a utility function to
assign numerical values representing success or happiness of different states such as card member's
face in the situations of purchasing, paying bills, redeeming rewards, etc.
And then compares the outcome of different actions in each state and trade-off decisions based on
their utility values. Furthermore, it uses heuristics and AI techniques to simplify and improve decision-
making.

Advantages

 Handles a wide range of decision-making problems


 Learns from experience and adjusts their decision-making strategies
 Offers a consistent and objective framework for decision-making

Disadvantages

 Requires an accurate model of the environment, failing to do so results in decision-making errors


 Computationally expensive and requires extensive calculations
 Does not consider moral or ethical considerations
 Difficult for humans to understand and validate

5. Learning Agents

An AI learning agent is a software agent that can learn from past experiences and improve its
performance. It initially acts with basic knowledge and adapts automatically through machine learning.
The learning agent comprises four main components

Learning Element
It is responsible for learning and making improvements based on the experiences it gains from
its environment.

Citric
It provides feedback to the learning element by the agent’s performance for a predefined
standard.

Performance Element
It selects and executes external actions based on the information from the learning element and
the critic.

Problem Generator
It suggests actions to create new and informative experiences for the learning element to
improve its performance.

AI learning agents follow a cycle of observing, learning, and acting based on feedback. They
interact with their environment, learn from feedback, and modify their behavior for future interactions.
Observation The learning agent observes its environment through sensors or other inputs.

Learning The agent analyzes data using algorithms and statistical models, learning from
feedback on its actions and performance.

Action Based on what it has learned, the agent acts in its environment to decide how
to behave.

Feedback The agent receives feedback about their actions and performance through
rewards, penalties, or environmental cues.

Adaptation Using feedback, the agent changes its behavior and decision-making processes,
updating its knowledge and adapting to its environment.

This cycle repeats over time, allowing the agent to continuously improve its performance and
adapt to changing circumstances.

Example
A good example of a learning agent program is AutoGPT, created by Significant Gravitas.

For purchasing a smartphone, we can give AutoGPT a prompt to conduct market research on the top
ten smartphones by providing insights on their pros and cons. Once the task is given, AutoGPT analyzes
the advantages and disadvantages of the top ten smartphones by exploring various websites and
sources. It evaluates the authenticity of websites using a sub-agent program. Finally, it generates a
detailed report summarizing the findings and listing the advantages and disadvantages of the top ten
smartphone companies.

Advantages
 The agent can convert ideas into action based on AI decisions
 Learning intelligent agents can follow basic commands, like spoken instructions, to perform tasks
 Unlike classic agents that perform predefined actions, learning agents can evolve with time
 AI agents consider utility measurements, making them more realistic
Disadvantages

 Prone to biased or incorrect decision-making


 High development and maintenance costs
 Requires significant computing resources
 Dependence on large amounts of data
 Lack of human-like intuition and creativity

You might also like