0% found this document useful (0 votes)
11 views24 pages

AI MId-1

mid 1

Uploaded by

Priya Mannem
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)
11 views24 pages

AI MId-1

mid 1

Uploaded by

Priya Mannem
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/ 24

AI MId-1

1 List and explain the applications of


Artificial Intelligence.
Artificial Intelligence (AI) has many practical uses in different fields because it
can quickly process lots of data, spot patterns, and make decisions. Here are
some key applications:

1. Healthcare:

Diagnostics: AI helps doctors identify diseases from medical images


like X-rays and MRIs.

Personalized Treatment: AI suggests tailored treatment plans based on


patient data.

Robotic Surgery: AI-powered robots assist in surgeries, making them


more precise and safer.

2. Finance:

Fraud Detection: AI spots unusual activities in transactions to prevent


fraud.

Trading: AI makes quick and smart trading decisions in the stock


market.

Customer Service: AI chatbots answer customer questions and provide


financial advice.

3. Retail and E-commerce:

Recommendations: AI suggests products to customers based on their


browsing and buying habits.

Inventory Management: AI predicts what products will be needed and


helps manage stock levels.

Customer Insights: AI analyzes shopping data to help businesses


understand customer preferences.

AI MId-1 1
4. Transportation:

Self-Driving Cars: AI allows cars to drive themselves by processing


sensor and camera data.

Traffic Management: AI helps optimize traffic flow and reduce


congestion.

Predictive Maintenance: AI predicts when vehicles need maintenance,


preventing breakdowns.

5. Education:

Personalized Learning: AI tailors educational content to fit each


student’s needs.

Automated Grading: AI grades assignments and tests, saving teachers


time.

Administrative Support: AI handles tasks like scheduling and


admissions, making schools run more smoothly.

6. Entertainment:

Content Creation: AI helps create music, art, and stories.

Gaming: AI develops intelligent characters and adapts games to the


player's style.

Streaming Services: AI recommends movies, shows, and music based


on user preferences.

7. Manufacturing:

Quality Control: AI checks products for defects.

Predictive Maintenance: AI predicts equipment failures, reducing


downtime.

Robotics: AI robots handle repetitive tasks, improving efficiency and


safety.

8. Agriculture:

Precision Farming: AI uses data to optimize planting, watering, and


harvesting.

Pest Detection: AI identifies pests and diseases in crops early.

AI MId-1 2
Automated Machinery: AI controls farming equipment, increasing
productivity.

9. Environmental Monitoring:

Climate Prediction: AI models predict weather changes and natural


disasters.

Wildlife Conservation: AI monitors animal populations and habitats.

Pollution Control: AI detects pollution sources and helps develop


reduction strategies.

10. Human Resources:

Recruitment: AI screens resumes and matches candidates to jobs.

Employee Engagement: AI analyzes feedback to improve workplace


satisfaction.

Performance Management: AI tracks employee performance for better


development and promotions.

AI's ability to efficiently handle complex tasks makes it a valuable tool in many
areas, leading to innovation and increased efficiency.

2 What are the different types of AI? List


its advantages and disadvantages.
Artificial Intelligence (AI) can be categorized into different types based on its
capabilities and functionalities. Here are the main types of AI, along with their
advantages and disadvantages:

1. Narrow AI (Weak AI):

Definition: AI systems designed to perform a specific task or a set of


related tasks.

Examples: Voice assistants like Siri and Alexa, recommendation


algorithms, and autonomous vehicles.

Advantages:

Highly efficient at performing specific tasks.

Can process and analyze data faster than humans.

AI MId-1 3
Reduces human error in repetitive or data-intensive tasks.

Can operate continuously without fatigue.

Disadvantages:

Limited to the specific tasks they are designed for.

Lack general intelligence or understanding beyond their narrow scope.

May require significant amounts of data to function effectively.

Vulnerable to biases present in the training data.

2. General AI (Strong AI):

Definition: Hypothetical AI systems that possess the ability to


understand, learn, and apply intelligence across a wide range of tasks,
similar to human cognitive abilities.

Examples: No existing examples, as General AI remains theoretical.

Advantages:

Potential to perform any intellectual task that a human can do.

Could solve complex, multi-disciplinary problems.

May adapt and improve over time without human intervention.

Disadvantages:

Currently, no practical implementations exist.

Ethical and safety concerns regarding autonomy and decision-making.

Development requires significant advancements in AI research and


technology.

Potential risk of unintended consequences if not properly controlled.

3. Artificial Superintelligence (ASI):

Definition: AI that surpasses human intelligence in all aspects, including


creativity, problem-solving, and emotional intelligence.

Examples: Entirely speculative and theoretical at this stage.

Advantages:

Could lead to unprecedented advancements in science, technology,


and various fields.

AI MId-1 4
Capable of solving complex global issues, such as climate change and
disease eradication.

Potential for improving human life quality significantly.

Disadvantages:

Extreme ethical and existential risks.

Control and alignment with human values and intentions would be


incredibly challenging.

Possibility of misuse or unintended negative consequences.

Concerns about the potential loss of human autonomy and relevance.

4. Reactive Machines:

Definition: AI systems that respond to specific stimuli with pre-defined


actions. They do not have memory or learn from past experiences.

Examples: IBM's Deep Blue chess-playing computer.

Advantages:

Reliable and consistent in performing tasks.

Simple to design and implement for specific applications.

Fast decision-making based on predefined rules.

Disadvantages:

Cannot adapt or improve based on new information.

Limited to the tasks they are programmed for.

Lack understanding and contextual awareness.

5. Limited Memory AI:

Definition: AI systems that can use past experiences to inform future


decisions within a limited scope.

Examples: Self-driving cars that use data from recent trips to make
driving decisions.

Advantages:

More adaptable than reactive machines.

Can improve performance over time with additional data.

AI MId-1 5
Suitable for tasks that require short-term learning.

Disadvantages:

Still limited compared to human learning and memory capabilities.

May struggle with tasks requiring long-term memory and


understanding.

Complexity and computational requirements increase with more data.

3 Explain various Uninformed (blind)


search strategies.
Uninformed search
Also called blind, exhaustive or brute-force search, uses no information about
the problem to guide the
search and therefore may not be very efficient.
Breadth-First Search (BFS) Explained Simply:

Breadth-First Search (BFS) is a method used to explore a problem's possible


solutions systematically. It starts at the root (initial state) and explores all
possible states at each level before moving on to the next level. Here's how it
works step-by-step:

Algorithm Steps:
1. Initialize: Start with a list called NODE-LIST containing the initial state.

2. Loop:
a. Remove the first state from NODE-LIST and call it E.
b. If NODE-LIST is empty, stop the process.
c. For each possible move from state E:
i. Apply the move to generate a new state.
ii. If this new state is the goal, stop and return the state.
iii. If not, add the new state to the end of NODE-LIST.

BFS Illustration:
1. Initial State:

Start with the root node A.

AI MId-1 6
FRINGE: [A]

2. Expand Node A:

Remove A, add its children B and C to the list.

FRINGE: [B, C]

3. Expand Node B:

Remove B, add its children D and E.

FRINGE: [C, D, E]

AI MId-1 7
4. Expand Node C:

Remove C, add its children D and G.

FRINGE: [D, E, D, G]

5. Expand Node D:

Remove D, add its children C and F.

FRINGE: [E, D, G, C, F]

AI MId-1 8
6. Expand Node E:

Remove E, no children to add.

FRINGE: [D, G, C, F]

1. Expand Node D:

Remove D, add its children B and F.

FRINGE: [G, C, F, B, F]

AI MId-1 9
1. Expand Node G:

Remove G, goal state found.

Return the path: A -> C -> G.

Key Points of BFS:


Simplicity: BFS is easy to understand and implement.

Completeness: If a solution exists, BFS will find it.

Optimality: BFS finds the shortest path to the goal if all moves cost the
same.

AI MId-1 10
Time Complexity: O(b^d), where b is the branching factor (maximum
number of children per node) and d is the depth of the shallowest goal.

Space Complexity: O(b^d), as it needs to store all nodes at the current


depth.

Advantages:
Shortest Path: BFS finds the shortest path to the goal.

Completeness: Guaranteed to find a solution if one exists.

Disadvantages:
Memory Usage: BFS requires a lot of memory as it needs to store all nodes
at the current depth, making it impractical for large search spaces.

Exponential Growth: The size of the tree grows exponentially with the
depth, making it infeasible for deep or large search spaces.

In summary, BFS is a reliable method for finding the shortest path in small
search spaces, but its high memory requirements limit its use in larger or
deeper search spaces.

Depth-First Search (DFS) Overview


Depth-First Search (DFS) is a search algorithm that explores as far as possible
along each branch before backtracking. This means it goes deep into the
search tree and only moves back when it can no longer go forward.

DFS Algorithm
1. Initialize:

Create a variable called NODE-LIST and set it to the initial state.

2. Loop:

Until a goal state is found or NODE-LIST is empty:


a. Remove the first element from NODE-LIST and call it E. If NODE-LIST
is empty, quit.
b. For each way that each rule can match the state described in E:
i. Apply the rule to generate a new state.

AI MId-1 11
ii. If the new state is a goal state, quit and return this state.
iii. Otherwise, add the new state to the front of NODE-LIST.

DFS Example
Consider a tree where we need to find a goal node G starting from node A.
Here's how DFS would work:

AI MId-1 12
AI MId-1 13
4 Give an overview of different kinds of
agent programs.
Agent
An agent is something that can sense its environment and take actions based
on that information.

A human agent uses eyes, ears, and other organs to sense the environment
and hands, legs, mouth, and other body parts to act upon it.

A robotic agent might use cameras and infrared range finders to sense the
environment and motors to perform actions.

A software agent can receive inputs such as keystrokes, file contents, and
network packets and act on the environment by displaying information on
the screen, writing files, or sending network packets.

In artificial intelligence, an agent is an entity that perceives its environment


through sensors and acts upon that environment through actuators. Different
kinds of agent programs dictate how these agents decide their actions based
on their perceptions. Here is an overview of various types of agent programs:

1. Simple Reflex Agents:

Description: These agents select actions based solely on the current


percept, ignoring the rest of the percept history.

AI MId-1 14
How It Works: They use condition-action rules (if-then statements) to
determine actions. For instance, "if the sensor detects an obstacle, then
turn left."

2. Model-Based Reflex Agents:

Description: These agents maintain an internal state to track aspects of


the world that are not immediately observable.

How It Works: They use a model of the world to update their internal
state and use it, along with the current percept, to make decisions.

3. Goal-Based Agents:

Description: These agents act to achieve specific goals. They consider


the future consequences of their actions.

How It Works: They use goal information to decide actions by


searching through possible future states to find a path to the goal.

4. Utility-Based Agents:

Description: These agents choose actions based on a utility function


that measures how desirable a state is.

How It Works: They evaluate and compare the utility of different states
resulting from various actions, selecting the one that maximizes the
utility.

5. Learning Agents:

Description: These agents improve their performance over time by


learning from experiences.

How It Works: They typically consist of four components: a learning


element (makes improvements), a performance element (makes
decisions), a critic (provides feedback), and a problem generator
(explores new actions).

AI MId-1 15
Summary of Agent Types:
Simple Reflex Agents: Quick decisions based on current percepts; limited
to simple, static environments.

Model-Based Reflex Agents: Use internal state to handle partially


observable environments.

Goal-Based Agents: Use goal information for planning; suitable for


complex decision-making.

Utility-Based Agents: Optimize actions based on a utility function; manage


trade-offs and multiple outcomes.

Learning Agents: Improve over time with experience; adaptable to


changing environments.

Each type of agent program is suited to different kinds of environments and


problems, ranging from simple and static to complex and dynamic. The choice
of agent depends on the specific requirements and constraints of the task at
hand.

5 What is state space tree? Explain with


an example.
State space search is a problem-solving technique used in Artificial
Intelligence (AI) to find the solution path from the initial state to the goal state
by exploring the various states. The state space search approach searches
through all possible states of a problem to find a solution. It is an essential part
of Artificial Intelligence and is used in various applications, from game-playing
algorithms to natural language processing.

Steps in State Space Search


The steps involved in state space search are as follows

AI MId-1 16
Example: 8-queens problem

1. Initial State: Any arrangement of 0 to 8 queens on board.

2. Operators: add a queen to any square.

3. Goal Test: 8 queens on board, none attacked.

AI MId-1 17
4. Path cost: not applicable or Zero (because only the final state counts,
search cost might
be of interest).

6 Discuss the characteristics of AI


problem. Can Towers of Hanoi problem be
considered as AI
problem? Justify your answer with
suitable discussions.

Characteristics of AI Problems:
1. Clear Problem Definition:

Initial State: Where you start solving the problem.

Goal State: The end goal you want to achieve.

State Space: All possible situations you can be in while solving the
problem.

Operators: Actions you can take to move from one state to another.

2. Solvability:

There must be a way to solve the problem, meaning there should be a


series of actions that lead from the initial state to the goal state.

3. Complexity:

The problem might have many possible states or complicated


sequences of actions, making it challenging to solve.

4. Optimality:

The solution should not just be any solution but the best one in terms of
cost, time, or resources used.

5. Uncertainty:

Some AI problems involve uncertainty where the outcome of an action


isn't always predictable, requiring the agent to deal with probabilistic

AI MId-1 18
results.

6. Partial Observability:

The agent might not have complete information about the current
situation or state, making it harder to make decisions.

7. Dynamic Environment:

The environment might change on its own, so the agent needs to adapt
to new information or situations.

Example: Towers of Hanoi Problem

The Towers of Hanoi problem involves moving a set of disks from one peg to
another, following specific rules.

1. Clear Problem Definition:

Initial State: All disks are stacked on the first peg.

Goal State: All disks are moved to the third peg in the same order.

State Space: All possible configurations of disks on the pegs.

Operators: Moving a disk from one peg to another.

2. Solvability:

AI MId-1 19
The problem is always solvable, as there is a known method to move
the disks correctly.

3. Complexity:

The number of possible states and moves increases exponentially with


the number of disks, making the problem harder as more disks are
added.

4. Optimality:

The best solution uses the minimum number of moves, which is \(2^n -
1\) for \(n\) disks.

5. Uncertainty:

This problem has no uncertainty; every move has a predictable


outcome.

6. Partial Observability:

The agent has complete information about the current state of the pegs
and disks at all times.

7. Dynamic Environment:

The environment does not change on its own; it only changes when the
agent makes a move.

Conclusion
The Towers of Hanoi problem can be considered an AI problem because it
involves a clear initial state, goal state, and operators, and it requires
systematic exploration and optimization to solve. It does not involve uncertainty
or partial observability, making it a straightforward example of an AI problem
that focuses on search and optimization.

7 Discuss in detail about the A* algorithm,


using a suitable example
A* Algorithm-

AI MId-1 20
A* Algorithm is one of the best and popular techniques used for path
finding and graph traversals.

A lot of games and web-based maps use this algorithm for finding the
shortest path efficiently.

It is essentially a best first search algorithm.

Working-
A* Algorithm works as-

It maintains a tree of paths originating at the start node.

It extends those paths one edge at a time.

It continues until its termination criterion is satisfied.

A* Algorithm extends the path that minimizes the following function-

f(n) = g(n) + h(n)


Here,

‘n’ is the last node on the path

g(n) is the cost of the path from start node to node ‘n’

h(n) is a heuristic function that estimates cost of the cheapest path from
node ‘n’ to the goal node

Algorithm-
The implementation of A* Algorithm involves maintaining two lists- OPEN
and CLOSED.

OPEN contains those nodes that have been evaluated by the heuristic
function but have not been expanded into successors yet.

CLOSED contains those nodes that have already been visited.

example problem
Consider the following graph-

AI MId-1 21
The numbers written on edges represent the distance between the nodes.
The numbers written on nodes represent the heuristic value.

Find the most cost-effective path to reach from start state A to final state J
using A* Algorithm

Solution-
Step-01:
We start with node A.

Node B and Node F can be reached from node A.

A* Algorithm calculates f(B) and f(F).

f(B) = 6 + 8 = 14

f(F) = 3 + 6 = 9

Since f(F) < f(B), so it decides to go to node F.


Path- A → F

AI MId-1 22
Step-02:
Node G and Node H can be reached from node F.
A* Algorithm calculates f(G) and f(H).

f(G) = (3+1) + 5 = 9

f(H) = (3+7) + 3 = 13

Since f(G) < f(H), so it decides to go to node G.

Path- A → F → G

Step-03:
Node I can be reached from node G.

A* Algorithm calculates f(I).


f(I) = (3+1+3) + 1 = 8
It decides to go to node I.
Path- A → F → G → I

Step-04:
Node E, Node H and Node J can be reached from node I.
A* Algorithm calculates f(E), f(H) and f(J).

f(E) = (3+1+3+5) + 3 = 15

f(H) = (3+1+3+2) + 3 = 12

f(J) = (3+1+3+3) + 0 = 10

Since f(J) is least, so it decides to go to node J.


Path- A → F → G → I → J
This is the required shortest path from node A to node J

AI MId-1 23
Important Note-
It is important to note that-

A* Algorithm is one of the best path finding algorithms.

But it does not produce the shortest path always.

This is because it heavily depends on heuristics.

To gain better understanding about A* Search Algorithm

AI MId-1 24

You might also like