Difference between revisions of "XanderCat"

From Robowiki
Jump to navigation Jump to search
(→‎Version 6.x: version 6.1.5 and 6.1.6 notes)
(→‎Version 6.x: Version 6.1.7 notes)
Line 408: Line 408:
 
Changes from previous version:
 
Changes from previous version:
 
* Improved diagnostics.  This version should clean up all the diagnostics files from the previous version and output far fewer new ones (this time, it should only output diagnostic files when something appears to be wrong -- the previous version was supposed to do this, but had a small bug that caused it to not work correctly).  Also fixed the output of hit ratio in the diagnostic files.
 
* Improved diagnostics.  This version should clean up all the diagnostics files from the previous version and output far fewer new ones (this time, it should only output diagnostic files when something appears to be wrong -- the previous version was supposed to do this, but had a small bug that caused it to not work correctly).  Also fixed the output of hit ratio in the diagnostic files.
 +
 +
=== Version 6.1.7 ===
 +
 +
Changes from previous version:
 +
* Implemented work around for [http://sourceforge.net/tracker/?func=detail&aid=3312402&group_id=37202&atid=419486 Robocode bug #3312402].
 +
* Removed old diagnostics code, with the exception of the part that removes the old diagnostic files (this version will clean out all the old saved data files).

Revision as of 03:42, 14 July 2011


XanderCat
Author(s) User:Skotty
Extends AdvancedRobot
Targeting GF / Linear / Circular / Anti-Mirror
Movement WS(Go-To) / Anti-Mirror / RamEscape
Released 2011-5-20 (v 1.0)
Best Rating #49 (v 5.1.1)
Current Version 6.x
Code License None
Download

Introduction

MegaBot based on my "Xander" robot framework with pluggable guns, radars, and drives. XanderCat is the flagship of my robot fleet.

Versions up through 2.1 and from 3.1 onward are handcrafted without borrowing code from other robots. Version 3.0 uses a variation on the Wave Surfing drive from BasicGFSurfer, but a wave surfing drive of my own design is used in version 3.1 and beyond. XanderCat could be made smaller by removing unused Xander components and taking advantage of some of the newer classes like Rules, but it's so far above the next smaller weight class that it doesn't really matter.

Best against: Any robot that spends too much time standing still, going straight, going in circles, or doing basic mirroring.

Worst against: Always seem to have trouble with BlackHole 2.0gamma

Past Version Notes: For information on versions prior to the current series, see the XanderCat/History page.

Drive Tree:

               Ram Escape Selector
          /-------------^-----------\
  Ram Escape Drive         Anti-Mirror Selector
                      /-------------^-------------\
            Anti-Mirror Drive         Active Bullet Waves Selector
                                 /----------------^--------------\
                     Ideal Position Drive              Leadoff Drive Selector
                                                         /-------^--------\
                                          Simple Targeting Drive    Advanced Stat Drive

Gun Tree:

         Opponent Disabled Check
       /-----------^------------\ 
 Head-On Gun         Bullet Shield Protected Wrapper
                                  |
                         Ram Escape Selector
                         /--------^--------\
                   Head-On Gun       Anti-Mirror Selector
                                     /--------^----------\
                         Anti-Mirror Gun            Virtual Hit Ratio Selector
                                        /-----------/----------^-----\--------------\
                                 Linear Gun     Circular Gun      Stat Gun*     Advanced Stat Gun                       

Version Notes

Version Ranks

Note: Best Change and Worst Change are the change from previous version against the given opponent.

Version 1-on-1 Rank Top Best Change % Score Change Worst Change % Score Change
1.0 ~475 / 805 59% N/A N/A N/A N/A
2.0 386 / 806 48% mld.Wisdom 1.0 4.18 -> 76.13 SuperSample.SuperCrazy 1.0 61.97 -> 37.00
2.1 320 / 805 40% dz.MostlyHarmlessNano 2.1 20.90 -> 63.01 jf.Dodger 1.1 78.98 -> 41.10
3.0 148 / 805 18% gg.Wolverine 2.0 41.08 -> 94.57 xiongan.Xiongan 1.1 100.0 -> 74.39
3.1 145 / 804 18% zyx.nano.RedBull 1.0 53.4 -> 85.3 pulsar.PulsarNano 0.2.4 89.3 -> 64.2
3.2 116 / 806 14% ags.polished.PolishedRuby 1 28.5 -> 83.5 rsim.micro.uCatcher 0.1 91.7 -> 31.8
3.3 115 / 806 14% nat.Samekh 0.4 24.9 -> 64.9 simonton.micro.GFMicro 1.0 62.2 -> 39.2
3.4 85 / 806 11% dsx724.VSAB_EP3a 1.0 67.2 -> 93.4 intruder.PrairieWolf 2.61 65.6 -> 48.4
3.5.1 94 / 805 12% rsim.micro.uCatcher 0.1 21.3 -> 96.4 nat.BlackHole 2.0gamma 69.2 -> 42.5
3.8 81 / 805 10% synapse.rsim.GeomancyBS 0.11 36.5 -> 49.8 mn.Combat 1.0 80.1 -> 60.8
3.9 75 / 805 9.3% pez.mini.ChironexFleckeri 0.5 42.2 -> 64.9 rsim.mini.BulletCatcher 0.4 57.7 -> 7.0
4.0 92 / 805 11% rsim.mini.BulletCatcher 0.4 7.0 -> 72.1 nat.Samekh 0.4 73.3 -> 45.2
4.1 74 / 805 (73.66 APS) 9.2% nat.Samekh 0.4 45.2 -> 75.7 staticline.whiskey.Whiskey 0.6 75.5 -> 57.5
4.2 74 / 805 (73.73 APS) 9.2% mladjo.iRobot 0.3 53.8 -> 69.9 jcs.AutoBot 4.2.1 60.1 -> 35.1
4.3 74 / 805 (73.92 APS) 9.2% kc.mini.Vyper 0.311 33.0 -> 53.0 positive.Portia 1.26e 60.0 -> 36.2
4.4 71 / 805 (74.11 APS) 8.8% pez.frankie.Frankie 0.9.6.1 45.9 -> 62.8 fromHell.CHCI3 0.1.4 74.4 -> 55.7
4.4.1 71 / 805 (74.11 APS) 8.8% brainfade.Fallen 0.63 45.7 -> 65.5 jam.micro.RaikoMicro 1.44 64.0 -> 49.8
4.5.1 71 / 805 (74.25 APS) 8.8% spinnercat.CopyKat 1.2.3 51.6 -> 69.3 synapse.rsim.GeomancyBS 0.11 54.4 -> 38.6
4.6 71 / 805 (74.35 APS) 8.8% deo.virtual.RainbowBot 1.0 54.8 -> 69.1 jab.DiamondStealer 5 80.6 -> 61.7
4.8 57 / 803 (76.46 APS) 7.1% ar.QuantumChromodynamics 1.2.1 69.2 -> 90.5 nat.BlackHole 2.0gamma 60.8 -> 42.0
5.0 70 / 805 (74.37 APS) 8.7% deo.FlowerBot 1.0 53.4 -> 84.6 kcn.unnamed.Unnamed 1.21 79.1 -> 58.0
5.1 49 / 815 (78.59 APS) 6.0% ary.SMG 1.01 35.5 -> 90.3 nat.BlackHole 2.0gamma 54.4 -> 33.0
5.1.1 49 / 815 (78.75 APS) 6.0% rz.Apollon 0.23 69.6 -> 94.0 nat.Samekh 0.4 72.7 -> 53.6

Series 1.x

This series of robots was released while work on the Xander framework was still ongoing. Targeting and drive strategies were somewhat simple. No surfing or guess-factor targeting.

Series 2.x

This series introduced my earlist concept on guess factor targeting. Drive strategy was still simple.

Series 3.x

This series introduced wave surfing, and improvements to the guess factor gun. Version 3.0 used a modified version of the BasicGTSurfer wave surfing drive as a reference point, with all later versions in the line using a wave surfing drive of my own design. Towards the end of this line, I introduced virtual hit ratios, where all guns would provide aiming information for every shot to determine whether or not their aims would have hit the target or not.

Series 4.x

This series focused largely on drive improvements, including improvements to the wave surfing drive, dive protection, and a new Ram Escape drive. This series also improved how fire power is selected.

Series 5.x

This series focuses on using a new strategy for calculating factors in guess factor guns and wave surfing drives, surfing multiple waves simultaneously, paying more attention to robot width, improving wall avoidance, and improving segmentation selection and processing.

Version 5.0

Changes from the previous version:

  • Fixed bug in code that selects whether to proceed clockwise or counter-clockwise when surfing a new wave. It was looking at clockwise/counter-clockwise from the 0 factor, when it should have been looking at clockwise/counter-clockwise from the current factor at time wave surf begins.
  • Original dive protection replaced by new means for calculating danger in each orbital direction (see next two bullet points).
  • Whether or not XanderCat chooses to go clockwise or counter-clockwise now takes robot "factor width" into account when calculating danger in each direction.
  • Final choice of whether to go clockwise or counter-clockwise now goes by factor of least danger first, unless the difference clockwise vs counter-clockwise is less than a certain percent, in which case the average danger in each direction is used (and if those are close too, direction is randomly chosen).
  • XanderCat now surfs up to 2 waves at once. When surfing 2 waves, the closest wave is weighted at 75%, with the second wave weighted 25%.
  • Fixed issue with enemy bullet firing not being detected when it happens at same time enemy is hit by bullet.
  • Take robot width into account for determining when enemy bullet waves hit and when they are passed.
  • Distancing maximum "retreat angle" increased from 45 to 60 degrees (helps maintain distance when robots are moving parallel to each other).
  • Relative Direction Segmenter now treats holding still as it's own segment.
  • For kicks, I now use fire power 1.95 on FlowerBot.
  • Added option in advanced stat drive to paint the factor arrays for all dimensions (segment combinations) for the current enemy bullet wave.

Tuning Parameters for 5.x / Where To Improve?

I fully expect 5.0 to faire worse than 4.8, but this is due mainly to insufficient tuning, as I am a firm believer in the improvements for the 5.x line. Some tuning parameters include:

  • Factor array initialization. Version 4.8 weighted head-on rediculously high for most segment combinations, whereas 5.0 weights them more along the lines of the original intent (base initialization equivalent to 3 hits head-on for every segmentation combination). However, I suspect the heavy weighting in version 4.8 is part of the reason behind it's success in climbing the ranks as high as it did. As such, I will likely boost the base initialization, but to what extent, I do not yet know.
  • Surf wave weighting. Version 5.0 weights the next wave to hit at 80% significance, and whatever the wave is after that at 20% significance. This was a gut feeling choice and likely needs tuned.
  • Implicit dive protection. Version 5.0 relies on taking robot width into account to avoid diving too close to opponents, but I'm not yet convinced it is doing a good enough job, as it still gets closer than I'd like. It may need some adjustment.
  • Segmentation. I think there is still room to improve here. I can run all kinds of different segmenters in combination, I can exclude various combinations I feel are not valuable...all the core functions are there. But I do not yet feel as though I have found the best combinations to utilize, and I'm still not sure what the best way is to pick a particular combination (right now it just chooses the highest/lowest factor of any non-excluded combination of segmenters). Perhaps there is a way to better detect which combinations have patterns and which are just static. And I've been interested in trying segmenters that take my own robot's state into consideration (rather than the opponent's state), something I have never tried before. And I've also debated letting segment hits bleed over into neighboring segments (could be a good idea if there are a lot of segments, though would likely be processing intensive)
  • Rolling history. I've built rolling history support into the drives, guns, and other statistics like hit ratios, but I've never really tried to tune them. Right now, the drive and gun history rolling is set very high, such that it is not much different than not rolling at all. Might there be an identifiable type of opponent where it would be beneficial to roll history to different amounts?
  • What haven't I thought of? Some top robots have scores against other robots that seem almost magical. It could be some type of segmentation that works well that I haven't tried. What else could it be? Maybe I will have an "a-ha" moment that will give me new insight.

Version 5.1

Changes from the previous version:

  • Changed how factor indexes are calculated to take bullet speed and surf direction into account. This is more in line with how most wave surfing drives operate. I believe this should be superior to my previous approach.
  • Removed Relative Direction Segmenter, as relative direction is now built into the factor processing system.
  • Temporarily disabled ability to surf 2 waves at once. Given the changes to the factor processing, this feature needs a good shakedown before I put it back into service.
  • Fixed issue where opponent position was not predicted into the future when calculating distance to opponent at different factors. This means taking robot width into account for things like implicit dive protection was partially broken.
  • Fixed problem with matching bullet waves for bullet-hit-bullet events.
  • Fixed bug in code that calculates factor range for robot width.
  • Implemented danger increasing multiplier when robot is at close range.
  • Switched from "Go To" surfing which updates only when a enemy bullet wave enters or leaves the scene to updating every 2 ticks (or when a enemy bullet wave enters or leaves the scene).

Version 5.1.1

Changes from the previous version:

  • Fixed bug where robot width was not taken into account when predicting how far a robot could travel before bullet wave hits.
  • Ram escape drive is now triggered at greater distances the more the ram escape drive gets utilized.
  • Ram escape drive now uses linear gun instead of head-on gun at close range.
  • Ram escape drive now waits for bullet wave to be fully passed before changing dodge direction.

Version 5.2

Changes from the previous version:

  • Auto-flattening enabled again. This time it activates after round 4 if opponent's hit ratio exceeds 17%.
  • Trying out distance segmenter in place of bullet travel time segmenter for drive.
  • A few various updates to things involving simple targeting, though not expecting much change from any of them. Some of them only effect extreme corner cases that generally only come up under artificial testing scenarios.
  • Various changes and additional features for testing and experimentation added, though none of them are turned on. Nevertheless, with the changes in the code base, there could be some bugs or unintended side effects.

Version 5.2.1

Changes from the previous version:

  • Seeing what happens when I use absolute bearing and surf direction from 2 turns ago instead of 1. This little test is prompted by information on the Wave Suffering page.

Version 6.x

XanderCat series 6 focuses on taking everything learned so far and evolving it into a new set of components, or at the very least, cleaning up old components or features that did not work out. Series 6 introduces the new Evolution Drive, an updated Wave Surfing drive, and new ways of handling factor arrays. Series 6 may also see some gun changes, and if I have the time, maybe a first debut into the melee arena, but that is a secondary goal.

Version 6.0

Changes from previous version:

  • XanderCat now uses an Evolution Drive. This is a new Go-To style wave surfing drive based on everything I have learned so far in my drive development. It no longer uses an orbital drive approach. Instead, it drives directly to the point it wants to be at for each wave. This means it also no longer uses wall smoothing, as this direct drive approach never attempts to take it out of bounds. However, orbital and wall smoothing code is still used for predicting opponent paths.
  • Drive bounds changed from standard rectangle to a rounded rectangle.
  • Fixed bug in drive path predictor that occasionally caused incorrect choice of whether to use acceleration or deceleration rate.
  • Reverted prior change to test using absolute bearing and surf direction from 2 turns ago instead of 1, as it really had no discernible effect and just made the code more complicated.
  • Due to the use of the new drive, and the fact that my old flattening had a broken implementation anyway, drive flattening is once again NOT being used.

Note: Originally, version 6.0 was slated to use a new factor array system. However, to get a better feel for the effects of the new drive vs the new factor array system, the new factor array system has been has been rescheduled for version 6.1.

Version 6.0.1

Changes from previous version:

  • Fixed bug where XanderCat would get stuck at the edge of the drive bounds when attempting to retreat from robots who like to fight close.

Version 6.0.2

Changes from previous version:

  • Fixed bug in bullet history code that could result in a NullPointerException when bullet wave cannot be matched up with an actual bullet during a bullet-hit-bullet event. Note that this is a side effect of another bug, the fact that a bullet wave cannot be matched up in the first place, which has not been fixed (but that bug doesn't cause a robot execution crash). Not being able to match a bullet wave may be occurring with bullets fired on robot death tick; this scenario has not been addressed yet.

Version 6.0.3

Changes from previous version:

  • Fixed a long-standing bug in circular gun where a robot with velocity 0 would cause calculation to fail and a null aim to be produced (I only recently figured out what the cause was). Somewhat recently, this has resulted in occasional NullPointerExceptions in places where I wasn't careful to check aim for null. Now I shouldn't have to worry about it anymore.
  • Evolution Drive now continues surfing after opponent death until all opponent bullet waves are cleared.
  • Switched DistanceSegmenter back to BulletTravelTimeSegmenter in the drive segmentation. I was trying out a DistanceSegmenter in one of the last 5.x versions. I meant to switch it back for version 6.0, but forgot until just now.

Version 6.1

Changes from previous version:

  • Testing out new factor array processing system. This new system is different from the old system in several ways:
    • Bin values now range 0 to 1.
    • Old values in bins decay on every wave to 90% of their previous values.
    • When weight is added to a bin for a segment combination, neighboring segments also have weight added to them (albeit a lesser amount).
    • Battlefield conditions such as robot width are taken into account when choosing a best segment combination.
    • Head-on base load array is used when segment arrays are mostly empty, but is no longer added to arrays that contain data.

Version 6.1.1

Changes from previous version:

  • Finished code that spreads hit data across neighboring segments (previous means was a temporary implementation that was sloppy).
  • Changed number of segments in the Defender Speed Segmenter from 4 to 6.

Version 6.1.2

Changes from previous version:

  • Improved efficiency of determining reachable factor ranges for the Evolution Drive. More efficiency improvements are needed, but I want to see if this changes performance or not. <-- NOT, though it's still a worthy cause...

Version 6.1.3

Changes from previous version:

  • Fixed two obscure places where a NullPointException could potentially occur. One in the SimpleTargetingDrive, which doesn't get used much, so isn't a big deal. The other in the code that handles virtual guns (virtual hit ratios), which I hope is the last significant mystery bug.
  • Fixed issue where the power selector was not allowing framework to auto-adjust bullet power at low energy levels.

Version 6.1.4

Changes from previous version:

  • I now suspect there is an infinite loop occurring somewhere in the code base. This version implements an infinite loop detector in every while loop throughout the code base to attempt to isolate the trouble area and prevent possible client hangups. The infinite loop detector will throw an InfiniteLoopException if the loop exceeds a certain number of iterations. This exception should then be caught and logged to file by the main robot Exception catch block.

Version 6.1.5

Changes from previous version:

  • Added additional diagnostics. Some round information is written to file for each round.

Version 6.1.6

Changes from previous version:

  • Improved diagnostics. This version should clean up all the diagnostics files from the previous version and output far fewer new ones (this time, it should only output diagnostic files when something appears to be wrong -- the previous version was supposed to do this, but had a small bug that caused it to not work correctly). Also fixed the output of hit ratio in the diagnostic files.

Version 6.1.7

Changes from previous version:

  • Implemented work around for Robocode bug #3312402.
  • Removed old diagnostics code, with the exception of the part that removes the old diagnostic files (this version will clean out all the old saved data files).