Did you know ... | Search Documentation: |
Pack canny_tudor -- prolog/canny/a.pl |
initial
and
final
have semantic significance. You can override these using
Options for initially
and finally
. For Options see below.
Simplifies the CHR implementation by accepting h/3 terms as a list rather than using predicates to expand nodes. We match heuristic terms using member/2 from the list of heuristics. This interface does not replace a_star/4 since having a pre-loaded list of heuristics is not always possible or feasible, for example when the number of arcs is very large such as when traversing a grid of arcs.
Here is a simple example.
?- a_star([h(a, b, 1)], A, [initially(a), finally(b)]). A = [h(a, b, 1)].
Options include:
initially(Initial)
defines the initial node, defaults to
atom initial
.finally(Final)
defines the final node, atom final
by default.reverse(Boolean)
reverses the outgoing selected Heuristics so that
the order reflects the forward order of traverse. The underlying
expansion pushes path nodes to the head of the list resulting in a
final-to-initial traversal by default.