In this Project , I Solved the famous Water Jug Problem in the Artificial Intellegience with bruteforce stratergy using BFS and DFS Algorithm (i.e. Uninformed search stratergy) to search through possible state space for Desired Goal State. TheMain.java File is the starting point of the program.
- We need to choose the required engine(i.e Algorithm) by assigning Object of BFS or DFS class implementing IEngine Interface. Note.:- We have to provide the maximum depth for DFS algorithm, where DFS algorithm would go to the given depth at one side and then it would start backtracking.
- Next we need to create Object of Jugs by providing maximum capacity of Jugs(jug1,jug2).ie.Jugs(4,3)
- Next we need to define initial State of the Jugs and Goal State of Jugs through Jugs.State class.
- In the end we need to create Object of ProductionSystem and pass the jugs object,initial state, final state, and engine for searching(i.e. Object of Searching Algorithm) and that its.