0% found this document useful (0 votes)
5 views20 pages

Chapter 2

Uploaded by

smkodole06
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)
5 views20 pages

Chapter 2

Uploaded by

smkodole06
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/ 20

Chapter 2: Basics of Artificial Intelligence and Intelligent Agents

 Artificial Intelligence
 The foundation of Artificial Intelligence
 The state of Art
 Agents and environments
 Good behavior: The concept of rationality
 The nature of environments

 Introduction to Artificial Intelligence


 The structure of agents

Artificial Intelligence (AI) is one of the hottest topics in the tech industry right
now. It has been around for decades, but recent advances in machine learning
and deep learning have brought AI back into the mainstream. AI is a field of
computer science that aims to create intelligent machines that can perform tasks
that normally require human intelligence. These tasks can range from
recognizing speech to playing chess. AI has the potential to revolutionize the way
we live and work, but it also raises some important ethical questions.

Here are some key points to understand about AI:

1. AI is not a single technology or technique. It is a broad field that


encompasses many different subfields, such as machine learning, natural
language processing, and
computer vision. Each of these subfields has its own set of techniques and
algorithms
that are used to create intelligent machines.

2. Machine learning is one of the most important subfields of AI. It is a method


of teaching computers to learn from data, without being explicitly
programmed. For example, a machine learning algorithm could be trained on a
large dataset of images, and then used to recognize objects in new images.

3. Deep learning is a type of machine learning that uses artificial neural networks
to
model complex patterns in data. These neural networks are inspired by the
structure of the human brain, and are capable of learning and adapting to new
data.

4. AI has many practical applications, such as self-driving cars, voice assistants,


and
fraud detection systems. These applications are already having a significant
impact on various industries, and are expected to become even more widespread
in the coming years.

5. There are also some important ethical questions surrounding AI. For
example, how can we ensure that AI systems are fair and unbiased? How can we
prevent AI from
being used for malicious purposes? These questions are still being debated by
researchers and policymakers.

Introduction to Artificial Intelligence - Artificial intelligence: Base i: The


Foundation of Artificial Intelligence

Advantages:

Reduction in Human Error

One of the biggest achievements of Artificial Intelligence is that it can reduce


human error. Unlike humans, a computer machine can't make mistakes if
programmed correctly, while humans make mistakes from time to time.
Therefore, Artificial Intelligence uses some set of algorithms by gathering
previously stored data, reducing the chances of error and increasing the
accuracy and precision of any task. Hence, Artificial Intelligence helps to solve
complex problems that require difficult calculations and can be done without any
error.

Reduce the Risk (Zero Risk)

It is also one of the biggest advantages of Artificial Intelligence. The technology


of developing AI Robots can overcome many risky limitations of humans and do
risky things for us such as defusing a bomb, oil and coal mining and exploring the
deepest part of the ocean, etc. So, it helps in any worst situation, either human or
natural disasters too. AI Robots can be used in such situations where
intervention can be hazardous.

24/7 Support

Unlike humans, a computer does not require breaks and refreshers. A normal
human can continue work till 8-9 hours, including breaks and refreshers, while a
computer machine can work 24x7 without any breaks and don't even get bored,
unlike humans. Chatbots and helpline centres can be seen as the best example of
24/7 support of various websites continuously engaged in receiving customers
queries and automatically resolved by Artificial Intelligence.

Perform Repetitive Jobs

We perform so many repetitive works in our day-to-day life, such as automatic


replies to emails, sending birthday and anniversary quotes and verifying
documents, etc. Therefore, Artificial Intelligence (AI) helps to automate the
business by performing these repetitive jobs.

Faster decision

Unlike humans, a machine helps to take decisions faster than a human and carry
out actions quicker. While taking a decision, humans analyze many factors while
the machine works on what it is programmed and delivers the results faster. The
best example of the faster decision can be seen in an online chess game in the
third level. It is impossible to beat a computer machine because it takes the best
possible step in a very short time, according to the algorithms used behind it.

New Inventions

For new inventions, AI is helping humans almost in each sector, it can be


healthcare, medical, educational, sports, technology, entertainment or research
industry etc. Using advanced AI-based technologies, doctors can predict various
dangerous diseases like cancer at a very early stage.
Challenges in AI:

Technical Challenges in AI

These challenges deal with the technical hurdles we face in developing advanced
AI systems:

1. Handling Complex Tasks

Current AI struggles with tasks requiring common sense reasoning. Imagine an


AI trying to understand a joke or navigate a crowded sidewalk. These situations
involve real-world complexities that AI models often lack the ability to process.

Example: A self-driving car encountering an unexpected obstacle like a child


playing in the street. The car might struggle to react appropriately without the
ability to understand the situation’s.

2. Scalability and Efficiency

Training powerful AI models often requires massive amounts of data and


computing resources. This can be expensive and time-consuming, making it
difficult to deploy AI solutions in real-world applications.

Example: Training a large language model like me on a massive dataset of text


and code requires significant computing power, which can be a barrier for
smaller companies or research institutions.

3. Interoperability

There’s no universal standard for AI development. Different AI platforms may


have different formats or structures for data and models. This makes it difficult
to share information and collaborate across different AI systems.

Example: Imagine an AI healthcare system developed by one company being


incompatible with another company’s system, hindering the sharing of patient
data for better diagnosis.

Social and Economic Challenges in AI

These challenges address the broader societal impacts of AI:

1. Impact on Jobs

AI automation is likely to replace many jobs currently done by humans,


potentially leading to widespread unemployment and economic disruption.

Example: Automation in factories could lead to job losses for assembly line
workers.

2. Widening Inequality

Access to AI could exacerbate existing social and economic inequalities. Those


with access to powerful AI technology could become even more powerful, while
those without access could be left behind.

Example: Wealthy companies might leverage AI for further automation and


profit, while smaller businesses struggle to keep up.

3. Need for New Regulations

As AI becomes more sophisticated, we need to develop new regulations and


policies to govern its development and use. These policies might address issues
like bias, privacy, and safety.

Example: Regulations on how AI can be used in facial recognition software to


ensure it doesn’t infringe on people’s privacy.

 The Foundation of AI
Artificial Intelligence has become a buzzword in the technological world, with
the
potential to transform the way we live and work. The foundation of AI lies in the
Base, which refers to the fundamental building blocks that make up the
technology. These
building blocks include machine learning, natural language processing,
computer
vision, and robotics, among others. Together, these components form the
backbone of AI, allowing machines to learn, adapt, and improve over time.

1. machine learning: Machine learning is a subset of AI that focuses on the


development of algorithms that enable machines to learn from data and make
predictions or decisions without being explicitly programmed. For instance, an e-
commerce platform uses machine learning algorithms to recommend products to
customers based on their browsing history, purchases, and search history.
2. Natural Language Processing: Natural Language Processing (NLP) refers to
the ability of machines to understand, interpret, and generate human
language. NLP is essential for chatbots, virtual assistants, and voice
recognition systems that allow users to interact with machines using natural
language.

3. computer vision: Computer Vision involves training machines to interpret and


understand visual data from the world around them. With computer vision,
machines can recognize objects, faces, and even emotions, which is critical for
applications such as facial recognition, surveillance, and self-driving cars.

4. Robotics: Robotics is the application of AI in the development of robots that can


perform tasks autonomously. This includes everything from industrial robots
used in manufacturing to autonomous drones and self-driving cars.

AI has the potential to transform industries and solve some of the world's most
pressing problems. For instance, AI can help in the diagnosis and treatment of
diseases, reduce carbon emissions, and improve crop yields. However, the
success of AI depends on the strength of the Base i, which requires continued
investment in research and
development.

Agents in Artificial Intelligence

An AI system can be defined as the study of the rational agent and its
environment. The agents sense the environment through sensors and act on their
environment through actuators. An AI agent can have mental properties such as
knowledge, belief, intention, etc.

What are Agent and Environment?

An agent is anything that can perceive its environment through sensors and acts
upon that environment through effectors.

A human agent has sensory organs such as eyes, ears, nose, tongue and skin
parallel to the sensors, and other organs such as hands, legs, mouth, for
effectors.

A robotic agent replaces cameras and infrared range finders for the sensors, and
various motors and actuators for effectors.

A software agent has encoded bit strings as its programs and actions.

Agent Terminology

 Performance Measure of Agent − It is the criteria, which determines how


successful an agent is.

 Behavior of Agent − It is the action that agent performs after any given
sequence of percepts.

 Percept − It is agent’s perceptual inputs at a given instance.

 Percept Sequence − It is the history of all that an agent has perceived till
date.

 Agent Function − It is a map from the precept sequence to an action.

The Structure of Intelligent Agents

 Agent’s structure can be viewed as −

 Agent = Architecture + Agent Program

 Architecture = the machinery that an agent executes on.

 Agent Program = an implementation of an agent function.


Example: The vacuum-cleaner world

• Percepts: location and contents, e.g., [A, Dirty]

• Actions: Left, Right, Suck, NoOp

Good behavior: The concept of rationality

Rationality is nothing but status of being reasonable, sensible, and having good
sense of judgment.

Rationality is concerned with expected actions and results depending upon what
the agent has perceived. Performing actions with the aim of obtaining useful
information is an important part of rationality.

What is Ideal Rational Agent?

An ideal rational agent is the one, which is capable of doing expected actions to
maximize its performance measure, on the basis of −
 Its percept sequence

 Its built-in knowledge base

Rationality of an agent depends on the following −

 The performance measures, which determine the degree of success.

 Agent’s Percept Sequence till now.

 The agent’s prior knowledge about the environment.

 The actions that the agent can carry out.

A rational agent always performs right action, where the right action means the
action that causes the agent to be most successful in the given percept sequence.
The problem the agent solves is characterized by Performance Measure,
Environment, Actuators, and Sensors (PEAS).

Task Environment : Which are essentially the “problems” to which rational agents
are the “solutions.”

Use PEAS to describe task environment

• Performance measure

• Environment

• Actuators

• Sensors

Example: Taxi driver

Performance measure: safe, fast, comfortable (maximize profits)

Environment: roads, other traffic, pedestrians, customers

Actuators: steering, accelerator, brake, signal, horn

Sensors: cameras, sonar, speedometer, GPS, odometer, accelerometer, engine


sensors
Types of Agents

 Simple Reflex Agents

 Model Based Reflex Agents

 Goal Based Agents

 Utility Based Agents

 Learning Agent
 Simple Reflex Agents

A Simple Reflex Agent is a type of AI agent that only uses current data and it
ignores any past data. It uses a set of condition-action rules coded into the
system to make its decision or take any action. They are rational only if a correct
decision is made only on the basis of current precept.

Their environment is completely observable.

Condition-Action Rule − It is a rule that maps a state (condition) to an action.

Example: The vacuum agent is a simple reflex agent because the decision is
based only on the current location, and whether the place contains dirt.

Pros and Cons of using Simple reflex agents:


Pros:

Easy to design
Easy to implement for specific tasks.

Responses quickly to any stimuli without complex processing.



Cons:

Limited Flexibility: Unable to handle unexpected or unprogrammed situations.


Lack of Context: Does not consider past interactions, leading to potentially

suboptimal decisions.

 Model Based Reflex Agents

Model-based reflex agents use the current state of the world & the internal
model of that world, to decide on the best action. It partially observes the
external environment by maintaining an internal environment.

Example of a thermostat which regulates the house temperature. It compares the


inner house temperature (environment) with the temperature set by the user
(internal environment) to identify whether it should turn heating/cooling on or
off (action).

Model-based reflex agents are useful in environments where complete


information isn’t available, and some form of history or state needs to be
considered. They're effective in applications like autocorrect where it adjusts
based on the user's typing habits.
Pros and Cons of using model based reflex agents
Pros:
 You can adjust actions based on changes in the environment.
 It uses an internal model to make informed decisions, even with incomplete
information.
Cons:
 Complex to design and implement than simple reflex agents.
 The internal model may need regular updates.

 Goal Based Agents

Goal-based agents act to achieve specific goals, using the model of the world to
consider the future consequences of their actions. They choose actions that lead
them closer to their predefined goals.

Example: Imagine a goal-based agent as a GPS navigation system. Given a


destination (goal), it evaluates various routes (actions) using its world model
(maps and traffic conditions) to recommend the fastest or shortest path,
adjusting as conditions change.

Goal-based agents are ideal for complex planning and decision-making tasks
where achieving a specific outcome is the priority. They're used in strategic
game playing, automated planning in logistics, and resource allocation in project
management, where considering future steps towards a goal is essential.
Pros and Cons of using goal-based agents
Pros:
 It is capable of adapting to achieve goals under changing conditions.
 It considers future consequences of actions, leading to more strategic
decision-making.
Cons:
 It requires more processing power for planning and evaluating potential
actions.
 It is focused on goal achievement, which may not always align with the best
overall outcome.

 Utility Based Agents

Utility-based agents aim not just to achieve goals but to maximize a measure of
satisfaction or happiness, known as utility. They evaluate the potential utility of
different states and choose actions that maximize this utility.

Example: Think of a utility-based agent as a savvy investor. Given various


investment options (states), the investor evaluates each based on potential
returns and risks (utility), aiming to maximize overall portfolio satisfaction rather
than just achieving a set financial goal.

Utility-based agents are useful in scenarios requiring optimization among various


competing criteria or preferences. They excel in financial analysis, complex
resource management, and personalized recommendation systems where the
best outcome depends on maximizing certain metrics.
Pros and Cons of using utility based agents
Pros:
 It focuses on maximizing satisfaction, leading to potentially better overall
outcomes.
 It considers a broader range of factors, leading to more nuanced decision-
making.
Cons:
 Determining and quantifying utility can be challenging.
 Evaluating and comparing utilities for different actions can be resource-
intensive.

 Learning Agent

Learning agents improve their performance and adapt to new circumstances


over time. They can modify their behavior based on past experiences and
feedback, learning from the environment to make better decisions.

Learning AI agent

Example: Consider a learning agent as a student mastering a subject. With each


lesson, homework, and test (experiences and feedback), the student (agent)
learns and adjusts study habits (behavior) to improve grades (performance) over
time.
Learning agents are pivotal in dynamic environments where conditions
constantly change, or in tasks where human expertise and intuition are difficult
to codify. They're employed in adaptive systems such as personalized learning
platforms, market trend analysis tools, and evolving security systems that adapt
to new threats.
Pros and Cons of using learning agents
Pros:
 It continuously improves and adapts to new information.
 It learns from experiences, reducing the need for extensive programming
for all possible scenarios.
Cons:
 It may perform sub optimally during the initial learning phase.
 The learning processes can lead to unexpected behaviors, requiring
safeguards and monitoring.

The Nature of Environments

Some programs operate in the entirely artificial environment confined to


keyboard input, database, computer file systems and character output on a
screen.

In contrast, some software agents (software robots or softbots) exist in rich,


unlimited softbots domains. The simulator has a very detailed, complex
environment. The software agent needs to choose from a long array of actions in
real time. A softbot designed to scan the online preferences of the customer and
show interesting items to the customer works in the real as well as
an artificial environment.

The most famous artificial environment is the Turing Test environment, in which
one real and other artificial agents are tested on equal ground. This is a very
challenging environment as it is highly difficult for a software agent to perform
as well as a human.

Turing Test

The success of an intelligent behavior of a system can be measured with Turing


Test.

Two persons and a machine to be evaluated participate in the test. Out of the two
persons, one plays the role of the tester. Each of them sits in different rooms. The
tester is unaware of who is machine and who is a human. He interrogates the
questions by typing and sending them to both intelligences, to which he receives
typed responses.

This test aims at fooling the tester. If the tester fails to determine machine’s
response from the human response, then the machine is said to be intelligent.

Properties of Environment

The environment has multifold properties −

 Discrete / Continuous − If there are a limited number of distinct, clearly


defined, states of the environment, the environment is discrete (For
example, chess); otherwise it is continuous (For example, driving).

 Observable / Partially Observable − If it is possible to determine the


complete state of the environment at each time point from the percepts it is
observable; otherwise it is only partially observable.

 Static / Dynamic − If the environment does not change while an agent is


acting, then it is static; otherwise it is dynamic.

 Single agent / Multiple agents − The environment may contain other


agents which may be of the same or different kind as that of the agent.

 Accessible / Inaccessible − If the agent’s sensory apparatus can have


access to the complete state of the environment, then the environment is
accessible to that agent.

 Deterministic / Non-deterministic − If the next state of the environment is


completely determined by the current state and the actions of the agent,
then the environment is deterministic; otherwise it is non-deterministic.

 Episodic / Non-episodic − In an episodic environment, each episode


consists of the agent perceiving and then acting. The quality of its action
depends just on the episode itself. Subsequent episodes do not depend on
the actions in the previous episodes. Episodic environments are much
simpler because the agent does not need to think ahead.
Episodic Discrete
Fully vs Deterministi Single
vs Static vs vs
Partially c vs vs Multi
Sequenti Dynamic Continuou
Observabl Stochastic Agents
al s
e

Brushing
Sequent Continuo
Your Fully Stochastic Static Single
ial us
Teeth

Playing Sequent Dynami Continuo Multi-


Partially Stochastic
Chess ial c us Agent

Playing Sequent Dynami Continuo Multi-


Partially Stochastic
Cards ial c us Agent

Sequent Dynami Continuo Multi


Playing Partially Stochastic
ial c u Agent

Autonomo
Sequent Dynami Continuo Multi-
us Fully Stochastic
ial c us Agent
Vehicles

Order in
Determinis Single
Restauran Fully Episodic Static Discrete
tic Agent
t

Simple Environment
A simple environment for an AI agent typically has:
 Clear, well-defined rules: The number of possible actions and states is
limited and predictable.

 Full observability: The agent can perceive all relevant information about
the environment at any point.

 Deterministic outcomes: Actions lead to predictable and consistent results.

 Static nature: The environment’s state doesn’t change unless acted upon by
the agent.

 Single-agent, non-interactive: There’s often only one agent, so no need to


consider other agents’ actions.

Examples: Games like tic-tac-toe or chess (assuming perfect information).

Complex Environment

A complex environment is characterized by:


 Many variables and states: Large number or even infinite states and
possible actions.

 Partial observability: The agent cannot access all information, so it must


infer, predict, or learn unknown elements.

 Stochastic outcomes: Actions may lead to unpredictable or random results


due to uncertainty or chance.

 Dynamic changes: The environment can evolve independently of the


agent’s actions.

 Multi-agent interactions: Multiple agents may compete or cooperate,


increasing complexity.

 Continuous or sequential states: The environment may require constant


monitoring and adaptation.

 Delayed or ambiguous feedback: The consequences of actions may not be


immediately clear.

Examples: Stock market trading, real-world robotics, autonomous driving, or


multiplayer online games.

You might also like