Does anyone know if there is a simple way to do pathfinding in PHP?
I basically have a list of numbers, e.g.
{origin:11485,outboundDirections:"11486,11487,11488"}{origin:11487,outboundDirections:"11485,11676,94185"}and getting from 11485 to 94185 would result in 11485>11487>94185 with ways to "exit", and I'm trying to figure out how to do this (it doesn't really have to be shortest path or anything AI-like, just a way to get from A to B)
I have no idea where to start at all, unfortunately
I have recently started and opensourced a flexible pathfinding script in PHP, using the A* algorithm primarily. The idea being to give a node graph object with the most basic methods necessary that the algorithm needs to explore the node graph and get H and G costs.
It would work very easily with your list of numbers since it also uses integers to refer to nodes.
See: https://github.com/Nexii-Malthus/phpPathfinding
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With