Prolog: How to get a path from a start node to a Goal Node
I'm trying to write a prolog program that will represent a goal node G and will return a list of nodes from a predicate called something like get_path(StartNode, Path) from the start node to the goal node. I have a set of nodes, each with a heuristic value, some successor arcs to travel from one node to another, and a cost for doing so. The heuristic values for each are: h(a,12). h(b,8). h(c,4). h(d,3). h(f,5). h(e,5). h(g,0). And the successor arcs and associated costs are: s(a,b,3). s(a,c,6). s(b,d,4). s(b,e,2). s(d,e,2). s(d,g,1). s(e,g,3). s(c,e,5). s(c,f,4). s(f,g,7). I have drawn out a chart that maps all the node routes I can take, and as such I know that both a->b->e->g and a->b->d->gis the cheapest paths I can follow, each with a total cost of 8. However I'm just not entirely sure what kind of predicate I should write that will take in this information as well as output my results needed. Do I use breadth first search? And where does the Heuristic value come into play with the solution? Any help at all would be majorly appreciated, thanks.
Possible to search google for which sites link to a particular URL?
How to search inside of a search container in liferay
Is it possible to efficiently search a bit-trie for values less than the key?
How to search/replace expressions with parantheses in emacs?
Elasticsearch: how to group searchterms for more relevance in bool query
Single word hits in Lucene not found
Log Search terms/keywords in Solr
OpenERP: Complex interactive search across several objects/tables - how?
How to search Jira with Link = Empty?
How can I implement Solr case insensitive and accent insensitive substring search with whitespaces?
php array display
Relevancy tuning solr fulltext search by keyword position + occurrence?
Display Joomla search results, one by one in each module?
Exclude comments from search results in IntelliJ global search?
Is it possible to find out how many times (and from where) a certain search query was made on Google?
Searching for a series of nodes in an isometric graph, Depth First is not finding some possible paths