jas14 / amity-apcs-ge-2011

Automatically exported from code.google.com/p/amity-apcs-ge-2011
0 stars 0 forks source link

A* Algorithm #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Ok so we need to start working on the A* Algorithm..

Links:
http://stackoverflow.com/questions/1970453/algorithm-and-data-structure-for-solv
ing-the-game-globs-flood-fill-floodit

http://stackoverflow.com/questions/1430962/how-to-optimally-solve-the-flood-fill
-puzzle

In the second link, 3rd post down is the basic idea i think we should use, 
however for the estimate on the number of moves we should use Mike Z's diagonal 
method.

Please read both of the links if you havn't already.

Original issue reported on code.google.com by drdaniel...@gmail.com on 24 Mar 2011 at 7:13

GoogleCodeExporter commented 9 years ago
i implemented it with its own stack but it seems like 250x250 still doesnt work 
im guna give it some more testing before commit

Original comment by drdaniel...@gmail.com on 26 Mar 2011 at 12:58

GoogleCodeExporter commented 9 years ago
ok 250x250 is working fine (with a very long wait in the beggining). However, I 
do not think we should continue sorting the array because I am getting 
consistently (albeit slightly) better results unsorted. (I have also tried 
sorting by size and that works better than position but worse than unsorted).

Original comment by drdaniel...@gmail.com on 27 Mar 2011 at 2:19

GoogleCodeExporter commented 9 years ago
yo dude I think we're creating worst-case sorted arrays somehow. Seriously, do 
Collections.shuffle(..) on the array in getBlobs(). I was getting far fewer 
moves on a 250x250 grid (10-30 fewer)

Original comment by drdaniel...@gmail.com on 27 Mar 2011 at 2:25

GoogleCodeExporter commented 9 years ago

Original comment by drdaniel...@gmail.com on 27 Mar 2011 at 7:55

GoogleCodeExporter commented 9 years ago

Original comment by drdaniel...@gmail.com on 10 Apr 2011 at 2:33