php-a-star
php-a-star copied to clipboard
A* (A Star) search algorithm for PHP
NodeList is currently implemented by a regular PHP array. As pointed out by @pathway in #5, the algorithm efficiency can be improved by changing the NodeList's underlying structure. In #5,...
Profiling using the scale testing branch (including the priority queue): php xdebug and kcachegrind A lot of time is spent constructing nodes, including __Constructor, and fromNode. Would you consider an...
Only the following should be included when composer installs from `dist`: - `src` folder - `composer.json` file - `README.md` file - `LICENSE` file Different ways to implement this functionality are...
As suggested by @pathway in #12, the benchmark should be extended to display the number of nodes that were expanded during the execution. As a prerequisite for this, the algorithm...
As suggested by @pathway in #12, it would be interesting to include a memory usage report in the benchmark results. The event returned by the stopwatch in `BenchmarkRunner.php` allows you...
Scale
Scale branch includes these changes: 1) Added large terrains to see performance on larger problems. 2) Replaced openList with SplPriorityQueue. Using hhvm on an old Ubuntu desktop, timings to find...
Generally the changes required to enable these are very small. But the algorithm would need to be written in a slightly more general way. Here is a nice example from...