Flying Wiener Dog

Released Books


An Ember in the Wind


A Foundation in Wisdom

Apps


WordMutation (NEW!)


Orbitual


Permutation


Arcade

Artificial Intelligence Tools - Find Path

The AI Tools package is an extension for Stencyl development environment. It is a general-purpose graphs toolset, which includes an implementation of A* pathfinding.

Please see main page for more information.

The "Find Path" block will execute the toolset's A* implementation. The function will return a list (array). There are two formats you can request: a list of steps, and a list of visited nodes.

Regardless of your preference, if the call fails to produce a path (e.g. the goal is completely blocked), the list will be empty. You can check for failure by checking if the list that is returned has no elements. If this is unexpected, check the logs. Certain failures, such as a connection without a node, will trigger a warning. You can also use the export features to draw the graph and check for bugs in its construction.

"as list of steps" option:

The call will return a "list of lists". It returns a list of steps, and each step is a list with the following data:

  1. Number of rows to get from previous node to current
  2. Number of columns to get from previous node to current
  3. Name of the current node
  4. Name of the connection which lead to the current node

"as list of nodes" option:

The call will return a "list of lists". It returns a list of nodes, and each node is a list with the following data:

  1. Row of the current node
  2. Column of the current node
  3. Name of the current node
  4. Name of the connection which lead to the current node