You are on page 1of 9

Academy of Technology

Department: CSE Semester: 5th

Paper Name: Artificial Intelligence Paper Code: PEC-IT501B

Power Point Presentation on [State Space Search: Water-Jug]

Presented by

Name of the Student: Supratik De University Roll No.:16900121103

To fulfill the requirement of Continuous Assessment 1 [CA1] of B. Tech / MCA Course.


The Water Jug Problem

A PowerPoint
Presentation
Introduction:A Classic Problem in Artificial Intelligence

You are given two


jugs, one with a
capacity of 4 liters
and one with a
capacity of 3 liters.
The jugs are
initially empty.
You need to get
exactly 2 liters of
water into the 4-
liter jug.
Solutions:
 There are a number of solutions to the water jug
problem. One solution is to fill the 4-liter jug and then
pour 2 liters of water into the 3-liter jug. Another
solution is to fill the 3-liter jug and then pour water back
and forth between the two jugs until there are 2 liters of
water in the 4-liter jug.
AI Algorithms:

 AI algorithms can be used to solve the water jug problem. One


common approach is to use a search algorithm, such as breadth-first
search or depth-first search. These algorithms will explore all
possible states of the problem until they find a solution.
 **Another approach to solving the water jug problem is to use a
constraint satisfaction problem (CSP) solver. A CSP solver is a type
of AI algorithm that is specifically designed to solve problems with
constraints. In the case of the water jug problem, the constraints are
that the jugs cannot hold more water than their capacity, and that
the water cannot be transferred between jugs unless they are both
empty or both full.
Example:
 The algorithm would first initialize the state of the
problem. This would involve setting the capacity of
the jugs, the initial amount of water in the jugs, and
the desired amount of water to be transferred.
 The algorithm would then start searching for a
solution. It would do this by exploring all
possible states of the problem. Each state would
represent the amount of water in each jug.
 The algorithm would continue searching until it
found a state that met the desired conditions. In
this case, the desired condition would be that the
4-liter jug had 2 liters of water in it.
 Once the algorithm found a solution, it would
output the steps that were taken to reach the
solution.
Conclusion

The water jug problem is a simple


problem, but it is a good example of how
AI algorithms can be used to solve
problems. AI algorithms can be used to
solve a wide variety of problems,
including problems that are difficult to
solve using traditional methods.
References
https://www.geeksforgeeks.org/two-water
-jug-puzzle
/
https://bard.google.com/
Artificial Intelligence:A modern
Approach,
Norvig,Russel
THANK YOU!!

You might also like