A*(A-star) algorithm in php?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
watabebe
Forum Newbie
Posts: 4
Joined: Tue Aug 23, 2011 1:13 am

A*(A-star) algorithm in php?

Post 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
User avatar
twinedev
Forum Regular
Posts: 984
Joined: Tue Sep 28, 2010 11:41 am
Location: Columbus, Ohio

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

Post by twinedev »

Can you explain more what you are looking for the modified function to do?

-Greg
watabebe
Forum Newbie
Posts: 4
Joined: Tue Aug 23, 2011 1:13 am

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

Post 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
RCA86
Forum Commoner
Posts: 32
Joined: Thu Mar 10, 2011 1:03 pm

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

Post by RCA86 »

Here's one guy's version:

http://codezilla.com/projects/a-star/
watabebe
Forum Newbie
Posts: 4
Joined: Tue Aug 23, 2011 1:13 am

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

Post by watabebe »

thanks

but,
How can I reference to which class?
AStarSolver.class? Graph.class?
watabebe
Forum Newbie
Posts: 4
Joined: Tue Aug 23, 2011 1:13 am

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

Post by watabebe »

no answer.......please help me
RCA86
Forum Commoner
Posts: 32
Joined: Thu Mar 10, 2011 1:03 pm

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

Post 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?
genix2011
Forum Commoner
Posts: 74
Joined: Tue Aug 02, 2011 4:00 pm

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

Post 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
Post Reply