Computer Science Canada Programming C, C++, Java, PHP, Ruby, Turing, VB   Username:   Password: Wiki   Blog   Search   Turing   Chat Room  Members
A* and Floodfill algorithms
Author Message
Panphobia

Posted: 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 http://dwite.org/questions/haunted_house.html , but i was wondering how I would implement it. Also for flood fill I know you can use it on this question http://dwite.org/questions/oil_spill_area.html , 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.
Sponsor
Sponsor

Tony

Posted: 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. http://en.wikipedia.org/wiki/Dijkstra%27s_algorithm 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 http://en.wikipedia.org/wiki/Flood_fill also describes the algorithm in detail.
Tony's programming blog. DWITE - a programming contest.
 Display posts from previous: All Posts1 Day7 Days2 Weeks1 Month3 Months6 Months1 Year Oldest FirstNewest First

Page 1 of 1  [ 2 Posts ]
 Jump to:  Select a forum  CompSci.ca ------------ - Network News - General Discussion     General Forums   -----------------   - Hello World   - Featured Poll   - Contests     Contest Forums   -----------------   - DWITE   - [FP] Contest 2006/2008   - [FP] 2005/2006 Archive   - [FP] 2004/2005 Archive   - Off Topic     Lounges   ---------   - User Lounge   - VIP Lounge     Programming -------------- - General Programming     General Programming Forums   --------------------------------   - Functional Programming   - Logical Programming   - C     C   --   - C Help   - C Tutorials   - C Submissions   - C++     C++   ----   - C++ Help   - C++ Tutorials   - C++ Submissions   - Java     Java   -----   - Java Help   - Java Tutorials   - Java Submissions   - Ruby     Ruby   -----   - Ruby Help   - Ruby Tutorials   - Ruby Submissions   - Turing     Turing   --------   - Turing Help   - Turing Tutorials   - Turing Submissions   - PHP     PHP   ----   - PHP Help   - PHP Tutorials   - PHP Submissions   - Python     Python   --------   - Python Help   - Python Tutorials   - Python Submissions   - Visual Basic and Other Basics     VB   ---   - Visual Basic Help   - Visual Basic Tutorials   - Visual Basic Submissions     Education ----------- - Student Life   Graphics and Design ----------------------- - Web Design     Web Design Forums   ---------------------   - (X)HTML Help   - (X)HTML Tutorials   - Flash MX Help   - Flash MX Tutorials   - Graphics     Graphics Forums   ------------------   - Photoshop Tutorials   - The Showroom   - 2D Graphics   - 3D Graphics     Teams ------ - dTeam Public

 Style: Appalachia blueSilver eMJay subAppalachia subBlue subCanvas subEmjay subGrey subSilver subVereor Search: