I have now coded up various graph search (A*, DFS, BFS, etc..) algorithms many times over. Every time, the only real difference is the actual search states I am searching over, and how new states are generated from existing ones.
I am now faced with yet another search-heavy project, and would like to avoid having to code and debug a general search algorithm again. It would be really nice if I could define a search state class, including information for generating successive states, heuristic cost, etc, and just plug it in to some kind of existing search framework that can do all of the heavy lifting for me. I know the algorithms aren't particularly difficult to code, but there are always enough tricks involved to make it annoying.
Does anything like this exist? I couldn't find anything.
Perhaps QuickGraph will be of interest.
QuickGraph provides generic directed/undirected graph datastructures and algorithms for .Net 2.0 and up. QuickGraph comes with algorithms such as depth first seach, breath first search, A* search, shortest path, k-shortest path, maximum flow, minimum spanning tree, least common ancestors, etc
This sounds like a perfect use case for either a Delegate or a Lambda Expression.
Using Lambda Expressions for Tree Traversal – C#
http://blog.aggregatedintelligence.com/2010/05/using-lambda-expressions-for-tree.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With