[Home]VirtualGuns

Robo Home | Changes | Preferences | AllPages

Difference (from prior major revision) (no other diffs)

Added: 62a63
* I understand what you're saying, but I have to ask - when would this ever be preferable to just choosing the best of all your guns? Do you really want to penalize choosing your best AntiSurfer gun by grouping it with your worst AntiSurfer gun in terms of VG rating? Also, I think it's really hard not to lose performance as you add more guns to a VG; often, it's best to cut the weaker guns even if they are better sometimes, because your chooser will never be perfect. -- Voidious

/Help - /CodeSnippets - Discussions /AsOf20060129

What is VirtualGuns?

VirtualGuns is a way to choose the best aiming method against a given enemy by keeping track of each methods' virtual hit rate (or some other measure). There are obvious advantages:

What are the advantages

Disadvantages

How does it work?

Marshmallow was my first bot using VirtualGuns (ehh, it was my first bot, period). It uses the following strategy for this:
  1. Everytime the robot is ready to shoot it creates an array of virtual guns and aims each of them
  2. When firing it stores this virtual gun array in an event
  3. The event's test() method checks wether a particular virtual gun has either hit or missed (using Waves).
    1. Statistics are updated for each gun which has either hit or missed
    2. When all guns are finished the event is deregistrered and the virtual gun array is disposed.
Note that there's no event handler for this event. I only use it to store the copy of the virtual guns array and to get Robocode to run the test each tick. Like VirtualBullets/VirtualBulletsBot does. -- PEZ

What bots are using this?

Please add relevant bots to this list.


One detail that I think makes sense is this: weight your VirtualGuns data (hits and misses) proportional to the difficulty of hitting the enemy in that situation. For instance, 12.5% vs 12% at distance of 500 is the same ratio as 25% vs 24% at a distance of 250, but if you have an even number of data from each distance, the latter has more effect on that calculation, while it should be the same. So far, I've been weighting my VirtualGuns data proportional to distance, but I'll be making it bullet time (slightly more accurate) and total reachable escape angle (which I already calculate precisely in Dookious). -- Voidious

Sounds reasonable. Would it also be helpful to take into account the percent of maximum escape angle taken up by the bot at each distance? -- Simonton

The above two factors are actually my attempt to calculate exactly what you said - the average hit rate for RandomTargeting in that situation = exactly proportional to bot width / total escape angle. That percentage is proportional to both bullet time and the total escape angle. Can you think of any other factors? I would definitely add them if I knew them, but I think those two paint the whole picture. -- Voidious

If your escape angle calculation takes into account wallsmoothing, then I can't think of anything else. -- GrubbmGait


Has anyone tried VirtualGuns within VirtualGuns? I think this could be effective against surfers, because your anti-surfer VirtualGun? could choose between pattern-matching, a small DC gun, a lightly segmented GF gun, etc, and your regular gun could be just one, big GF gun. You can choose between your array of anti-surfer guns (which are treated as one gun by the 'main' virtual gun system) and your main gun using gun stats that have a very high rolling depth, but between the anti-surfer guns with a low depth. Because surfers constantly evolve their movement, at different points their movement might be more susceptible to different types of guns. -- Skilgannon


Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited September 30, 2007 20:00 EST by Voidious (diff)
Search: