Virtual Guns with Swarm Targeting?

Jump to navigation Jump to search
Revision as of 2 January 2018 at 03:05.
The highlighted comment was created in this revision.

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
         

        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
             

            I don't believe that any common targeting can outperform PIF in melee, and that's why virtual guns won't improve your gun. Of course there are special cases, e.g. I think Portia has a feature that it treats disabled bots differently, and that might be a useful improvement compared to mere PIF.

              Cb (talk)11:32, 1 January 2018

              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 ome day be an essential part of state-the-art bot.

                Xor (talk)04:05, 2 January 2018