Used to think I was smart, need heuristic
The end goal is not where you started the car, it is where you started the car after having gone all the way around the track. You can also split the track into different regions and find paths through each region, then splice the paths together. If the splicing is done on straight roads, it should be fairly simple to compute a pretty good path.
Quote:Original post by Horizon
I think what you're missing here is that the optimal line isn't necessarily the shortest line. You have to take acceleration and breaking into account.
Doesn't matter. A* only needs an admissible heuristic to find the optimal route, and in this case distance to goal is admissible due to it always underestimating the approximated cost from start to goal.
I would try to modify the distance algo by adding the (unsigned) angle turned to the distance travelled. So it wont like oscillating around. Heuristific.
There is a method in Appendix C of, http://remi.coulom.free.fr/Publications/Thesis.pdf
for analyzing racing lines. I tried to write something to create a racing line for my game at one point using this method, but never managed to get it converge on a solution.
Maybe you will have better luck. It does look to produce good results.
for analyzing racing lines. I tried to write something to create a racing line for my game at one point using this method, but never managed to get it converge on a solution.
Maybe you will have better luck. It does look to produce good results.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement