AI Unit 1 Notes
AI Unit 1 Notes
# Definition
Artificial Intelligence (AI) is an area of computer science that
emphasizes the creation of intelligent machines that work and
reacts like humans. AI is a broad field that includes many
disciplines, such as computer science, data analytics, statistics,
neuroscience, and more.
Al has become an essential part of the technology industry.
Research associated with artificial intelligence is highly technical
and specialized.
# Goals of AI
1. To create expert systems : The systems which exhibit intelligent
behaviour, learn, demonstrate, explain, and advice its users.
# Adv of Ai
Reduction in Human Error
Useful for risky areas
High Reliability
Digital Assistant
Faster Decisions
# DisAdv of Ai
High Cost
Can't Replace Humans
Doesn't Improve With Experience
Lack of Creativity
Risk Of Unemployment.
No Feelings And Emotion
# Evolution Of AI
o AI has evolved over decades through significant milestones that
define its journey from theoretical ideas to practical applications.
The evolution can be summarized in six stages, each with key
breakthroughs and challenges.
4. Computer Vision
Computer Vision is the field of AI that focuses on enabling
machines to interpret and analyze visual data from the world, such
as images and videos. It aims to replicate human vision capabilities
in machines.
How it works:
It uses techniques like image processing, pattern recognition, and
machine learning to extract meaningful information from images.
For example, in facial recognition, it identifies unique facial
features to match with stored profiles.
Applications:
Computer Vision powers face recognition systems (used in
smartphones and security systems), object detection in self-
driving cars, and medical imaging for diagnosing diseases like
cancer. It is also widely used in augmented reality and video
surveillance.
5. Robotics
Robotics is the branch of AI that deals with designing and creating
robots that can perform tasks autonomously or semi-autonomously.
Robots combine AI with mechanical engineering.
How it works:
Robots perceive their environment through sensors (e.g., cameras,
infrared), process the information using AI algorithms, and take
actions using actuators like motors or arms. For instance, robotic
vacuum cleaners analyze room layouts to clean efficiently.
Applications:
Robotics is used in manufacturing (e.g., assembling cars), healthcare
(e.g., surgical robots), and exploration (e.g., NASA's Mars Rovers).
Robots are also used in homes for tasks like cleaning and in military
operations for surveillance and bomb disposal.
6. Expert Systems
Expert Systems are AI programs designed to solve specific problems
by mimicking the decision- making ability of a human expert in a
particular field.
How it works:
These systems have a knowledge base (a collection of facts and
rules) and an inference engine that applies the rules to the
knowledge base to solve problems. For instance, in medical
diagnosis, an expert system can analyze symptoms and
recommend treatments.
Applications:
Expert Systems are used in areas like medical diagnosis (e.g.,
MYCIN for identifying bacterial infections), engineering (to
troubleshoot equipment), and business (for financial
forecasting).
7. Fuzzy Logic
Fuzzy Logic is a branch of AI that deals with reasoning under
uncertainty. Unlike traditional logic that only considers "true" or
"false," fuzzy logic works with degrees of truth, similar to how
humans make decisions.
How it works:
Fuzzy logic uses "fuzzy sets" to handle uncertain or imprecise data.
For example, a washing machine with fuzzy logic can adjust water
usage and wash cycles based on load size and dirtiness, rather than
fixed rules.
Applications:
Fuzzy logic is used in home appliances (e.g., air conditioners,
washing machines), automotive systems (e.g., automatic gear
shifting), and decision-making systems where precision is not
possible.
8. Evolutionary Computing
Evolutionary Computing is inspired by biological evolution. It uses
algorithms like genetic algorithms to solve optimization problems by
mimicking natural selection and survival of the fittest.
How it works:
The algorithm starts with a population of possible solutions,
evaluates them based on a fitness function, and evolves better
solutions through operations like mutation and crossover. For
example, it can optimize the design of an aircraft for better
performance.
Applications:
Evolutionary Computing is used in robotics for learning walking
patterns, optimizing supply chain logistics, and solving complex
scheduling problems like assigning resources to tasks efficiently.
# Classification of AI
Based on Functionalities: Based on the ways the machines behave and
functionalities, there are four types of Artificial Intelligence
approaches:
1. Reactive Machines
Reactive Machines are the simplest type of AI systems that
only focus on the current situation.
They cannot store past experiences or use them to
influence future actions.
These machines analyze the present data to perform a
specific task and respond accordingly. They work purely on
predefined logic without adapting to changes or learning
over time.
Key Features:
o They do not have memory, so they cannot learn from
previous actions.
o They focus only on analyzing the present and taking the
best possible action at that moment.
Example:
o Games like Deep Blue, IBM's chess-playing computer, which
defeated the world chess champion in the 1990s.
o It calculates all possible moves but does not learn or adapt
after a game.
2. Limited Memory
Limited Memory AI systems can temporarily store and use
past data for a short period to improve their decision-
making process.
These systems can analyze recent events or conditions to
perform their tasks better but cannot permanently retain
this information.
They are designed to function within specific scenarios
where short-term memory can improve efficiency, but they
lack the ability to build a long- term understanding of their
environment.
Key Features:
o They use this temporary memory to make
decisions or predictions based on recent
observations.
o Once the task is completed, the stored data is
discarded.
Example:
o Self-driving cars: These use limited memory to understand
the speed and distance of nearby vehicles, the road
conditions, and traffic signals. They analyze this information
to navigate safely but do not permanently store these details.
3. Theory of Mind
Theory of Mind AI refers to systems that can understand human
emotions, thoughts, beliefs, and intentions, aiming to interact with
humans on a social and emotional level.
This type of AI focuses on replicating human-like social behavior,
allowing it to interpret and respond to complex social cues. It
seeks to enable machines to build trust and form meaningful
relationships with humans, adapting their behavior to individual
needs and contexts.
Key Features:
These systems need to interpret emotions, body language, and
social cues to interact naturally.
They would be capable of forming relationships or adapting their
behavior based on a user’s needs or feelings.
Current Status:
Research and development are actively progressing in this area,
but fully functional AI with a Theory of Mind does not exist yet.
4. Self-Awareness
Self-Awareness AI represents the most advanced and
hypothetical form of artificial intelligence. These systems are
envisioned to possess their own consciousness, allowing them
to understand their existence, emotions, and environment.
Unlike other AI types, self-aware machines would have
independent reasoning and decision-making capabilities,
making them capable of functioning autonomously with no
human guidance. This level of AI remains theoretical and
raises questions about ethics and safety.
Key Features:
o These systems would be able to think, feel, and make
from reality.
o If achieved, it could revolutionize industries, but it also
# AI Agent
• An AI agent is a software program designed to interact with its
environment, perceive the data it receives, and take actions based
on that data to achieve specific goals.
• They use predetermined rules or trained models to make
decisions and might need external control or supervision.
# Intelligent Agent
An intelligent agent is an autonomous entity which acts upon an
environment using sensors and actuators for achieving goals. An
intelligent agent may learn from the environment to achieve their goals.
Intelligent agents are designed to interact with their surroundings, learn
from changes, and make appropriate decisions based on their
observations.
3. Goal-Based Agents
What are they?
Goal-Based Agents are designed to achieve specific goals. Unlike
reflex agents, they don't just react to the environment; they think
about how to reach a particular objective. These agents can plan
their actions and make decisions that move them closer to their
goal.
How do they work?
These agents use a goal-directed approach, where they evaluate
different possible actions and choose the one that will lead to their
goal. They might even have to consider multiple steps or
intermediate actions to reach the desired outcome.
Example:
o A chess-playing AI is a goal-based agent. Its goal is to
checkmate the opponent. It doesn't just react to the
opponent’s moves but plans its own moves to gradually
move towards achieving checkmate.
4. Utility-Based Agents
What are they?
Utility-Based Agents not only try to achieve a goal, but they also
seek to maximize the overall benefit or "utility" of their actions.
These agents are concerned with the quality of the results and aim
to choose actions that provide the most optimal outcome.
How do they work?
Utility-Based Agents evaluate different possible actions based on how well they meet
their goals. The goal isn’t just to reach the destination, but to do it in the best way
possible—whether it’s by minimizing time, cost, or maximizing efficiency.
Example:
o A ride-sharing app like Uber uses a utility- based approach. It
tries to pick the best route that minimizes both travel time
and cost while ensuring a good experience for the rider.
5. Learning Agents
What are they?
Learning Agents have the unique ability to learn from their
experiences. They start with basic knowledge and improve over
time as they interact
with the environment. Through learning, they can adapt to new
situations and make better decisions in the future.
How do they work?
These agents use feedback from their actions to update their
knowledge and improve their decision-making. They might use
techniques like trial and error, pattern recognition, or
reinforcement learning to understand what works best.
Example:
o Virtual assistants like Siri, Google Assistant, and Alexa are
learning agents. They improve over time as they interact with
users, understand speech better, and provide more relevant
responses based on past interactions.
2. Adaptability:
They can adapt to changes in their environment. For instance, a
self-driving car adjusts to traffic conditions.
3. Goal-Oriented:
Every intelligent agent has a specific goal or objective that it tries
to achieve.
4. Interaction:
Intelligent agents can communicate with humans, other agents, or
systems to gather information or collaborate on tasks.
1. Perception (Sensors):
o What is it?
The perception component allows the agent to sense or
observe its environment. It gathers data or input from the
environment using sensors. The sensors help the agent detect
changes and understand the current situation.
o Example:
A robot uses cameras and microphones to perceive its
surroundings.
2. Environment:
o What is it?
The environment is the world or space in which the agent
operates. The agent perceives and interacts with the
environment. The environment can be real (like a house or
factory) or virtual (like a game or simulation).
o Example:
For a self-driving car, the environment includes roads, other
cars, traffic signals, etc.
3. Actuators:
o What is it?
Actuators allow the agent to take actions in the
environment. Once the agent has
processed information, it needs to act or respond in some
way, and actuators are the tools that make that possible.
o Example:
A robot uses motors to move or a camera to capture images.
4. Reasoning (Processing or Decision-Making):
o What is it?
This component is responsible for processing the information
received from the environment and deciding what action to
take. It involves interpreting the data, considering possible
outcomes, and choosing the best course of action.
o Example:
A chess-playing AI uses reasoning to decide which move to
make next based on the current board situation.
5. Learning (Optional):
o What is it?
Some intelligent agents have the ability to learn from
experience. They use past actions and feedback to improve
future decision- making. Learning helps the agent adapt to
new situations and enhance performance over time.
o Example:
A voice assistant learns your preferences and gets better at
understanding your commands over time.
6. Performance Measure:
o What is it?
The performance measure is used to evaluate the success of
the agent's actions. It determines whether the agent is
achieving its goals and how effectively it is performing its
tasks.
o Example:
For a delivery robot, the performance measure could be
how efficiently it delivers packages.
Que. Explain the role of sensors and effectors
in the functioning of intelligent agent?
Ans. In an intelligent agent, sensors and effectors play crucial roles in
enabling the agent to interact with and respond to its environment. These
components allow
the agent to perceive the world around it and take actions based on its
perception.
1. Sensors (Perception)
Sensors are the components responsible for gathering information about
the environment. They enable the agent to perceive the world around it
by detecting changes or capturing data. Sensors are vital because an
intelligent agent can only make informed decisions if it has accurate and
up-to-date information about its surroundings.
Role of Sensors:
o Data Collection: Sensors collect data from the environment,
such as sounds, images, temperature, or any other type of
relevant information.
o Environmental Awareness: They allow the agent to
"sense" the state of the world, such as obstacles, people,
or events that may be occurring in its surroundings.
o Input for Decision-Making: The information gathered by
sensors serves as input for the agent's reasoning and
decision-making processes. The agent uses this data to
determine the most appropriate actions.
2. Effectors (Actuators)
Effectors (also called actuators) are responsible for executing actions or
performing tasks based on the decisions made by the intelligent agent.
After the agent processes the information gathered by its sensors and
reasons about what actions to take, the effectors act on the environment.
Role of Effectors:
o Executing Actions: Effectors carry out the actions that the
agent has decided are necessary to achieve its goals. These
could be physical actions, like moving, or virtual actions, like
sending commands.
o Interaction with the Environment: Effectors enable the
agent to interact with its environment by changing things,
such as moving objects, navigating through space, or
providing outputs like voice responses.
o Outcome of Decision Making: Effectors implement the results
of the agent’s reasoning process and enable the agent to
impact the environment based on the agent’s perception.
Que. What are the steps involved in problem solving agent ?
Ans. An agent solves problems by following a series of steps, each
of which builds upon the previous one:
Step 1: Goal Setting Introduction:
In the first step, the agent needs to decide what it
wants to achieve. This is called goal setting. The agent looks at the
environment and considers what is possible. Based on this, it sets a
goal that it aims to achieve. For example, if a robot is in a room, its
goal might be to move to a particular spot in the room.
Step 2: Goal Formulation
Once the agent has set the goal, the next step is to formalize or
define the goal more clearly in terms of actions and expected
outcomes. This is called goal formulation. The agent now needs to
figure out how to express the goal in a way that it can work towards
it.
Key Activity in Goal Formulation:
o Observe Current State: The agent looks at where it is
currently. It checks the present state of the
environment to understand what is happening and
what needs to be done.
o Tabulate Performance Measures: The agent also
checks how well it is performing by measuring how
far it is from its goal. It uses these measures to track
progress.
Step 3: Problem Formulation
After clearly understanding the goal, the agent needs to figure out how
to reach it. This is done by problem formulation, which means
determining the steps (or actions) that need to be taken to reach the
goal.
What Happens in Problem Formulation:
The agent looks at the current situation and thinks about the
actions it can take to move from the starting point to the goal. It
may need to decide which action to take at each step to reach the
goal in the most efficient way.
In many cases, the agent does not know exactly what will happen when it
takes an action. The environment might be unknown or unpredictable. In
such cases, the agent has to search for the best possible sequence of
actions that will lead to the goal.
What Happens in Search:
o The agent tries different actions to see what works. It
explores possible actions and learns from the results.
o As it tests these actions, the agent gathers information and
builds knowledge about how to reach its goal. This process
of learning is important, especially when the environment is
new or unknown.
o Once the agent has gathered enough information, it will
know which set of actions works best to reach the goal.
Steps Involved in Problem-Solving by an Agent
An agent solves problems by following a series of steps, each of which
builds upon the previous one.
Step 1: Goal Setting Introduction:
In the first step, the agent needs to decide what it
wants to achieve. This is called goal setting. The agent looks at the
environment and considers what is possible. Based on this, it sets a goal
that it aims to achieve. For example, if a robot is in a room, its goal
might be to move to a particular spot in the room.
Step 2: Goal Formulation
Once the agent has set the goal, the next step is to formalize or define
the goal more clearly in terms of actions and expected outcomes. This is
called goal formulation. The agent now needs to figure out how to
express the goal in a way that it can work towards it.
Key Activity in Goal Formulation:
o Observe Current State: The agent looks at where it is
currently. It checks the present state of the environment to
understand what is happening and what needs to be done.
o Tabulate Performance Measures: The agent also checks
how well it is performing by measuring how far it is from
its goal. It uses these measures to track progress.
By observing its environment and measuring its performance, the agent can plan how to
achieve its goal.
Step 3: Problem Formulation
After clearly understanding the goal, the agent needs to figure out how
to reach it. This is done by problem formulation, which means
determining the steps (or actions) that need to be taken to reach the
goal.
What Happens in Problem Formulation:
The agent looks at the current situation and thinks about the
actions it can take to move from the starting point to the goal. It
may need to decide which action to take at each step to reach the
goal in the most efficient way.
Step 4: Search in an Unknown Environment
In many cases, the agent does not know exactly what will happen when it
takes an action. The environment might be unknown or unpredictable. In
such cases, the agent has to search for the best possible sequence of
actions that will lead to the goal.
What Happens in Search:
o The agent tries different actions to see what works. It
explores possible actions and learns from the results.
o As it tests these actions, the agent gathers information and
builds knowledge about how to reach its goal. This process of
learning is important, especially when the environment is new
or unknown.
Once the agent has gathered enough information, it will know which set
of actions works best to reach the goal.
Step 5: Execution Phase
After finding a possible solution, the agent enters the execution phase,
where it actually performs the actions that will lead to the goal.
Key Idea:
The agent uses the knowledge it has gathered to follow a
sequence of actions. These actions are based on the plan
made during the problem formulation and search steps.
o The agent executes these actions one by one, with each
action bringing it closer to the goal.
Once the agent executes the actions, it can evaluate whether the goal has been
reached. If not, the agent may need to reformulate its goals or actions and repeat
the process.