0% found this document useful (0 votes)
2 views

AI Unit 1 With Assignment

The document provides an overview of artificial intelligence (AI), defining intelligence and AI, and detailing its types, challenges, foundations, techniques, models, and production systems. It discusses various applications of AI, such as chatbots and self-driving cars, and highlights the importance of data quality and ethical considerations. Additionally, it explains the structure of AI agents and their classification based on characteristics like reactivity and proactivity.

Uploaded by

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

AI Unit 1 With Assignment

The document provides an overview of artificial intelligence (AI), defining intelligence and AI, and detailing its types, challenges, foundations, techniques, models, and production systems. It discusses various applications of AI, such as chatbots and self-driving cars, and highlights the importance of data quality and ethical considerations. Additionally, it explains the structure of AI agents and their classification based on characteristics like reactivity and proactivity.

Uploaded by

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

ARTIFICIAL INTELLIGENCE

UNIT 1
INTELLIGENCE
• the ability to solve complex problems or make decisions with
outcomes benefiting the actor
• Intelligence is a general mental ability that integrates cognitive
functions like perception, attention, memory, language, and
planning
• the ability to learn from experience, acquire and retain
knowledge, and use reason to solve problems.
ARTIFICIAL INTELLIGENCE

• computer systems capable of performing complex tasks that


historically only a human could do, such as reasoning, making
decisions, or solving problems.
• Artificial intelligence is the simulation of human intelligence
processes by machines, especially computer systems. Specific
applications of AI include expert systems, natural language
processing, speech recognition and machine vision.
EXAMPLES

• ChatGPT: Uses large language models (LLMs) to generate text in response to


questions or comments posed to it.
• Google Translate: Uses deep learning algorithms to translate text from one
language to another.
• Netflix: Uses machine learning algorithms to create personalized
recommendation engines for users based on their previous viewing history.
• Tesla: Uses computer vision to power self-driving features on their cars.
4 MAIN TYPES OF ARTIFICIAL INTELLIGENCE

1. Reactive machines

• Reactive machines are AI systems that have no memory and are task specific,
meaning that an input always delivers the same output. Machine learning
models tend to be reactive machines because they take customer data, such
as purchase or search history, and use it to deliver recommendations to the
same customers.
• This type of AI is reactive. It performs “super” AI, because the average human
would not be able to process huge amounts of data such as a customer’s
entire Netflix history and feedback customized recommendations
2. Limited memory machines
• The next type of AI in its evolution is limited memory. This algorithm imitates the way our
brains’ neurons work together, meaning that it gets smarter as it receives more data to train
on. Deep learning algorithms improve natural language processing (NLP), image recognition,
and other types of reinforcement learning.
• Self-driving cars: A good example of limited memory AI is the way self-driving cars observe
other cars on the road for their speed, direction, and proximity. This information is
programmed as the car’s representation of the world, such as knowing traffic lights, signs,
curves, and bumps in the road.
3. Theory of mind
• The first two types of AI, reactive machines and limited memory, are types
that currently exist. Theory of mind and self-aware AI are theoretical types
that could be built in the future. As such, there aren’t any real world examples
yet.
• If it is developed, theory of mind AI could have the potential to understand
the world and how other entities have thoughts and emotions. In turn, this
affects how they behave in relation to those around them.
4. Self-awareness
• The grand finale for the evolution of AI would be to design systems that have
a sense of self, a conscious understanding of their existence. This type of AI
does not exist yet.
• This goes a step beyond theory of mind AI and understanding emotions to
being aware of themselves, their state of being, and being able to sense or
predict others’ feelings. For example, “I’m hungry” becomes “I know I am
hungry” or “I want to eat paneer tikka because it’s my favorite food.”
CHALLENGES
Artificial intelligence (AI) faces many challenges, including:
• Data privacy
AI often involves processing large amounts of sensitive and confidential information,
which can raise concerns about data security and privacy. Hackers and cybercriminals
can exploit vulnerabilities in AI systems to gain access to sensitive information.
• Bias
AI systems are only as good as the data they are trained on, and if that data is biased,
the AI system will be biased as well. Bias can lead to unfair treatment of certain groups
of people and can perpetuate existing inequalities.
• Ethical challenges
As AI systems become increasingly autonomous, questions arise about
accountability, bias, and privacy. Ensuring that AI operates in a fair and
responsible manner remains a pressing concern.
• Data quality
AI systems rely heavily on the data they are fed, and if the data is inaccurate,
incomplete, or biased, the results of the AI will also be flawed.
THE FOUNDATIONS OF ARTIFICIAL INTELLIGENCE

The Foundation of AI
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.
TECHNIQUES

Artificial intelligence (AI) techniques can be categorized into three


types: Supervised learning, Unsupervised learning, Reinforcement learning.
Each technique has its own strengths and weaknesses, and can be applied to a
wide range of problems and applications
• Supervised Learning: The algorithm is trained on a labeled dataset, where the input-
output pairs are provided. The algorithm learns the relationship between input and
output and applies this knowledge to unseen data. Examples: Linear Regression,
Support Vector Machines (SVM), and Neural Networks.
• Unsupervised Learning: The algorithm is provided with an unlabeled dataset, and it
identifies patterns or structures in the data without guidance. Examples: Clustering
(e.g., K-means), Dimensionality Reduction (e.g., Principal Component Analysis), and
Association Rule Learning.
• Reinforcement Learning: The algorithm learns from its actions and interactions with an
environment to maximize a reward signal. It’s particularly useful in decision-making and
control tasks. Examples: Q-learning, Deep Q-Network (DQN), and Policy Gradient
methods.
MODELS

Artificial intelligence (AI) models are essential for AI to learn how to perform
tasks like facial recognition, email spam detection, and product
recommendations. AI models require a dataset to learn how to perform these
tasks
Artificial intelligence models are the tools and algorithms used to train
computers to process and analyze data – just as humans do
• An AI model is a program that has been trained on a set of data to recognize
certain patterns or make certain decisions without further human
intervention. Artificial intelligence models apply different algorithms to
relevant data inputs to achieve the tasks, or output, they’ve been
programmed for.
DEFINING PROBLEM AS A STATE SPACE SEARCH

• A state space is a mathematical representation of a problem that


defines all possible states that the problem can be in.
Furthermore, in search algorithms, we use a state space to
represent the current state of the problem, the initial state, and
the goal state.
• The state space search in artificial intelligence is a search algorithm that is
used in computer science. Artificial intelligence is a process by which the
search algorithm is desired to find the desired goal from all the probabilities.
The states and the instances are considered to find the goal state within the
state space process.
• The state space search algorithm is described as the set of ordered pairs with
two integers.
• State: It can be the Initial State, the Goal State, or any state generated by
applying rules.
• Space: In AI, Space consists of the complete set of conceivable states for a
given problem.
• Search: This technique progresses from the initial state to the desired state by
applying effective rules within the space of all possible states.
• Search Tree: It’s a visual representation of the problem, starting with the
initial state as the root node.
• Transition Model: Describes the impact of each action. Path Cost assigns a
value to each sequence connecting start and end nodes, with the optimal
option having the lowest cost.
STATE SPACE SEARCH IS A FUNDAMENTAL TECHNIQUE IN
ARTIFICIAL INTELLIGENCE WITH VARIOUS APPLICATIONS
ACROSS DIFFERENT DOMAINS
• Puzzle Solving: Solving puzzles like the 8-puzzle, Rubik’s Cube, and Sudoku using state space search
algorithms
• Pathfinding in Games: Finding the shortest path for characters or agents in video games is a common
use case for algorithms like A*
• Robotics: Planning the movement of robots in a physical environment to perform tasks or reach specific
locations
• Automated Planning: In areas like logistics, transportation, and manufacturing, state space search helps
in planning and scheduling tasks
• Natural Language Processing: In tasks like machine translation, state space search can be used to
generate optimal translations
• Chess and Games: Determining optimal moves in games with well-defined rules and states, like chess,
checkers, and Go
• Optimization Problems: Solving optimization problems in areas like resource allocation, scheduling, and
financial modeling
PRODUCTION SYSTEM

• A production system in AI is a computer-based system designed to automate


decision-making and problem-solving tasks. It comprises a global database,
production rules, and a control system to process data and derive conclusions
• AI Production Systems are the backbone of decision-making. These systems
automate complex tasks through production rules, efficiently processing data
and generating insights. They facilitate knowledge-intensive processes
comprising a global database, production rules, and a control system. Their
key features include simplicity, modularity, adaptability, and modifiability
The components of an AI Production System encompass three essential
elements:
• Global Database: The global database serves as the system’s memory, storing
facts, data, and knowledge relevant to its operation. It is a repository that
production rules can access to make informed decisions and draw
conclusions.
• Production Rules: Production rules form the core logic of the system. They
are a set of guidelines that the system follows while making decisions. These
regulations outline the system’s reaction to various inputs and circumstances.
• Control System: The control system manages the execution of production
rules. It determines the sequence in which rules are applied, ensuring
efficient processing and optimizing the system’s performance.
Production System Rules
• Production system rules are the fundamental building blocks of AI
systems. These rules define the logic and actions that guide the system’s
decision-making process.
• In an AI production system, rules encode knowledge and specify how
the system should respond to different inputs and conditions.
Production rules consist of conditions (if part) and actions (then part),
which are applied based on the system’s current state and available
data.
REAL-WORLD EXAMPLES OF AI PRODUCTION SYSTEMS IN
USE
• Customer Support Chatbots: AI-powered chatbots in customer support systems use
production rules to handle customer inquiries, provide answers, and escalate
complex issues to human agents.
• Fraud Detection Systems: In financial institutions, AI production systems detect
fraudulent activities by analyzing transaction data and applying predefined fraud
detection rules.
• Medical Diagnosis: AI production systems are used in healthcare for medical
diagnosis. They analyze patient symptoms, medical history, and test results to
suggest possible diagnoses and treatment options.
• Traffic Management: Smart traffic management systems use AI production systems
to optimize traffic flow by adjusting signal timings based on real-time traffic
conditions and predefined rules.
FEATURES OF A PRODUCTION SYSTEM IN AI
• Simplicity: Production Systems offer a straightforward way to encode and
execute rules, making them accessible for developers and domain experts.
• Modularity: These systems are composed of modular components, allowing
for the addition, removal, or modification of rules without disrupting the
entire system. This modularity enhances flexibility and ease of maintenance.
• Modifiability: AI Production Systems are highly adaptable. Rules can be
updated or replaced without extensive reengineering, ensuring the system
remains up-to-date and aligned with evolving requirements.
• Knowledge-intensive: They excel in handling knowledge-rich tasks, relying on
a comprehensive global database.
• Adaptability: AI Production Systems can dynamically adapt to new data and
scenarios. This adaptability allows them to continuously improve.
CLASSIFICATION OF PRODUCTION SYSTEMS IN AI
AI production systems can be classified into four common classifications:
• Monotonic Production System: In a monotonic production system, the laws and truths remain
constant while being carried out. A rule remains constant throughout the procedure once a fact
is deduced. This stability ensures predictability but may limit adaptability in dynamic
environments.
• Partially Commutative Production System: In this type of system, rules can be applied flexibly,
allowing for some degree of adaptability while maintaining certain constraints. Partial
commutativity strikes a balance between stability and flexibility.
• Non-monotonic Production System: Non-monotonic production systems are more dynamic and
adaptive. Rules can be added, modified, or retracted during execution. They are excellent for
situations where the knowledge base needs to change in response to shifting circumstances
because of their flexibility.
• Commutative System: Commutative systems have rules that can be applied in any sequence
without changing the result. In circumstances where the sequence of rule application is not
essential, this high degree of flexibility may be beneficial.
INTELLIGENT AGENTS

• An AI system is composed of an agent and its environment. The agents act in their
environment. The environment may contain other agents.
An agent is anything that can be viewed as:
• Perceiving its environment through sensors and
• Acting upon that environment through actuators(actuators are the physical or digital mechanisms that an
AI agent uses to carry out actions in its environment. They bridge the gap between the agent's decision-
making process and its impact on the surroundings. )
• an agent is a computer program or system that is designed to perceive its
environment, make decisions and take actions to achieve a specific goal or set of
goals. The agent operates autonomously, meaning it is not directly controlled by a
human operator.
• An intelligent agent (IA) is a program that acts independently to achieve goals by
using sensors and actuators to perceive its environment. IAs can be robots,
machines, humans, or animals. They can learn from their environment to achieve
their goals.
Some examples of intelligent agents include:
• Driverless cars
• Siri virtual assistant
• Software agents
Following are the main four rules for an AI agent:
• Rule 1: An AI agent must have the ability to perceive the
environment.
• Rule 2: The observation must be used to make decisions.
• Rule 3: Decision should result in an action.
• Rule 4: The action taken by an AI agent must be a rational action.
STRUCTURE OF AN AI 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
• Following are the main three terms involved in the structure of an AI agent:
• Architecture: Architecture is machinery that an AI agent executes on.
• Agent Function: Agent function is used to map a percept to an action.
• Agent program: Agent program is an implementation of agent function. An agent
program executes on the physical architecture to produce function f.
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
self-driving car then PEAS representation will be:
• 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.
• Agents can be classified into different types based on their characteristics,
such as whether they are reactive or proactive, whether they have a fixed or
dynamic environment, and whether they are single or multi-agent systems.
• Reactive agents are those that respond to immediate stimuli from their
environment and take actions based on those stimuli. Proactive agents, on
the other hand, take initiative and plan ahead to achieve their goals. The
environment in which an agent operates can also be fixed or dynamic. Fixed
environments have a static set of rules that do not change, while dynamic
environments are constantly changing and require agents to adapt to new
situations.
• Multi-agent systems involve multiple agents working together to achieve a
common goal. These agents may have to coordinate their actions and
communicate with each other to achieve their objectives. Agents are used in
a variety of applications, including robotics, gaming, and intelligent systems.
They can be implemented using different programming languages and
techniques, including machine learning and natural language processing.
• A rational agent could be anything that makes decisions, such as a
person, firm, machine, or software. It carries out an action with the best
outcome after considering past and current percepts
Architecture and Agent programs
Architecture is the machinery that the agent executes on. It is a device
with sensors and actuators, for example, a robotic car, a camera, and a
PC. An agent program is an implementation of an agent function.
An agent function is a map from the percept sequence(history of all that
an agent has perceived to date) to an action.
CHARACTERISTICS

Agents in Artificial Intelligence contain the following Characteristics:


• Enrironment
• Autonomous
• Flexibility
• Reactive
• Proactiveness
• Using Response Rules
• Environment
The agent is situated in a given environment.
• Autonomous
The agent can operate without direct human intervention or other software methods. It controls
its activities and internal environment. The agent independently which steps it will take in its
current condition to achieve the best improvements. The agent achieves autonomy if its
performance is measured by its experiences in the context of learning and adapting.
Flexibility
• Reactive: Agents must recognize their surroundings and react to the changes within them.
• Proactive: Agents shouldn’t only act in response to their surroundings but also be able to take
the initiative when appropriate and effect an opportunistic, goal-directed performance.
• Social: Agents should work with humans or other non-human agents.
Reactive
• Reactive systems maintain ongoing interactions with their environment, responding to
its changes.
• The program’s environment may be guaranteed, not concerned about its success or
failure.
• Most environments are dynamic, meaning that things are constantly in a state of
change, and information is incomplete.
• Programs must make provisions for the possibility of failure.
Pro-Activeness
• Taking the initiative to create goals and try to meet them.
Using Response Rules
• The goal for the agent is directed behavior, having it do things for the user.
• Mobility: The agent must have the ability to actuate around a system.
• Veracity: If an agent’s information is false, it will not communicate.
• Benevolence: Agents don’t have contradictory or conflicting goals. Therefore, every
Agent will always try to do what it is asked.
• Rationality: The agent will perform to accomplish its goals and not work in a way that
opposes or blocks them.
• Learning: An agent must be able to learn.
SEARCH METHODS AND ISSUES IN THE DESIGN OF SE
ARCH PROBLEMS

• Search: Searching is a step by step procedure to solve a search-problem in a


given search space. A search problem can have three main factors:
• Search Space: Search space represents a set of possible solutions, which a system may
have.
• Start State: It is a state from where agent begins the search.
• Goal test: It is a function which observe the current state and returns whether the goal
state is achieved or not.
• Search tree: A tree representation of search problem is called Search tree. The root of
the search tree is the root node which is corresponding to the initial state.
• Actions: It gives the description of all the available actions to the agent.
• Transition model: A description of what each action do, can be represented as a
transition model.
• Path Cost: It is a function which assigns a numeric cost to each path.
• Solution: It is an action sequence which leads from the start node to the goal node.
• Optimal Solution: If a solution has the lowest cost among all solutions.
PROPERTIES OF SEARCH ALGORITHMS

• Completeness: A search algorithm is said to be complete if it guarantees to


return a solution if at least any solution exists for any random input.
• Optimality: If a solution found for an algorithm is guaranteed to be the best
solution (lowest path cost) among all other solutions, then such a solution for
is said to be an optimal solution.
• Time Complexity: Time complexity is a measure of time for an algorithm to
complete its task.
• Space Complexity: It is the maximum storage space required at any point
during the search, as the complexity of the problem.
TYPES OF SEARCH ALGORITHMS
• Uninformed/Blind Search:
The uninformed search does not contain any domain knowledge
such as closeness, the location of the goal. It operates in a brute-
force way as it only includes information about how to traverse the
tree and how to identify leaf and goal nodes. Uninformed search
applies a way in which search tree is searched without any
information about the search space like initial state operators and
test for the goal, so it is also called blind search.It examines each
node of the tree until it achieves the goal node.
Informed Search
• Informed search algorithms use domain knowledge. In an
informed search, problem information is available which can guide
the search. Informed search strategies can find a solution more
efficiently than an uninformed search strategy. Informed search is
also called a Heuristic search.
• A heuristic is a way which might not always be guaranteed for best
solutions but guaranteed to find a good solution in reasonable
time.
BREADTH-FIRST SEARCH

• Breadth-first search is the most common search strategy for traversing a


tree or graph. This algorithm searches breadthwise in a tree or graph, so
it is called breadth-first search.
• BFS algorithm starts searching from the root node of the tree and
expands all successor node at the current level before moving to nodes
of next level.
• Uses FIFO queue
Advantages:
• BFS will provide a solution if any solution exists.
• If there are more than one solutions for a given problem, then BFS will provide the
minimal solution which requires the least number of steps.
Disadvantages
• It requires lots of memory since each level of the tree must be saved into memory to
expand the next level.
• BFS needs lots of time if the solution is far away from the root node.
S---> A--->B---->C--->D---->G--->H--->E---->F---->I---->K
Step 1: SET STATUS = 1 (ready state) for each node in G
Step 2: Enqueue the starting node A and set its STATUS = 2 (waiting state)
Step 3: Repeat Steps 4 and 5 until QUEUE is empty
Step 4: Dequeue a node N. Process it and set its STATUS = 3 (processed state).
Step 5: Enqueue all the neighbours of N that are in the ready state (whose
STATUS = 1) and set their STATUS = 2(waiting state)
[END OF LOOP]
Step 6: EXIT
DEPTH-FIRST SEARCH (DFS)

Depth-first search (DFS) is a recursive algorithm that


searches through tree or graph data structures. It's a
backtracking algorithm that explores as far as
possible along each branch before backtracking
UNIFORM-COST SEARCH ALGORITHM

Uniform-cost search is a searching algorithm used for traversing a


weighted tree or graph. This algorithm comes into play when a different
cost is available for each edge. The primary goal of the uniform-cost
search is to find a path to the goal node which has the lowest cumulative
cost. Uniform-cost search expands nodes according to their path costs
form the root node. It can be used to solve any graph/tree where the
optimal cost is in demand. A uniform-cost search algorithm is
implemented by the priority queue. It gives maximum priority to the
lowest cumulative cost. Uniform cost search is equivalent to BFS
algorithm if the path cost of all edges is the same.
BEST-FIRST SEARCH ALGORITHM (GREEDY SEARCH)

• Greedy best-first search algorithm always selects the path which


appears best at that moment. It is the combination of depth-first
search and breadth-first search algorithms. It uses the heuristic
function and search. Best-first search allows us to take the
advantages of both algorithms. With the help of best-first search,
at each step, we can choose the most promising node. In the best
first search algorithm, we expand the node which is closest to the
goal node and the closest cost is estimated by heuristic function
A* SEARCH ALGORITHM

• A* search is the most commonly known form of best-first search.


It uses heuristic function h(n), and cost to reach the node n from
the start state g(n). It has combined features of UCS and greedy
best-first search, by which it solve the problem efficiently. A*
search algorithm finds the shortest path through the search space
using the heuristic function. This search algorithm expands less
search tree and provides optimal result faster. A* algorithm is
similar to UCS except that it uses g(n)+h(n) instead of g(n).
ASSIGNMENT 1

1. Explain problem solving in AI


2. Explain different AI techniques.
3. What is an intelligent agent. Explain different categories of
Intelligent agents.
4. Write and explain A* algorithm with example.
5. What are the different applications of Artificial intelligence.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy