Page 1 of 1

A*(A-star) algorithm in php?

Posted: Tue Aug 23, 2011 2:06 am
by watabebe
Hello,

I want you to help for a moment. I want to rewrite dijkstra of the following URL to A*.
http://en.giswiki.net/wiki/Dijkstra's_algorithm#PHP
Because no one has done yet though it retrieves with Google, I am embarrassed.


Could you rewrite it in someone's A*?
Moreover, please teach when there is URL that serves as a reference.

iclab.oikawa[at]gmail.com

Re: A*(A-star) algorithm in php?

Posted: Tue Aug 23, 2011 2:30 am
by twinedev
Can you explain more what you are looking for the modified function to do?

-Greg

Re: A*(A-star) algorithm in php?

Posted: Tue Aug 23, 2011 3:16 am
by watabebe
(sorry because I am not good at English ・・・. )

function?
Perhaps (function findShortestPath),(findBestPath),(updateDstanceAndPrevious)
I think that if three changes.It is hoped that this part is improved to A* Algoritm
Other...funtionGetResult is used as it is.

Looking for A * class created in PHP.
A * is a Find shortest path algorithms.
http://en.wikipedia.org/wiki/A*_search_algorithm-wiki

Re: A*(A-star) algorithm in php?

Posted: Tue Aug 23, 2011 4:10 am
by RCA86
Here's one guy's version:

http://codezilla.com/projects/a-star/

Re: A*(A-star) algorithm in php?

Posted: Tue Aug 23, 2011 11:07 pm
by watabebe
thanks

but,
How can I reference to which class?
AStarSolver.class? Graph.class?

Re: A*(A-star) algorithm in php?

Posted: Mon Aug 29, 2011 11:48 pm
by watabebe
no answer.......please help me

Re: A*(A-star) algorithm in php?

Posted: Wed Aug 31, 2011 9:38 am
by RCA86
Do you have experience with PHP? :/ I only looked at the code quickly, but can't you work out how to use each class?

This isn't for a school project or something is it?

Re: A*(A-star) algorithm in php?

Posted: Wed Aug 31, 2011 4:07 pm
by genix2011
No one is going to do your Homework for you here. Look up the A* algorithm in Wikipedia, there should even be an code example and the pseudo code.

Perhaps a small tip, the A* algorithm is nothing else than the Dijkstra with an heuristic.

And here an extremly great description of the algorithm:
http://www.policyalmanac.org/games/aStarTutorial.htm