Iterative Deepening Search (IDS) is a combination of Breadth First Search (BFS) and Depth First Search (DFS). IDS joins DFS's space-productivity and BFS's quick search. IDS calls DFS for different depths starting from an initial value, then BFS is performed to check if the newly visited nodes are the goal nodes.
In the depth first iterative deepening function, there are 3 variables. The first variable represents the starting node. The second variable represents the maximum amount of the nodes visited. The third variable is the Solution, where the solution is the path from a starting node to a goal node.
The output '4' at the first line represents the depth to find the goal node. The path to get to the goal node from the starting node is stated as S=[n,g,c,a]
. To read the path, the stated solution must be read from the end, meaning that the path from node a to n is a->c->g->n.
Joey Lim, Y.Y., Lee, B.S.,Leong, J.H.,Liew.
The program is built using swi-PROLOG. This project is made for my TAI 2151 Artificial Intelligence Fundamentals
subject.