Advertisement

Add more randomness to A* path?

Started by March 03, 2016 09:33 PM
3 comments, last by LorenzoGatti 8 years, 8 months ago

Hey,

A* is great, it finds the closest path possible. But what could I do, to vary that path a little bit? E.g. don't always take the closest path possible, go 3rd or 4th closest path. Or just move little bit different path.

What do you guys suggest to make it look great?

Game I'm making - GANGFORT, Google Play, iTunes

The first thing that comes to mind is adding some random noise to the costs. It's trivial to try and you get to modulate how random you want the results to look.
Advertisement

I had the same idea. How big should that random be? Currently I see these cost values range from 2 to 80. What should I factor in random range?

Game I'm making - GANGFORT, Google Play, iTunes

Plug in some numbers and find out?

Wielder of the Sacred Wands
[Work - ArenaNet] [Epoch Language] [Scribblings]

Plug in some numbers and find out?

Indeed. Cost perturbations should be positive, to avoid any possible risk of getting negative costs, but it's the only real constraint: noise amounts greater than the cost difference between the actual best move and the second best one have no effect (the best move remains the best), but that difference is often zero.

Omae Wa Mou Shindeiru

This topic is closed to new replies.

Advertisement