search


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.

Related Links

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

Categories

HOME
ng-idle
pyqt
case
battery
jsf-2.2
gradient
spring-data-mongodb
xbee
onclick
limit
maxscript
title
mql5
dkim
pega
mxgraph
datastage
ipmitool
spring-social
supervisor
symfony-2.8
atlassian-stash
mvc-mini-profiler
android-7.0-nougat
jersey-1.0
foreign-keys
asciidoctor-pdf
undertow
guzzle
springfox
jasmine-node
amazon-quicksight
datastax-enterprise-graph
tpm
quantlib
corenlp-server
recurring-events
mustache
catch-unit-test
papaparse
android-gridview
navigator
playframework-2.1
unordered-map
trigonometry
laravel-elixir
portforwarding
photos
clang++
facebook-social-plugins
robomongo
datamaps
trojan
wpas
yii2-user
subnet
er-diagram
quicktime
branch-prediction
sandcastle
mapxtreme
redbeard-ios
preprocessor
segment-io
watch-os-2
neon
avspeechsynthesizer
clipboard.js
gcloud-ruby
pushbots
qbxml
mobiledoc-kit
opserver
page.js
pyobjc
bufferedinputstream
exceldatareader
delayed-execution
xml-namespaces
jqmodal
ios8-extension
websphere-esb
amslidemenu
hidapi
asdf
pstack
os.system
paginator
subproject
objectquery
usertype
box2d-iphone
agility.js
webdev.webserver
tournament
cgbitmapcontextcreate
diagrams

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App