gun tuning tangent

Jump to navigation Jump to search
Revision as of 11 July 2012 at 16:22.
The highlighted comment was created in this revision.

gun tuning tangent

Man, I'm so relieved to finally have a nicely tuned gun in 1.7.47. I hit several weird hurdles along the way that had me really confused / annoyed. The whole time, I knew it wouldn't even gain me many points, but all I wanted was to find some small gains and get warm fuzzies about my gun being nicely polished. =)

Now that I have that figured out, I'll just re-tune the perceptual gun against the same bots, hope I don't lose much or maybe even gain a little, and move on with my life. =)

The hurdles, if anyone's curious:

  • Made a new version of TripHammer updated to Diamond's current code base, which has changed a lot of nitty gritty data processing stuff.
  • My genetic algorithm code for the "fading KNN" was setting the parameters related to "size of k" on the wrong Classifier, so they were producing jibberish (had no impact on fitness) for several versions of Diamond.
  • My KNN classifier (basically the WaveSim version of Diamond's gun) was multiplying the scan weight to the value I pass to Math.exp, instead of the result of Math.exp. No idea how/when that happened, but it sure made me feel stupid.
    Voidious20:25, 10 July 2012

    It's so strange, I found, once I add an attribute it doesn't really matter how much it is weighted (within an order of magnitude or so), I still get around the same results for gun accuracy. The biggest gains I had from genetic tuning was adjusting the speed that the 'time' attribute increased, and even then once it was in the right ballpark there was very little to choose between them. Still, it does help to squeeze that extra 0.1% out =)

      Skilgannon22:17, 10 July 2012

      Hmm, is it that strange though? You have enough good attributes already that the new attribute likely correlates to a significant degree (but not entirely) with one or more of them, which I'd expect to make it so it wouldn't change which points are closest when it's weighting is only changed a small amount.

        Rednaxela14:10, 11 July 2012
         

        True. I really need to PCA the data that gets generated by a typical battle. There must be an input transformation which can eliminate a bunch of the dimensions.

          Skilgannon14:14, 11 July 2012
           

          Attribute weighting is probably one of the things in Robocode that has received the most attention vs what it deserves. =) Sort of like dynamic segmentation, which used to get tons of focus, but is IMO much more elegantly implemented with KNN. I think it's worth having them tuned, but for example, Gilgalad is a super strong bot and recently got the exact same score when he removed his gun weights.

            Voidious15:39, 11 July 2012
             

            My 5 cents mainly for newbies and future readers. Tomcat (a little more, than super strong bot:)) also does not use weights in knn-gun and, by definition, in RS-movement

              Jdev16:01, 11 July 2012
               

              My thoughts with PCA would be that we could eliminate a large number of the dimensions stored in the tree by only taking the X main components, and make a transform which combines a large number of measurements from all sorts of things which aren't even very useful and turn them into a much more information-dense, lower dimension location. This would save on memory as well as search time while still keeping pretty much exactly the same results.

              I agree that far too much effort has been put into refining weights, but it does have its place for ekking out that extra little bit of performance against a known population.

                Skilgannon16:42, 11 July 2012
                 

                Obviously I agree it's worth some effort, if you check my recent version history. =) It's a very obvious and easy knob to fiddle with. And I can see pretty clearly with WaveSim that there are accuracy gains that can come out of it.

                The PCA stuff sounds pretty interesting. I think it went a bit over my head in my Machine Learning class (though I understand the basic idea).

                I think another big factor is that there's so much variance in hit rate, and so much score coming from movement and survival, that increasing accuracy beyond a certain point just doesn't translate into very many rumble points. The best of guns can miss 10 shots in a row and force you to rely on good movement and energy management. It's still fun though. =)

                  Voidious16:53, 11 July 2012
                   

                  My current view is that movement and targeting inextricably linked with each other and it's impossible to say which part of points come from movement and gun. I think, that both statemets are correct:

                  • good gun gives less chances to enemy to hit you (so less score for enemy and more bullets for you, so more score to you), because steal his energy
                  • good movement gives less chances to enemy to hit you (so less score for enemy and more bullets for you, so more score to you), because steal his energy.

                  It's system of equal partners, imho for last few weeks:)

                    Jdev17:10, 11 July 2012
                     

                    And a little offtop: also, imho for last few weeks, that statistical targeting is impasse (deadlock?) and next breakthrough may be in single tick playing forward. Especially in the light of the fact that totally annihilate of weak bots is more important, that destroy strong bots.

                      Jdev17:22, 11 July 2012