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.
Translate from chinese to english during search
tmux highlight mode with search
Solr search does not return exact match
Elasticsearch: How to ignore/disable special characters in a search query?
Lucene multiterm search and aggregation
How to remove “Certain” (not all) empty lines, or two consequent empty lines in notepad++
Accessing C# sources
Search for a string that appears in any file which paths contains a given word in Atom
how to show contents of the file rather than filename when searching by solr
How to block Alexa and Similar Web to access website
Search text for matching large number of strings
How to build search with facetting over unknown/unspecified set of attributes/properties?
Where is sitemap.txt.jsp in AEM?
vim highlight found words one by one
Elastic Search Java API Multi match query prefix query on tokens
CS50 pset3 find always returns true