Virtual Guns with Swarm Targeting?

Jump to navigation Jump to search

Virtual Guns with Swarm Targeting?

I thought that Diamond is also using virtual guns in melee (for he is using DisplacementVector in melee for his ASGun, while using GF in 1v1). But the code shows that the VGs is only used when there is only one opponent.

I've been long thinking about melee virtual guns, as nowadays, melee wave surfing is growing in popularity. However, the first difficulty to solve is to make VGs work with Targeting.

Here are the choices I've came up with:

  • Keep track of VG ratings for each opponent, and aim with the best gun respectively. Then combine the results as if they were from the same gun, not very different guns. The problem is that swarm targeting may not work properly when internal data from two quite different guns is combined.
  • Keep track of an overall rating, considering every opponent. However this method doesn't scale well when the opponents changes, e.g. going from 3 bots melee to 2 bots duel, the rating will remain irrelevant for a while.
  • Keep track of VG ratings for each opponent, but aim with the same gun for every opponent (for better swarm targeting). The gun used to aim is chosen so that the overall hit-rate is maxed. This should be the most versatile approach, but not easy to implement.

Any thoughts here?

Xor (talk)14:06, 31 December 2017

I think the best would be having individual guns, and using leave-one-out cross validation to test which gun actually gives better results on the historical data at fire time. This would skip needing to track separate hitrates for guns that you don't know where they would fire.

Skilgannon (talk)17:32, 31 December 2017

If I understand correctly, for n firing waves w = {w1..wn}, LOOCV involves training the gun with w - {wi}, then test with wi, for all i. For knn guns, this means doing n “(k+1)nn” searches (then exclude wi from result), and for neural networks, this means feeding the network n(n-1) waves in total. Isn’t that costly for robocode? Or may there be some faster ways?

Xor (talk)05:05, 1 January 2018

For KNN I think this is fine. I know personally I use a very fast kernel density function (square), so these kind of tests aren't expensive. That said, I haven't tried this technique yet. It might not work well due to other things we haven't spoken of yet.

Agreed though for NN, it is already pushing the limit of what can be processed in a single tick, so there is no way you can take 2x or 3x the processing power.

Skilgannon (talk)22:41, 2 January 2018

So do you mean only 2~3 waves need to be tested? I thought we need to iterate through every fired waves and do a knn search for each.

Xor (talk)15:14, 6 January 2018
 
 
 

Medina currently implements the third approach, but it only uses a HOT and a PIF gun, which implies in no improvement, but is meant to be a place to work on in the future. It uses different ratings depending on the number of enemies alive.

Rsalesc (talk)00:06, 1 January 2018

That’s inspiring. Btw, how do you keep track of hitrates for individual enemies? Are you assuming it were in 1v1 when testing hitrate?

And how do you combine hitrate for individual enemy and estimate swarm hitrate?

Xor (talk)05:08, 1 January 2018
 

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

Return to Thread:Talk:Virtual Guns/Virtual Gun with Swarm Targeting?/reply (5).

Well, I see many bots treating disabled bots differently, and that’s not hard to be implemented with swarm targeting.

While PIF guns play a dominant role in melee, similar to 1v1, there are two types of PIF guns, one tuned to hit the majarity, the other tuned to hit adaptive movement.

Although there are not so many adpative bots in melee comparing to 1v1, they still contribute more score diff per bot than those you can easily hit. So if we were able to hit adaptive movement better, in melee, the score improvements should be noticeable.

Also melee adaptive movement is growing in popularity — virtual guns with swarm targeting will one day be an essential part of state-the-art bot.

Xor (talk)04:05, 2 January 2018

Combat uses oldskool GF with swarm targeting in melee.

Uses a disabled dimension to account for disabled bots. And uses data decay to account for adaptive movement.

MN (talk)02:39, 5 January 2018

Well that seems a good alternative to VGs in melee

Xor (talk)15:12, 6 January 2018
 
 
 

I am thinking about implementation of hit rate time derivative metric against adaptive bots. What I see that at the beginning the circular gun is quite good against plenty of good and even top bots. But then it contaminates hit stats, i.e. adaptive bots are not hit by the circular gun anymore but other guns still have low but steadily improving hit rates.

Hit rates can be compared only among the last N tics, which would somewhat mitigates this. But it has no predictive power to see the gun which would be the best in the next round.

Beaming (talk)01:06, 3 January 2018

Interesting found! Maybe we could use knn to predict hit-rate in melee, just as bullet power is predicted in 1v1.

Take time, bots left and more into account, then maybe you can predict your hit-rate pretty well, and choose guns wisely.

Xor (talk)15:16, 6 January 2018