XanderCat

From Robowiki
Revision as of 03:10, 23 July 2011 by Skotty (talk | contribs) (→‎Series 6.x: added version 6.8 notes)
Jump to navigation Jump to search


XanderCat
Author(s) Skotty
Extends AdvancedRobot
Targeting GF / Linear / Circular / Anti-Mirror
Movement WS(Go-To) / Anti-Mirror / RamEscape
Best Rating #48 (v 6.5)
Current Version 6.5
Code License GCWCD
Download

Introduction

MegaBot based on my "Xander" robot framework with pluggable guns, radars, and drives. XanderCat is the flagship of my robot fleet. It is a multi-mode robot using multiple guns and drives, but it's main drive is a Go-To style wave surfing drive I call the Evolution Drive, and it's main gun is a guess factor gun.

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: Nothing specific, but still need to improve against the middle pack.

Arch Nemisis: lazarecki.mega.PinkerStinker 0.7

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                REM Drive Selector
                                                         /-------^--------\
                                          Simple Targeting Drive    Evolution Drive

Gun Tree:

         Opponent Disabled Check
       /-----------^------------\ 
 Head-On Gun         Bullet Shield Protected Wrapper
                                  |
                         Ram Escape Selector
                         /--------^--------\
                   Linear 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.

Note: Starting from version 6.4 onward in the table, I am ignoring nat.BlackHole 2.0gamma and nat.Samekh 0.4, as scores against them always fluctuate rather wildly.

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
6.1.8 59 / 806 (76.65 APS) 7.3% cx.Princess 1.0 47.8 -> 65.1 toz.Gnome 1.1 88.4 -> 61.6
6.2 59 / 806 (76.84 APS) 7.3% nat.BlackHole 2.0gamma 42.1 -> 67.0 stelo.RamTrackSurfer 1.2 89.2 -> 72.9
6.3 56 / 806 (77.04 APS) 6.9% kid.Gladiator .7.2 47.7 -> 65.5 nat.BlackHole 2.0gamma 53.4 -> 33.3
6.4 51 / 806 (78.22 APS) 6.3% dmp.micro.Aurora 1.41 62.1 -> 79.1 myl.micro.NekoNinja 1.30 77.3 -> 61.3
6.5 48 / 808 (78.70 APS) 5.9% ncj.MoxieBot 1.0 76.9 -> 92.6 bayen.nut.Squirrel 1.621 89.3 -> 74.9
6.7 45 / 807 (79.17 APS) 5.6% apv.ScruchiPu 1.0 57.9 -> 79.5 trab.nano.AinippeNano 1.3 91.4 -> 74.7

Version CPU Usage

All values are averages in milliseconds with the exception of those listed as Peak values, which are the maximum time in milliseconds encountered during a typical 35 round battle.

Version Gun Gun Peak Drive Drive Peak Drive Array Select Drive Hit Logging Drive Predictions Drive Adjustments Drive Rolling Avgs
6.5 1.01 13.41, 8.77, 8.41, 7.15, 6.94 0.21 7.70, 7.61, 6.93, 6.93, 6.49 1.19 (5.53 peak) 0.02 (0.04 peak) 0.88 (6.77 peak) 0.09 (1.51 peak) 0.07 (0.89 peak)

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.

Series 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).

Version 6.1.8

Changes from previous version:

  • Fixed bug related to firepower auto-adjust introduced in version 6.1.3 (the firepower change in 6.1.3 fixed one bug but introduced another).

Version 6.2

The biggest of the bugs are finally fixed (with a few minor exceptions). I am now terribly tired of chasing bugs, so I have decided to finally release a new feature/tuning version. My next features/tunings I will be adding one at a time (one per version) to get a better feel for the net effect of each is.

Changes from previous version:

  • Update Evolution Drive to re-compute where to go for a wave if the opponent does not follow it's predicted path within a certain threshold. This change is targeted at improving distancing.

Version 6.3

Changes from previous version:

  • Change how Evolution Factor Array Processor builds and selects its array to surf. The revised system will choose the best segmented array with data, or if no segmented arrays have data, an unsegmented array is used. Chosen array then has a small amount of head-on avoidance added to the selected array (currently the equivalent of 1/8 of what gets added for a bullet hit).
  • Update the algorithm for how much weight is added to neighboring segments for a bullet hit. This is not a radical change, so I am lumping it in with the other factor array changes rather than releasing as a separate version.

Version 6.4

Changes from previous version:

  • Again revised how the Evolution Factor Array Processor builds and selects its array to surf.
    • Adding weight to neighboring segments has been removed for now, due to unresolved performance issues.
    • Bins no longer range from 0 to 1. Reverted to strategy of letting bins grow unrestricted and dividing values by segment visit count.
    • Head-on avoidance is only used when no segmented array has data.

Version 6.5

Changes from previous version:

  • Added targeting detectors to the Evolution Drive. For this version, there are two targeting detectors: one for head-on, one for linear. These detectors keep a ratio of how many opponent shots appear to be of the type being detected. Whichever has a higher ratio is used as the base load array when no segments have data. Head-on is used by default if neither has a higher ratio. The base load of one or both is also added to segmented arrays when the detection percentage exceeds a certain threshold. This change should help maximize scores against simple linear targeting robots.
  • Bullet Shielding Protected Gun updated to work against opponents who use bullet shielding while on the move.
  • Bullet shielding threshold adjusted slightly to reduce false positives on bullet shielding detection.

Version 6.6

This version was not released.

Version 6.7

Changes from version 6.5:

  • Changed number of drive bins from 87 to 67.
  • Changed drive segmentation:
    • Removed Bullet Travel Time Segmenter.
    • Reduced slices in Defender Speed Segmenter from 6 to 3.
    • Added Defender Acceleration Segmenter (3 slices).
    • Added Defender Time Since Last Velocity Change Segmenter (6 slices).

Version 6.8

Changes from previous version:

  • Eliminated statistics decay from drive (no "rolling"). Previously decay was 5% per wave. Despite what others have said about rolling averages, all of my current test beds suggest that performance declines as decay rate increases. Removing the decay also reduces the CPU usage.

Version 7.0 (Future Version)

Changes from previous version:

  • Drive parameters (including what segmenters are used) will be tuned against a test bed of robots.
  • An effort will be made to make slow parts of the code operate more efficiently.
  • General code cleanup.
  • Gun improvements?

And Beyond...

Some day I will look into improving my main gun again. As you might guess from my robot history, I believe the drive is more important than the gun. But I know there is room for improvement on the gun, and I haven't touched it in quite some time.