Algorithm-Search
view release on metacpan or search on metacpan
lib/Algorithm/Search.pm view on Meta::CPAN
The traversable
object must have certain methods, such as 'move', described below.
This is passed into the search method via the 'search_this' parameter.
At any position, the object has a list of moves to new positions,
the list may be empty.
A position is a solution if the "is_solution" function returns true.
A traversal does not require that a solution be found or even looked for.
A search is a traversal that looks for a solution.
A path corresponds to a list of valid moves from the initial position.
The path values correspond to the list of values by the positions
the object moves along the path.
A move is valid if the move function returns a value.
The number of steps, is the number of calls to the move function.
A queue based traversal stores positions and paths on a queue, copying
the object before performing each move.
( run in 0.365 second using v1.01-cache-2.11-cpan-64827b87656 )