Commits

Rhys ! committed faf59d4 Draft

basic IDGBFS

  • Participants
  • Parent commits fe02e60

Comments (0)

Files changed (2)

                , depthFirst
                , aStar
                , greedyBF
-               , search, iterativeDFS) where
+               , search, iterativeDFS, iterativeGBFS) where
 \end{code}
 
 Next, we import a few base Haskell modules that contain some useful
   q ->
   SearchResult a q
 iterativeDFS da = iterativeSearch (limitApp depthFirst da)
+
+iterativeGBFS da h = iterativeSearch (limitApp (greedyBF h) da)
 \end{code}
 \appendix
 \section{Utility Definitions}
               , Path
               , SearchResult
               , actions
-              , search, iterativeDFS
+              , search, iterativeDFS, iterativeGBFS
               , aStar, breadthFirst, depthFirst, greedyBF )
 import NMPuzzle (NMPuzzle, expand, hTaxicab, mkPuzzle)
 
           , ("BFS", search . const breadthFirst)
           , ("GBFS", search . greedyBF . hTaxicab)
           , ("AS", search . aStar snd . hTaxicab)
-          , ("IDDFS", const (iterativeDFS snd)) ]
+          , ("IDDFS", const (iterativeDFS snd))
+          , ("IGBFS", iterativeGBFS snd . hTaxicab) ]
 
 main :: IO ()
 main = do