AI-Pathfinding-AStar

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    for which you are calculating the path. In return it should provide an
    array reference containing the following details about each of the
    immediately surrounding nodes:

    * Node ID
    * Cost to enter that node
    * Heuristic

    Basically you should return an array reference like this: "[ [$node1,
    $cost1, $h1], [$node2, $cost2, $h2], [...], ...];" For more information
    on heuristics and the best ways to calculate them, visit the links
    listed in the *SEE ALSO* section below. For a very brief idea of how to
    write a getSurrounding routine, refer to the included tests.

    As mentioned earlier, AI::Pathfinding::AStar provides two routines named
    "findPath" and "findPathIncr". "findPath" requires as input the starting
    and target node identifiers. It is unimportant what format you choose
    for your node IDs. As long as they are unique, and can be distinguished
    by Perl's "exists $hash{$nodeid}", then they will work. "findPath" then
    returns an array (or reference) of node identifiers representing the
    least expensive path to your target node. An empty array means that the

lib/AI/Pathfinding/AStar.pm  view on Meta::CPAN

=over

=item * Node ID

=item * Cost to enter that node

=item * Heuristic

=back

Basically you should return an array reference like this: C<[ [$node1, $cost1, $h1], [$node2, $cost2, $h2], [...], ...];>  For more information on heuristics and the best ways to calculate them, visit the links listed in the I<SEE ALSO> section below...

As mentioned earlier, AI::Pathfinding::AStar provides two routines named C<findPath> and C<findPathIncr>.  C<findPath> requires as input the starting and target node identifiers.  It is unimportant what format you choose for your node IDs.  As long a...

=head1 PREREQUISITES

This module requires Heap (specifically Heap::Binomial and Heap::Elem) to function.

=head1 SEE ALSO

L<http://www.policyalmanac.org/games/aStarTutorial.htm>, L<http://xenon.stanford.edu/~amitp/gameprog.html>



( run in 0.612 second using v1.01-cache-2.11-cpan-4e96b696675 )