Computer Science Canada

A* and Floodfill algorithms

Author:  Panphobia [ Sat Nov 17, 2012 12:38 am ]
Post subject:  A* and Floodfill algorithms

I was wondering if you guys could help me with these two algorithms, I have them searched on wikipedia, but I do not know how to implement them to my advantage. I know you can A* for this question , but i was wondering how I would implement it. Also for flood fill I know you can use it on this question , but I also wonder how to implement. If there are guides on this could you guys link me, if not could you explain it to me, preferably in python/java.

Author:  Tony [ Sat Nov 17, 2012 1:25 am ]
Post subject:  RE:A* and Floodfill algorithms

A* is a heuristic. While in practice it might typically give correct results, it's not guaranteed to give the optimal result. is typically the way to go if optimality must be guaranteed. A* is typically used when some optimality can be sacrificed to gain performance (such as in video games).

Wikipedia's entry on Flood Fill also describes the algorithm in detail.