Unit 1
1. *Different types of agents and Rational agent:*
- Agents in AI can be classified into Simple Reflex Agents, Model-Based Reflex Agents,
Goal-Based Agents, Utility-Based Agents, and Learning Agents. A Rational Agent acts to
achieve the best possible outcome based on its knowledge and the expected outcome of
actions. It operates with the goal of maximizing its performance measure, considering its
environment and constraints.
2. *Example of a real-world and toy problem:*
- A real-world problem could be navigating a robot through a warehouse to pick up and
deliver items. A toy problem, on the other hand, might involve solving a puzzle like the 8-
puzzle, where the goal is to move tiles to achieve a specific configuration.
3. *Four components to define a problem:*
- The four essential components to define a problem are:
1. *Initial State*: The state from which the problem begins.
2. *Goal State*: The desired outcome or solution.
3. *Actions*: The set of possible actions or operators that can be applied.
4. *Path Cost*: The cost associated with each path, which helps in finding the optimal
solution.
4. *Problem-solving agent:*
- A problem-solving agent is designed to solve specific problems by searching through a
state space. It involves formulating the problem, searching for a solution, and then executing
the solution found. These agents are often goal-based and use various search algorithms to
find the optimal solution.
5. *Real formulation and problem formulation:*
- Real formulation involves describing a problem as it exists in the real world, including all
constraints and variables. Problem formulation, on the other hand, is the process of
translating the real-world problem into a format that can be processed by an AI system,
typically involving states, actions, and goals.
6. *Evaluate performance of problem-solving method based on BFS algorithm:*
- The performance of BFS (Breadth-First Search) can be evaluated based on criteria like
completeness (BFS is complete if the branching factor is finite), time complexity (O(b^d),
where b is the branching factor and d is the depth of the shallowest goal), space complexity
(also O(b^d)), and optimality (BFS is optimal if all step costs are equal).
7. *List some uninformed search techniques:*
- Uninformed search techniques include Breadth-First Search (BFS), Depth-First Search
(DFS), Uniform-Cost Search, Depth-Limited Search, and Iterative Deepening Search. These
algorithms do not have additional information about the problem other than what is provided
in the problem definition.
8. *Reason why hill climbing often gets stuck:*
- Hill climbing often gets stuck in local maxima, plateaus, or ridges. Local maxima occur
when the algorithm reaches a peak that is lower than the highest peak (global maximum).
Plateaus are flat areas where the search might get stuck because no upward moves are
available. Ridges are high areas that require the algorithm to move away from the peak to
eventually get to a higher point.
9. *What is Local Maxima with respect to search techniques:*
- Local maxima are points in the search space where the objective function has a higher
value than neighboring states but is not the highest possible value (global maximum). This
can cause search algorithms like hill climbing to terminate prematurely, thinking it has found
the best solution when better solutions exist elsewhere in the search space.
10. *Difference between Blind and Heuristic Search:*
- Blind search strategies, such as BFS and DFS, do not use any domain-specific knowledge
to guide their search; they explore the search space systematically. Heuristic search, on the
other hand, uses heuristic functions that estimate the cost to reach the goal from a given state,
guiding the search more efficiently towards the solution.
11. *CSP (Constraint Satisfaction Problem):*
- A CSP involves variables, domains for each variable, and constraints that specify
allowable combinations of values. The goal is to assign values to variables such that all
constraints are satisfied. Common algorithms for solving CSPs include backtracking, forward
checking, and constraint propagation.
12. *List heuristic search techniques:*
- Heuristic search techniques include A* Search, Greedy Best-First Search, Hill Climbing,
Simulated Annealing, and Genetic Algorithms. These techniques use heuristics to estimate
the best possible move at each step, aiming to reduce the overall search effort.
13. *Applications of AI:*
- AI is applied in various fields such as Natural Language Processing (e.g., chatbots),
Computer Vision (e.g., image recognition), Robotics (e.g., autonomous vehicles), Expert
Systems (e.g., medical diagnosis), and Game Playing (e.g., chess algorithms). AI also plays a
critical role in data analysis, decision-making, and automation.
Unit 2
1. *Calculate P(B|A):*
- Given:
- P(A) = 0.3
- P(A|B) = 0.4
- P(B) = 0.5
- We can use Bayes' Theorem: \( P(B|A) = \frac{P(A|B) \times P(B)}{P(A)} = \frac{0.4
\times 0.5}{0.3} = \frac{0.2}{0.3} = \frac{2}{3} \approx 0.6667 \).
2. *Bayes' Theorem definition:*
- Bayes' Theorem describes the probability of an event, based on prior knowledge of
conditions that might be related to the event. The formula is:
\[
P(A|B) = \frac{P(B|A) \times P(A)}{P(B)}
\]
- It is used to update the probability estimate for a hypothesis as more evidence or
information becomes available.
3. *Example, Mathematics exam 70%, 40%:*
- Suppose 70% of students pass the mathematics exam, and out of those, 40% also pass the
science exam. If we know a student passed the science exam, Bayes’ Theorem can be used to
calculate the probability that the student also passed the mathematics exam, provided we
know the overall pass rates.
4. *Naive Bayes Model:*
- The Naive Bayes Model is a classification technique based on Bayes' Theorem with the
assumption of independence between every pair of features. Despite this strong assumption, it
performs well in many real-world situations, particularly in text classification and spam
filtering.
5. *Probabilistic reasoning:*
- Probabilistic reasoning involves making inferences and decisions under uncertainty using
the principles of probability theory. It is used in areas like decision-making, predicting
outcomes, and reasoning in situations where information is incomplete or uncertain.