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

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

Categories

HOME
url-redirection
grok
adal
paraview
checkstyle
eslint
jmeter
ecmascript-6
google-spreadsheet
3d
zend-framework
polling
jquery-ui
nuget-package
character
project
mel
line
jsonpath
stellar.js
selenium-ide
fileserver
mapstruct
blade
named-entity-recognition
inno-download-plugin
event-store
epsilon
mat
vex
event-flow
scatter3d
complex-numbers
database-comparison
testbed
dumpbin
erb
mailkit
sendbird
fossil
browser-extension
wurfl
datacachefactory
microsoft-metro
glm-math
avcapturedevice
strftime
plan-9
httrack
ntvs
linter
mschart
qtranslate
modelsim
git-flow
libjpeg
swingworker
change-tracking
simplepie
angular2-testing
myspace
lean
riot
createprocess
cortex-m
assertion
coda
pax-exam
sapscript
vacuum
baasbox
apache-commons-daemon
alloy-ui
telepat
j-security-check
android-vibration
addressing-mode
linkedin-jsapi
winginx
renderer
dsym
spring-3
bin
gtm-oauth2
cocoalibspotify-2.0
dolby-audio-api
traceability
jquery-blockui
inkcanvas
denied
google-floodlight
inline-formset
msr
ruby-1.8
cldc
unmanagedresources

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