Main Article Content
The Water Jug Problem, also known as the Die-Hard Problem, is a well-known artificial intelligence problem that involves filling and pouring water from two jugs of different capacities to obtain a specific amount of water. In this research, we investigate the performance of two search algorithms, namely Breadth First Search (BFS) and Depth First Search (DFS), in solving the Water Jug Problem on Google Colab. We define the rules of the problem and implement the BFS and DFS algorithms to find the optimal path from an initial node to a goal node. We compare the execution time and the number of explored nodes for each algorithm to evaluate their efficiency and effectiveness. The results show that the BFS algorithm performs better than the DFS algorithm in terms of execution time and explored nodes. The findings of this research contribute to the understanding of search algorithms and their applicability in solving real-world problems.
This work is licensed under a Creative Commons Attribution 4.0 International License.