0% found this document useful (0 votes)
39 views25 pages

DMI College of Engineering: Course Code/Course Name: AL3391/ ARTIFICIAL INTELLIGENCE

Uploaded by

sushmitaa9193
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)
39 views25 pages

DMI College of Engineering: Course Code/Course Name: AL3391/ ARTIFICIAL INTELLIGENCE

Uploaded by

sushmitaa9193
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/ 25

DMI College of Engineering

Course Code/Course Name: AL3391/ ARTIFICIAL INTELLIGENCE

UNIT I INTELLIGENT AGENTS

Introduction to AI – Agents and Environments – Concept of rationality – Nature of


environments Structure of agents. Problem solving agents – search algorithms – uninformed
search strategies.

PART-A (2 Marks)
1. Define Artificial intelligence.
"It is a branch of computer science by which we can create intelligent
machines whichcan behave like a human, think like humans, and able to
make decisions."

2. Define Rationality.
Rationality is nothing but status of being reasonable, sensible, and
having goodsense of judgment.
Rationality is concerned with expected actions and results depending
upon whatthe agent has perceived.
Performing actions with the aim of obtaining useful information is
an importantpart of rationality.

3. List out the types of uninformed search Algorithm.


o Breadth-first search
o Uniform cost search
o Depth-first search
o Iterative deepening depth-first search
o Bidirectional Search

4. Define Agent.
In artificial intelligence, 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.

5. Define utility-based agents


A utility-based agent is an agent that acts based not only on what the goal is, but
the best way to reach that goal.
6. Define payoff?
Payoff function is used for modeling human behavior. Payoff function for a player
is a mapping from the cross-product of players strategy spaces to the players set
of payoffs.

7. Write advantages and disadvantages of AI.


Following are some main advantages of Artificial Intelligence:
• High Accuracy with less errors: AI machines or systems are prone
to less errors and high accuracy as it takes decisions as per pre-
experience or information.
• High-Speed: AI systems can be of very high-speed and fast-decision
making, because of that AI systems can beat a chess champion in the
Chess game.
• High reliability: AI machines are highly reliable and can perform
the same action multiple times with high accuracy.
• Useful for risky areas: AI machines can be helpful in situations
such as defusing a bomb, exploring the ocean floor, where to employ
a human can be risky.
• Digital Assistant: AI can be very useful to provide digital assistant
to the users such as AI technology is currently used by various E-
commerce websites to show the products as per customer
requirement.
• Useful as a public utility: AI can be very useful for public utilities
such as a self-driving car which can make our journey safer and
hassle-free, facial recognition for security purpose, Natural language
processing to communicate with the human in human-language, etc.

Following are the disadvantages of AI:


• High Cost: The hardware and software requirement of AI is very
costly as it requires lots of maintenance to meet current world
requirements.
• Can't think out of the box: Even we are making smarter machines
with AI, but still they cannot work out of the box, as the robot will
only do that work for which they are trained, or programmed.
• No feelings and emotions: AI machines can be an outstanding
performer, but still it does not have the feeling so it cannot make any
kind of emotional attachment with human, and may sometime be
harmful for users if the proper care is not taken.
• Increase dependency on machines: With the increment of
technology, people are getting more dependent on devices and hence
they are losing their mental capabilities.

8. List out agent terminologies.


• Performance Measure of Agent − It is the criteria, which
determines howsuccessful an agent is.
• Behavior of Agent − It is the action that agent performs after any
given sequenceof 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.

9. Define Rational agent.

A rational agent is an artificial intelligence (AI) component. It applies AI to different


real-world problems. As such, it chooses an action from a set of distinct options. It
has models that allow it to deal with unexpected variables and always selects the
best possible outcome from all the available options.

The term “rational agent,” however, is not only applied to a system. It can also
refer to a person, a company, or an application, practically anything or anyone that
makes rational decisions.

10. What is meant by informed search algorithm.


The algorithms of an informed search contain information regarding the
goal state. It helps an AI make more efficient and accurate searches. A function
obtains this data/info to estimate the closeness of a state to its goal in the system.
For example, Graph Search and Greedy Search.

11. Define DFS.


Depth-first search (DFS) is an algorithm for traversing or searching tree or graph
data structures. The algorithm starts at the root node (selecting some arbitrary
node as the root node in the case of a graph) and explores as far as possible along
each branch before backtracking.
12. Define BFS.
BFS, or Breadth-First Search, is a node method for obtaining the graph's shortest
path. It makes use of a queue data structure with FIFO (first in, first out) ordering.

PART-B (13 Marks)


1. Explain with example about Bidirectional search Algorithm.
2. Explain detail about structure and nature of environments.
3. Explain structure of Intelligent agents in detail.
4. Explain detail about BFS search algorithm
5. Explain detail about DFS search algorithm.
6. Explain detail about properties of agent Environments.

PART-C (15 Marks)


1. Explain details about any two uninformed search algorithm with an example.
2. Write about Rational agents with Real time example in AI.
3. Analyze performace of Blind search and its types in detail.

UNIT II PROBLEM SOLVING


Heuristic search strategies – Heuristic functions. Local search and optimization problems –
local search in continuous space – search with non-deterministic actions – search in partially
observable environments – online search agents and unknown environments.
PART-A (2 Marks)
1. What is heuristic functions?
✓ Heuristics function: Heuristic is a function which is used in
Informed Search, andit finds the most promising path.
✓ It takes the current state of the agent as its input and produces
the estimation ofhow close agent is from the goal.
✓ The heuristic method, however, might not always give the best
solution, but itguaranteed to find a good solution in reasonable
time.
✓ Heuristic function estimates how close a state is to the goal.
✓ It is represented by h(n), and it calculates the cost of an optimal path
between thepair of states. The value of the heuristic function is
always positive.
✓ Admissibility of the heuristic
function is given as:h(n) <=
h*(n)
✓ Here h(n) is heuristic cost, and h*(n) is the estimated cost. Hence
heuristic costshould be less than or equal to the estimated cost.

2. Define greedy search.


✓ Greedy best-first search algorithm always selects the path which
appears best atthat 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, i.e.
f(n)= g(n).
Where, h(n)= estimated cost from node n to the goal.
The greedy best first algorithm is implemented by the priority queue.

3. What is A*search.
✓ 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).
In A* search algorithm, we use search heuristic as well as the cost to reach the
node. Hence we
4. Write a advantages and disadvantages of A* search.

Advantages:
• A* search algorithm is the best algorithm than other search algorithms.
• A* search algorithm is optimal and complete.
• This algorithm can solve very complex problems.

Disadvantages:
• It does not always produce the shortest path as it mostly based
on heuristics andapproximation.
• A* search algorithm has some complexity issues.
• The main drawback of A* is memory requirement as it
keeps all generatednodes in the memory, so it is not practical
for various large-scale problems.

5. Write a advantages and disadvantages of greedy search.


The main advantage of the greedy method is that it is relatively easy to
implement and understand. However, there are some disadvantages to using this
method. First, the greedy method is not guaranteed to find the best solution.
Second, it can be quite slow.

6. Define pure heuristic search


✓ Pure heuristic search is the simplest form of heuristic search algorithms.
✓ It expands nodes based on their heuristic value h(n). It maintains two
lists, OPEN and CLOSED list. In the CLOSED list, it places those
nodes which have already expanded and in the OPEN list, it places
nodes which have yet not been expanded.
✓ On each iteration, each node n with the lowest heuristic value is
expanded and generates all its successors and n is placed to the
closed list.
✓ The algorithm continues unit a goal state is found.
✓ In the informed search we will discuss two main algorithms which
are given below:
• Best First Search Algorithm(Greedy search)
• A* Search Algorithm

7. Write a properties of heuristic search algorithm.


Use of heuristic function in a heuristic search algorithm leads to
following propertiesof a heuristic search algorithm:
• Admissible Condition: An algorithm is said to be admissible,
if it returns anoptimal solution.
• Completeness: An algorithm is said to be complete, if it
terminates with asolution (if the solution exists).
• Dominance Property: If there are two admissible
heuristic algorithms A1 and A2 having h1 and h2 heuristic
functions, then A1 is said to dominate A2 if h1 is better than h2
for all the values of node n.
• Optimality Property: If an algorithm is complete,
admissible, and dominating other algorithms, it will be the best
one and will definitely give an optimal solution.

8. Define hill climbing algorithm.


• Hill climbing algorithm is a local search algorithm which
continuously moves in the direction of increasing elevation/value to
find the peak of the mountain or best solution to the problem.
• It terminates when it reaches a peak value where no neighbor has a higher
value.
• Hill climbing algorithm is a technique which is used for optimizing
the mathematical problems. One of the widely discussed examples of
Hill climbing algorithm is Traveling-salesman Problem in which we
need to minimize the distance traveled by the salesman.
• It is also called greedy local search as it only looks to its good
immediate neighbor state and not beyond that.
• A node of hill climbing algorithm has two components which are state and
value.
• Hill Climbing is mostly used when a good heuristic is available.
• In this algorithm, we don't need to maintain and handle the search
tree or graph asit only keeps a single current state.

9. List out the features of hill climbing.


Following are some main features of Hill Climbing Algorithm:
• Generate and Test variant: Hill Climbing is the variant of
Generate and Test method. The Generate and Test method
produce feedback which helps to decide which direction to
move in the search space.
• Greedy approach: Hill-climbing algorithm search moves in the
direction which optimizes the cost.
• No backtracking: It does not backtrack the search space, as it
does not remember the previous states.

10. List out types of hill climbing algorithm.


• Simple hill Climbing:
• Steepest-Ascent hill-climbing:
• Stochastic hill Climbing:

11. Define online search Agent.


✓ After each action, an online agent receives a percept telling it what
state it has reached; from this information, it can augment its map of
the environment.
✓ The current map is used to decide where to go next.
✓ This interleaving of planning and action means that online search
algorithms are quite different from the offline search algorithms we
have seen previously.
✓ For example, offline algorithms such as A can expand a node in one
part of the space and then immediately expand a node in another
part of the space, because node expansion involves simulated rather
than real actions.
✓ An online algorithm, on the other hand, can discover successors
only for a node that it physically occupies.
✓ To avoid traveling all the way across the tree to expand the next
node, it seems better to expand nodes in a local order.
✓ Depth-first search has exactly this property because (except when
backtracking) the next node expanded is a child of the previous node
expanded.

12. What is Genetic algorithm?


A genetic algorithm (GA) is a heuristic search algorithm used to solve search
and optimization problems. This algorithm is a subset of evolutionary
algorithms, which are used in computation. Genetic algorithms employ the
concept of genetics and natural selection to provide solutions to problems.

PART-B (13 Marks)


1. Explain details about greedy search algorithm in detail.
2. Explain detail about A*search algorithm with an example.

3. Explain detail about Heuristic functions in detail.

4. Explain detail about Hill Climbing Algorithm with an


example.

5. Explain detail about Steepest-Ascent hill climbing and


stochastic hill climbing algorithm.

6. Explain detail about Online search Agent with an example.

PART-C (15 Marks)

1. How the searching algorithm works in Non Deterministic Actions. Also explain
how the AND-OR trees are involved in Non Deterministic Actions.

2. Analyze Online search problem in detail with an example


3. Write brief about following local search algorithms:
(i)Simulated annealing
(ii) Local beam search

UNIT III GAME PLAYING AND CSP


Game theory – optimal decisions in games – Alpha-beta search – Monte-carlo tree search –
Stochastic games – partially observable games. Constraint satisfaction problems – constraint
propagation backtracking search for CSP – local search for CSP – structure of CSP.
PART-A (2 Marks)
1. Define game theory.
Game : Any set of circumstances that has a result dependent on
the actions of two or moredecision-makers (players)

• Players : A strategic decision-maker within the context of the game


• Strategy: A complete plan of action a player will take given the set of
circumstances that might arise within the game
• Payoff : The payout a player receives from arriving at a particular
outcome (The payout can be in any quantifiable form, from
dollars to utility.)

✓ We first consider games with two players, whom we call MAX and
MIN for reasons that will soon become obvious.
✓ MAX moves first, and then they take turns moving until the game is over.
✓ At the end of the game, points are awarded to the winning player and
penalties are givento the loser.

2. List out the types of games in AI.


• Perfect information: A game with the perfect information is
that in which agents can look into the complete board. Agents
have all the information about the game, and they can see each
other moves also. Examples are Chess, Checkers, Go, etc.

• Imperfect information: If in a game agents do not have all


information about the game and not aware with what's going on,
such type of games are called the game with imperfect
information, such as tic-tac-toe, Battleship, blind, Bridge, etc.

• Deterministic games: Deterministic games are those games


which follow a strict pattern and set of rules for the games, and
there is no randomness associated with them. Examples are
chess, Checkers, Go, tic-tac-toe, etc.

• Non-deterministic games: Non-deterministic are those games


which have various unpredictable events and has a factor of
chance or luck. This factor of chance or luck is introduced by
either dice or cards. These are random, and each action response
is not fixed. Such games are also called as stochastic games.
Example: Backgammon, Monopoly, Poker, etc.

3. Write a applications of game theory.


The game theory is widely applied to study human as well as animal
behaviors. It is utilized in economics to understand the economic
behaviors, such as behaviors of consumers, markets and firms. Game
theory has been commonly used in social sciences as well. It is applied
in the study of sociological, political and psychological behaviors. The use
of analysis based on game theory is seen in biology too. In addition to
behavioral prediction, game theory utilized in the development of
theories of normative or ethical behavior.

✓ The following are just a few examples of game theory applications:


• Stock trades and the investors’ reactions and decisions against
stock market developments and the behaviors and decisions of
other investors
• OPEC member countries’ decision to change the amount of oil
extraction and sale andtheir compliance or non-compliance with
quota arrangements
• Corporate behavior regarding product pricing in monopoly or
multilateral competition markets
• Animal interaction with one another in social life (hunting or
sharing achievements orsupporting each other)

4. List out the elements of game theory.


✓ A game can be defined as a type of search in AI which can
be formalized of thefollowing elements:
• Initial state: It specifies how the game is set up at the start.
• Player(s): It specifies which player has moved in the state space.
• Action(s): It returns the set of legal moves in state space.
• Result(s, a): It is the transition model, which specifies the result
of moves in the statespace.
• Terminal-Test(s): Terminal test is true if the game is over, else it
is false at any case. The state where the game ends is called
terminal states.
• Utility(s, p): A utility function gives the final numeric value for
a game that ends in terminal states s for player p. It is also called
payoff function. For Chess, the outcomes are a win, loss, or draw
and its payoff values are +1, 0, ½. And for tic-tac- toe, utility
values are +1, -1, and 0.

5. What is maximizer and minimizer.


The two participants in Minimax are referred to as the maximizer and
minimizer. The maximizer strives to achieve the maximum score, whereas the
minimizer seeks to achieve the lowest score. A value accompanies each board
state.
6. What is Tic -Tac -To.
• Mini-max algorithm is a recursive or backtracking algorithm
which is used indecision-making and game theory.
• It provides an optimal move for the player assuming that
opponent is also playingoptimally.
• Mini-Max algorithm uses recursion to search through the game-tree.
• Min-Max algorithm is mostly used for game playing in AI.
• Such as Chess, Checkers, tic-tac-toe, go, and various tow-players game.
• This Algorithm computes the minimax decision for the current state.

7. What is Alpha-Beta pruning.


✓ Alpha-beta pruning is a modified version of the minimax algorithm.
✓ It is an optimization technique for the minimax algorithm.
✓ As we have seen in the minimax search algorithm that the
number of game statesit has to examine are exponential in depth
of the tree.
✓ There is a technique by which without checking each node of the
game tree wecan compute the correct minimax decision, and
this technique is called pruning.
✓ This involves two threshold parameter Alpha and beta for
future expansion, so itis called alpha-beta pruning.
✓ It is also called as Alpha-Beta Algorithm.
✓ Alpha-beta pruning can be applied at any depth of a tree, and
sometimes it notonly prune the tree leaves but also entire sub-
tree.

8. Define Monte Carlo Tree Search algorithm.


✓ The Games like Tic-Tac-Toe, Rubik’s Cube, Sudoku, Chess, Go
and many others have common property that lead to exponential
increase in the number of possible actions thatcan be played.
✓ These possible steps increase exponentially as the game goes forward.
✓ Ideally if you can predict every possible move and its result that may occur in
the future.
✓ You can increase your chance of winning.
✓ But since the moves increase exponentially — the computation
power that is required to calculate the moves also goes through the
roof.
✓ Monte Carlo Tree Search is a method usually used in games to
predict the path (moves) that should be taken by the policy to reach the
final winning solution

9. Write a advantages and disadvantages of Monte Carlo search algorithm.


Advantages of Monte Carlo Tree Search:

1. MCTS is a simple algorithm to implement.


2. Monte Carlo Tree Search is a heuristic algorithm. MCTS can operate
effectively without any knowledge in the particular domain, apart
from the rules and end conditions, and can find its own moves and
learn from them by playing random playouts.
3. The MCTS can be saved in any intermediate state and that state
can be used in futureuse cases whenever required.
4. MCTS supports asymmetric expansion of the search tree based on
the circumstances in which it is operating.

Disadvantages of Monte Carlo Tree Search:

1. As the tree growth becomes rapid after a few iterations, it requires


a huge amount ofmemory.
2. There is a bit of a reliability issue with Monte Carlo Tree Search.
In certain scenarios, there might be a single branch or path, that
might lead to loss against the opposition
when implemented for those turn-based games. This is mainly due
to the vast amount ofcombinations and each of the nodes might not
be visited enough number of times to understand its result or
outcome in the long run.

3. MCTS algorithm needs a huge number of iterations to be able to


effectively decide the most efficient path. So, there is a bit of a speed
issue there.

10. Define stochastic games.


✓ In real life, many unpredictable external events can put us
into unforeseensituations.
✓ Many games mirror this unpredictability by including a random
element, such asthe throwing of dice.
✓ We call these stochastic games.
✓ Backgammon is a typical game that combines luck and skill.

✓ Dice are rolled at the beginning of a player’s turn to determine the legal
moves.

11. Define card games.


Card games provide many examples of stochastic partial
observability, where the missing information is generated randomly.
For example, in many games, cards are dealt randomly at the
beginning of the game, with each player receiving a hand that is not
visible to the other players. Such games include bridge, whist, hearts,
and some forms of poker.

At first sight, it might seem that these card games are just like dice
games: the cards are dealt randomly and determine the moves
available to each player, but all the “dice” are rolled at the
beginning! Even though this analogy turns out to be incorrect, it
suggests an effective algorithm: consider all possible deals of the
invisible cards; solve each one as if it were a fully observable
game; and then choose the move that has the best outcome
averaged over all the deals. Suppose that each deal s occurs with
probability P(s); then the move we want is

12. Define constraint satisfaction problem.


Constraint satisfaction is a technique where a problem is solved
when its values satisfy certain constraints or rules of the problem.
Such type of technique leads to a deeper understanding of the
problem structure as well as its complexity.

13. List out types domains in CSP.


There are following two types of domains which are used by the
variables :
• Discrete Domain: It is an infinite domain which can have
one state for multiple variables. For example, a start state
can be allocated infinite times for each variable.
• Finite Domain: It is a finite domain which can have
continuous states describing one domain for one specific
variable. It is also called a continuous domain.

14. Define backtracking search.


A backtracking search algorithm performs a depth-first traversal of a search
tree, where the branches out of a node represent alternative choices that may
have to be examined in order to find a solution, and the constraints are used to
prune subtrees containing no solutions.

PART-B (13 Marks)


1. Explain detail about Tic-Tac- Toe game tree with an
example.
2. Explain detail about game theory and its
applications.
3. Explain detail about MINIMAX algorithm.

4. Explain detail about alpha-beta search algorithm.

5. Explain detail about Monte Carlo tree search


algorithm.
6. Explain detail about constraint satisfaction
problem(CSP).
7. Explain detail about constraint propagation.

PART-C (15 Marks)

1. Analyze the MINIMAX algorithm in game theory.


2. Explain detail about Monte Carlo Tree search
algorithm .

3. Write a backtracking algorithm for CSPS.

4. Analyze the partially observable games in AI.

UNIT IV LOGICAL REASONING


Knowledge-based agents – propositional logic – propositional theorem proving –
propositional model checking – agents based on propositional logic. First-order
logic – syntax and semantics Knowledge representation and engineering –
inferences in first-order logic – Forward chaining Backward chaining –
resolution.

PART-A (2 Marks)
1. Define reasoning.
✓ The reasoning is the mental process of deriving logical conclusion
and making predictions from available knowledge, facts, and beliefs.
Or we can say, "Reasoning is a way to infer facts from existing
data."
✓ It is a general process of thinking rationally, to find valid conclusions.
✓ In artificial intelligence, the reasoning is essential so that the machine
can also think rationally as a human brain, and can perform like a
human.
✓ When a system is required to do something, that it has not been
explicitly told how to do,, it must figure out what it needs to know
from what it already knows.
Fact 1 : Robins are Birds
Fact 2 : All birds have wings
Question : Do Robins have wings?

✓ Hence Reasoning system, must find out, what it needs to


know from what italready knows.
✓ Logic is a language of reasoning. It is a collection of rules called
logic arguments,we use when doing logic reasoning.
✓ Logical Reasoning is a process of drawing conclusions from premises
using rule ofinference.

2. Draw an architecture of knowledge based agents.

The architecture of knowledge-based agent:

✓ The above diagram is representing a generalized architecture for a


knowledge-based agent.
✓ The knowledge-based agent (KBA) take input from the environment
by perceivingthe environment.
✓ The input is taken by the inference engine of the agent and
which alsocommunicate with KB to decide as per the knowledge
store in KB.
✓ The learning element of KBA regularly updates the KB by
learning newknowledge.

3. Define knowledge based agents.


o An intelligent agent needs knowledge about the real world for
taking decisions and reasoning to act efficiently.
o Knowledge-based agents are those agents who have the capability of
maintaining an internal state of knowledge, reason over that
knowledge, update their knowledge after observations and
take actions. These agents can represent the world with some
formal representation and act intelligently.
o Knowledge-based agents are composed of two main parts:
o Knowledge-base and
o Inference system.

4. What are the operations performed by KBA.


Following are three operations which are performed by KBA in order
to show theintelligent behavior:
1. TELL: This operation tells the knowledge base what it perceives
from theenvironment.
2. ASK: This operation asks the knowledge base what action it should
perform.
3. Perform: It performs the selected action.

5. What is propositional logic. Give an example?


✓ Propositional logic (PL) is the simplest form of logic where all the
statements aremade by propositions.
✓ A proposition is a declarative statement which is either true or false.
✓ It is a technique of knowledge representation in logical and mathematical
form

Example:
a) It is Sunday.
b) The Sun rises from West (False proposition)
c) 3+3= 7(False proposition)
d) 5 is a prime number.
6. Define Davis-Putnam algorithm.
The Davis–Putnam algorithm was developed by Martin Davis and Hilary Putnam
for checking the validity of a first-order logic formula using a resolution-based
decision procedure for propositional logic.

7. Define hybrid agent.


A Hybrid Agent is a new kind of real estate professional that utilizes artificial
intelligence to automate, digitize and increase daily production and income.

8. Define first order logic.


✓ First-order logic is symbolized reasoning in which each sentence,
or statement, isbroken down into a subject and a predicate.
✓ First-order logic can be useful in the creation of computer
programs. It is also ofinterest to researchers in artificial
intelligence.

9. Define syntax and sematics.


The syntax and semantics of first-order (FO) logic allow us to explicitly represent
objects and relationships among object, which provides us with much more
representational power than the propositional case

10. Define inferences.


✓ Inference in First-Order Logic is used to deduce new facts or
sentences fromexisting sentences.
✓ Before understanding the FOL inference rule, let's understand some
basicterminologies used in FOL.

11. Define forward chaining


Forward chaining is a method of reasoning in artificial intelligence in
which inference rules are applied to existing data to extract additional
data until an endpoint (goal) is achieved.

In this type of chaining, the inference engine starts by evaluating existing facts,
derivations, and conditions before deducing new information. An endpoint (goal)
is achieved through the manipulation of knowledge that exists in the knowledge
base. Forward chaining can be used in planning, monitoring, controlling, and
interpretingapplications.

12. Define backward chaining.


✓ Backward chaining is a concept in artificial intelligence that involves
backtrackingfrom the endpoint or goal to steps that led to the
endpoint.
✓ This type of chaining starts from the goal and moves backward to
comprehend thesteps that were taken to attain this goal.
✓ The backtracking process can also enable a person establish logical
steps that canbe used to find other important solutions.
✓ Backward chaining can be used in debugging, diagnostics, and
prescriptionapplications.

13. Define Resolution.


✓ Resolution is a theorem proving technique that proceeds by building
refutation proofs, i.e., proofs by contradictions.
✓ It was invented by a Mathematician John Alan Robinson in the year 1965.
✓ Resolution is used, if there are various statements are given, and we
need to provea conclusion of those statements.
✓ Unification is a key concept in proofs by resolutions. Resolution is a
single inference rule which can efficiently operate on the conjunctive
normal form or clausal form.

PART-B (13 MARKS)

1. Explain detail about knowledge based agents and its


operations.

2. Explain detail about Propositional logic.

3. Write brief notes about propositional model checking.

4. Write an algorithm for Hybrid Wumpus -Agent


algorithm.

5. Write an brief notes about First Order Logic .

PART-C (15 MARKS)

1. Explain detail about forward and backward chaining algorithm


with an example.

2. Write an algorithm for Forward and Backward chaining with an example

3. Explain detail about knowledge representation and engineering.


4. Analyze the Resolution with an example and also draw a resolution graph. .

UNIT V PROBABILISTIC REASONING


Acting under uncertainty – Bayesian inference – Naïve Bayes models. Probabilistic reasoning
Bayesian networks – Exact inference in BN – Approximate inference in BN – Causal
networks.
PART-A (2 Marks)
1. Define uncertainty. Give an example?
✓ Till now, we have learned knowledge representation using first-
order logic and propositional logic with certainty, which means
we were sure about the predicates.
✓ With this knowledge representation, we might write A→B,
which means if A is true then B is true, but consider a situation
where we are not sure about whether A is true or not then we
cannot express this statement, this situation is called uncertainty.
✓ So to represent uncertain knowledge, where we are not sure
about the predicates, we need uncertain reasoning or probabilistic
reasoning.

2. Define Belief state.


Problem-solving agents and Logical agents designed to handle
uncertainty bykeeping track of a belief state—a representation of
the set of all possible world states that it might be in—and
generating a contingency plan that handles everypossible
eventuality that its sensors may report during execution

3. Define Bayes rule.


✓ Bayes' rule allows us to compute the single term P(B|A) in
terms of P(A|B), P(B),and P(A).
✓ This is very useful in cases where we have a good probability
of these three termsand want to determine the fourth one.
✓ Suppose we want to perceive the effect of some unknown
cause, and want tocompute that cause, then the Bayes' rule
becomes:
Application of Bayes' theorem in Artificial intelligence

4. Define Bayesian network.


✓ Bayesian belief network is key computer technology for dealing
with probabilistic events and to solve a problem which has
uncertainty. We can define a Bayesian network as:

"A Bayesian network is a probabilistic graphical model which


represents a set of variables and their conditional dependencies
using a directed acyclic graph."

✓ It is also called a Bayes network, belief network, decision


network, or Bayesian model.
Bayesian networks are probabilistic, because these
networks are built from a probability distribution, and also use
probability theory for prediction and anomalydetection.

5. List out the components of Bayesian network.

The Bayesian network has mainly two components:


• Causal Component
• Actual numbers
✓ Each node in the Bayesian network has condition probability
distribution P(Xi |Parent(Xi) ), which determines the effect of the
parent on that node.
✓ Bayesian network is based on Joint probability distribution and
conditional probability.
✓ So let's first understand the joint probability distribution:

Joint Probability – It is the measure of two events happening at the


same time. It can be written as P(A∩B)

Conditional Probability– It is the measure of the probability of an event


occurring given that another event has occurred. In other terms, the
conditional probability of an event X is the probability that the event
will occur given that event Y has already occurred.

P(X|Y): Probability of event X occurring given that event Y already


occurred.If X and Y are dependent events, then P(X|Y) = P(X∩Y)/P(Y)

If X and Y are independent events, then P(X∩Y) = 0So, P(X|Y) = P(X)

6. Write a Applications of Bayesian network.


Healthcare Industry: The Bayesian network is used in the healthcare
industry for the detection and prevention of diseases. Based on models
built, we can find out the likely symptoms and predict whether a person
will be diseased or not. For instance, if a person has cholesterol, then
there are high chances that the person gets a heart problem. With this
information, a person can take preventive measures.

Web Search: Bayesian Network modes can be used for search accuracy
based on userintent. Based on the user’s intent, these models show things
that are relevant to the person. For instance, when we search for Python
functions most of the time, then the web search model activates our intent
and it makes sure to show relevant things to the user.

Mail Spam Filtering: Gmail is using Bayesian Models to filter the


mails by readingor understanding the context of mail. For instance, we
may have observed spamemails in the spam folder in Gmail. So, how
are these emails classified as spams? Using the Bayesian model, which
observes the mail and based on the previousexperience and the
probability it classifies mail as spam or not.

Biomonitoring: Bayesian Models are used to quantify the concentration


of chemicals in blood and human tissues. These use indicators to measure
blood and urine. To find the level of ECCs, one can conduct biometric
studies.

Information Retrieval: Models can be used for retrieving information


from the database. During this process, we refine our problem multiple
times. It is used to reduce information overload.
7. Define causal networks. Give an example?
Causal reasoning is a crucial element to how humans
understand, explain, and make decisions about the world. Causal
AI means automating causal reasoning with machine learning.
Today’s learning machines have superhuman prediction ability but
aren't particularly good at causal reasoning, even when we train
them on obscenely large amounts of data. In this book, you will
learn how to write algorithms that capture causal reasoning in the
context of machine learning and automated data science.

8. Define Exact inference. Give an example?


• It is the term used when inference is performed exactly
(subject to standardnumerical rounding errors).
• Exact inference is applicable to a large range of
problems, but may not bepossible when
combinations/paths get large.

9. What is approximate Inference. Give an example?

• Wider class of problems


• Non deterministic
• No guarantee of correct answer

10. Define Naïve Bayes model.


✓ It is a classification technique based on Bayes’ Theorem with
an assumption of independence among predictors. In simple
terms, a Naive Bayes classifier assumes that the presence of a
particular feature in a class is unrelated to the presence of any
other feature.
✓ For example, a fruit may be considered to be an apple if it is red,
round, and about 3 inches in diameter.
✓ Even if these features depend on each other or upon the
existence of the other features, all of these properties
independently contribute to the probability that this fruit is an
apple and that is why it is known as ‘Naive’.
✓ Naive Bayes model is easy to build and particularly useful for
very large data sets. Along with simplicity, Naive Bayes
is known to outperform even highly sophisticated
classification methods.
✓ Bayes theorem provides a way of calculating posterior
probability P(c|x) from P(c), P(x) and P(x|c). Look at the
equation below:

Above,
• P(c|x) is the posterior probability of class (c, target) given predictor (x,
attributes).
• P(c) is the prior probability of class.
• P(x|c) is the likelihood which is the probability of predictor given class.
• P(x) is the prior probability of predictor.

PART-B (13 Marks)

1. Explain detail about Exact inference in BN with


example.
2. Explain about Bayesian network with an example.

3. Explain about Naïve Bayes model with an example

4. Explain detail about Approximate inference in BN


with example.

5. Explain about Bayesian inference with an example

PART C (15 MARKS)


1. Analyze approximate inference in Bayesian networks
with real time example.
2. Analyze burglary Alaram networks using Bayesian
network concept in detail.
3. Define causal networks. Analyze the causal networks
with an example.

You might also like