
11376 - Tilt!
Moderator: Board moderators
I search in Google and find this paper:
https:// drum.umd.edu/dspace/bitstream/1903/702/2/CS-TR-3420.pdf
(I don't want to be accused of "deep-linking", so I break up the link above with a space. Sorry.)
You can find a pseudocode of IDA* on page 5.
(My own IDA* handles "z' = infinity" somewhat differently.)
https:// drum.umd.edu/dspace/bitstream/1903/702/2/CS-TR-3420.pdf
(I don't want to be accused of "deep-linking", so I break up the link above with a space. Sorry.)
You can find a pseudocode of IDA* on page 5.
(My own IDA* handles "z' = infinity" somewhat differently.)
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
My major subject is also not Computer Science la... 
Programming is a great hobby~

Programming is a great hobby~
7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
Ok I have a decent understanding of how A* works. Another helpful site I found was http://www.policyalmanac.org/games/aStarTutorial.htm . The problem I am having now is figuring out how to use it for multiple goals, which I don't see being easy to do.
You don't have to modify the A* algorithm in any way for multiple goals. Just make sure that your heuristic is still admissible in this case (doesn't overestimate the distance to the closest goal state), and everything should work fine.
Alternatively, you can look at the problem in the following way. Let's add an extra move to the game: if all blue squares are taken, then you're allowed to remove the ball off the maze. The new state, corresponding to the ball after it has been removed, will be the new, unique goal state.
Alternatively, you can look at the problem in the following way. Let's add an extra move to the game: if all blue squares are taken, then you're allowed to remove the ball off the maze. The new state, corresponding to the ball after it has been removed, will be the new, unique goal state.
I don't have a BFS judge solution. But I think heuristic search is not so hard to code for this problem. And such an idea is also not hard to come up with. Of course, to get a better timing for this particular problem, you can add the heuristic function to your BFS, since it is given that you won't need >53 steps for each case.
If one is thinking of using "meet-in-the-middle" (which is by no means easy to code), then I think they'd better try heuristic searches... But it is always fun experimenting with different approaches~
If one is thinking of using "meet-in-the-middle" (which is by no means easy to code), then I think they'd better try heuristic searches... But it is always fun experimenting with different approaches~

7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
Well I improved upon my program, and made a BFS solution that can solve the 53 step maze in ~11s. Not sure if Ill be able to improve it without fully understanding how to add the hueristic function into my program without killing it
(I have tried adding some hueristic but so far it doesn't work in my program)
EDIT: Thanks to help from Darko I got my program accepted
I might try and work on a hueristic approach now. I also made a c++ version, which runs slightly faster than the java version.

EDIT: Thanks to help from Darko I got my program accepted

I think it is about time for me to change the test cases a bit. As you may guess the 53-step maze mentioned in previous posts can be found in the judge input.
So I think I need to change the input file so future solvers cannot cheat.

7th Contest of Newbies
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
Date: December 31st, 2011 (Saturday)
Time: 12:00 - 16:00 (UTC)
URL: http://uva.onlinejudge.org
First of all, thanks for the nice set! And I specially liked this problem very much. But a complain
. Why this line was added?

It could be...All except two test cases can be solved within 35 steps. One of the two harder cases takes at least 49 steps to solve, and the other 53.
Thanks again...There is no case which takes more than 53 steps.