Melee Gun Thrashing
← Thread:Talk:Neuromancer/Melee Gun Thrashing/reply (8)
Using Swarm Targeting with gaussian kernel density usually gives a single angle which doesn´t change often.
Gun thrashing means the bot keeps changing its mind every tick. Usually happens when you target the closest bot and there are 2 or more bots with similar distances.
Swarm targeting (which is what I am using) can change rapidly too, because of the discontinuities caused by scanning new robots. For instance, if you are aiming towards a bot, then scan them and discover they moved further away and in a movement pattern you haven't seen before, suddenly it is better to target a bot on the other side completely. Of course, I'm using a square kernel instead of gaussian, I might try a 1/(x^2 + 1) kernel sometime but I've never found improvement over square when targeting.
Uniform kernel gives a bunch of tied best angles. If you use random tie-breaking and recalculate every tick, then the gun can thrash a lot. Generating a random number only once per shot solves the problem. I used it before switching to gaussians.
But it doesn´t solve the problem of turning the gun 180 degress. Besides Swarm Targeting, the only thing my bot does to avoid it is trying to stay near walls/corners.
Most articles dealing with gun thrashing in melee try to lock the gun on a single target.
You do not have permission to edit this page, for the following reasons:
You can view and copy the source of this page.
Return to Thread:Talk:Neuromancer/Melee Gun Thrashing/reply (12).
Maybe inverse distance is overflowing kernel density estimation. When KNN distance is too low, classification score tends to infinity. The result is a bunch of tied angles with infinity classification score. Depending on the tie-breaking being used, the gun can trash a lot too.