2
$\begingroup$

My homework is implementing algorithms BFS, DFS, depth-limited and IDS for the map as a 2D grid with 8 directions of movement. I read that the IDS algorithm is optimal, but in my case is not optimal paths.

Is the IDS algorithm optimal for graphs (e.g. map as a grid), or does optimality only apply to searching trees?

$\endgroup$
1
  • $\begingroup$ IDS should be optimal if it's a simple grid traversal where the traveling cost is the same everywhere (see Wikipedia). Maybe check your implementation? $\endgroup$ Jul 29 '12 at 9:47

This site is temporarily in read only mode and not accepting new answers.