This game is like a tower defense game but we are supposed to program the search algorithm to find the exit point.
The first thing I started with was setting up the program. The directions being only for linux machines didn't help me at all. So a great deal of time has been spent fumbling around with Eclipse just to make the program run. After finally picking the correct main to run, I found that only Stub was showing up as the method that was available. After must trial and error, mostly error, I managed to get the program to work without having to depend on the terminal instructions.
Here is what I did:
1. Put the Meta-Inf folder into my src folder.
2. Put my new routemap class into the src folder under the default pacakge.
3. Placed the robot defense jar folder in the src folder along with the metadata folder (don't know if that's necessary or not).
4. Renamed my class to LudwigSDRouteMap and modified it in the metadata folder.
5. Ran the game on the method PrjSingleDestinationRoutes.
6. It works!
Now that the set up is out of the way, on to the meat of the assignment, building my search using Dijkstra. For that I will start to look at the comments littering the class file. The first thing I set about doing was looking into building my graph necessary to do Dijkstra's Algorithm. While working on costFrom I was growing frustrated that I couldn't check and see if the node I was on was an end or start.
For the moment I'm giving up on the problem. I suppose one of the things I'm confused on at this point is do I need to create my own type of nodes to calculate the path and should I start on the cashe method first? I'll fiddle with it more later.
I spent about an hour setting up the program and about an hour and a half on looking at the problem and trying to figure out how to tackle it.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment