| |||
| DFS algorithm has been around for quite some time and it is quite useful in AI methods and especially when there is a memory or time restrictions. This means that if there is a solution the algorithm will find it but it is likely that it won't be the best solution | |||
Class: Search Algorithm
| |||
How it works: The logic behind DFS is very simple! From a selected node you go as deep as you can! | |||
In my implementation the main class is of course the node! Then we have the map class and the map search class! The map class stands between the node and the map search!
| |||
I include a cpp file with a test program I made! | |||
IMPORTANT I left some debugging code in the files. It used to output the solution in txt file! If you don't want it just go to the map search class , find path function and delete all the cout and file output code! (5-6 lines top)
| |
| This tutorial was written by Arxwn. For any problems or question please don't hesitate to post them in our forums and i ( or anyone else who can answer them ) will reply as soon as possible |
discuss this topic to forum
