Movement highlighting

Looks very cool indeed. Had a browse through that page you linked to - looks very interesting.

About the assumption made that the smallest increment of moves to be deducted would be 12. Can't you make a short function to check through CIV4RouteInfos.xml to find if this is the case? This should make the code a bit more versitile as a mod component.
 
The route scan should be possible, I have to check.
But right now I struggeling with other more basic problems. I still try to adjust my pathfinder to the built-in one. If there is a difference in the results, the whole thing makes not much sense.
 
Hmmmm. Given the complexity of possable paths in Civ I'm not sure the methods for calculating heuristic values given on that site are going to be good enough.

Have you tried sticking a value of zero for the heuristic? Does it work?

EDIT:
A*'s ability to vary its behavior based on the heuristic and cost functions can be very useful in a game. The tradeoff between speed and accuracy can be exploited to make your game faster. For most games, you don't really need the best path between two points. You just need something that's close. What you need may depend on what's going on in the game, or how fast the computer is.
It would appear that we will always need the most accurate result here for it to work properly (heuristic = 0). I'm not sure if this will kill computers though. It also takes alot of the fun out of it...
 
I did lot of tries with the different heuristic calculation methods and the tie-break calculation methods. The best results I got with the manhattan method and no tie-break.
I tried it with a heuristic = 0 and it failes. After analyzing the result I found out that A* doesn't work without a heuristic. Then only one path to somewhere is found and thats it. There must be a rating of the seperate path steps, otherwise the first step examined one is always the best.
 
Heck! I found the reason for my main problem! Dead end paths!!! Whent the function once found a dead end it marks the complete path as impossible, instead of trying another way!
I have to think about how to modify the funtion that it doesn't do so.


EDIT :
:banana::banana::banana::banana: Post no. 100 :banana::banana::banana::banana:


EDIT2 : Now I know what I have to change :D. Will do it on saturday. Have to travel for business next days :(.
 
12monkeys said:
I did lot of tries with the different heuristic calculation methods and the tie-break calculation methods. The best results I got with the manhattan method and no tie-break.
Fair enough. I'm still dubious about the manhattan method though - can it cope with, for example, a shortest path where you have to go directly away from the target square for a few squares (on a railroad for example)?
 
Back
Top Bottom