From Robowiki
Jump to navigation Jump to search

This page provides version notes for XanderCat prior to the current major version.


Version 1.0

Based on a not-quite-complete Xander framework. Uses BasicRadar, OrbitalDrive, and a CompoundGun combining a CircularGun and a LinearGun.

Version 2.0

This version adds a StatGun to the CompoundGun (in order, the CompoundGun will consist of a StatGun, CircularGun, and LinearGun). The StatGun is a "Guess Factor" gun of my own design. I don't call it "Guess Factor" because, frankly, I hate that term. The stat gun supports variable configuration, with interchangable Segmenter modules. Version 2.0 uses a CompoundSegmenter, which combines a BulletTravelTimeSegmenter and a RelativeDirectionSegmenter. This segmenter combination categorizes the statistics based on approximate time it takes bullet to reach opponent and opponent heading relative to self.

Version 2.1

Version 2.1 adds better gun selection, tweaked parameters for firing, driving, and stat gun segmenting. For the driving, it drops the "inverse gravity bullet dodging", as it assumes opponents are using head-on or linear targeting, which likely causes worse performance against opponents using guess factor guns. Instead, it just randomizes movement a little more.

Version 3.0

This version drops the Orbital Drive, and instead uses a Wave Surfing drive based on the drive used by the BasicGFSurfer. This means I cannot credit myself entirely for this version, as I am using a modified version of a previously existing Wave Surfing drive. This version will serve as a reference point for my next version, which will use a Wave Surfing drive of my own design.

Version 3.1

Switched to using my StatDrive for driving, a form of wave surfing drive of my own design. This drive has not been tweaked yet, but seems to be doing it's job well so far. Will be interesting to see how it compares to version 3.0 in the rumble. This version also takes advantage of the ability to paint on the battlefield (very cool!), though it is disabled in the packaged form. It also benefits form a few minor tweaks to the Xander framework, for things like firing at enemies who are low on energy or disabled.

Version 3.2

This version has the following modification from version 3.1:

  • Flattening turned off in StatDrive
  • Now tries to better position itself on round start using IdealPositionDrive (before bullets start flying)
  • StatDrive now attempts to back away from the enemy/enemy waves if it deems itself too close
  • Anti-Mirror components added (a drive, gun, and a few other odds and ends). Bye bye PolishedRuby 1; I was tired of you wiping the floor with me. :-)

Version 3.3

This version has the following modifications from version 3.2:

  • StatDrive Flattening now auto-enables after a particular point in time if the opponent's hit ratio is over a certain threshold.
  • StatGun segmentation changed a bit; fewer relative direction and bullet travel time segments, but added a drive speed segmenter.
  • StatGun now does a better job of predicting how far an opponent can get, and only looks within that range when deciding where to fire.
  • Some other minor StatGun tweaks.

Version 3.4

Version 3.3 didn't show the improvement I was hoping for. My next step was to do some bug hunting. This has revealed a few things which have resulted in the following changes:

  • StatDrive previously would decide on where to go for a bullet wave repeatedly. While this might would seem good in that it makes it arguably more adaptable to unexpected events, that potential advantage appears to be outweighed by the "flip flopper" effect. In some cases, XanderCat would keep changing it's mind on which direction to go for a wave, making it more likely to get hit. Amusing, but not what I'm going for. To avoid this problem, I have changed it so the decision on where to go for a wave is made once, and XanderCat sticks to that decision until the next wave.
  • StatDrive would previously go to the division of least danger. I've found this to be too simple in practice. I've now changed it so it separately looks clockwise and counter-clockwise, computing the average danger in each direction, and finding the exact division of least danger in each direction. If one direction has significantly lower average danger than the other, the exact division of least danger in that direction is chosen. If the two average danger levels are close to equal, it then chooses by which individual division has the least danger. If the individual danger levels are close to equal, it then randomly decides.
  • Flattening effect has been turned off.
  • Rolling danger levels has been turned on (note: danger levels are only rolled when total danger for a segment reaches a set maximum value)
  • The number of drive segments has been reduced slightly.

Per the advice of others, I looked deeper into the performance against HawkOnFire and Barracuda. Some of the above changes are based on that. My current scores against (in my own testing) against HawkOnFire and Barracuda average about 98% and 95% respectively.

For kicks, I left on the painting features, in case anyone wants to see what I have been playing with. :-) I don't think it degrades performance too much, as most of the work happens in the onPaint method which is bypassed when not turned on the the UI.

Rumble Results

XanderCat 3.4 places 85th in the Rumble. To someone not familiar with Robocode, that might sound kind of bad. But to those who are familiar with Robocode...well, I can't speak for the rest of you, but I think it's pretty darn good. It achieves my early goal of reaching the top 100.

Version 3.5

This version has the following changes from the previous version:

  • Mostly fixed bug with gun aiming where aim was always one tick behind. Fixed this by aiming with predicted positions 1 tick into the future, though this won't be exact.
  • Future position prediction bug fixed (was not taking velocity into account when changing heading).
  • StatGun overhaul. I have attempted to make it as precise as possible. Changes to the StatGun include the following upgrades:
    • Segment "danger" is now added as a triangular region in the factors/divisions centered at exact sighting factor rather than at a fixed sighting factor (in other words, the values added to the bins approximates for the exact sighting location rather than centering at the center of the closest factor; I'd have to include a picture, as it is hard to explain). The triangular region added adjusts based on robot width (when a robot is closer, it's width causes it to span more divisions).
    • When getting the factor angle for a particular factor index, it now estimates an exact factor by considering the values in neighboring bins rather than taking the factor angle for the center of the pie slice for the factor index.
    • It now attempts to get state of opponent when my bullet wave hits them down to the partial tick.
    • Rolling history added.
  • Xander framework cleaned up and documented a little more.
  • Some segmentation changes on the StatGun. Now using lateral velocity, and wall smoothing (or wall proximity).
  • implemented a victory move when it wins. (because I can, though Robocode usually cuts the performance short)

The main purpose of this version is to see how much an improvement I can make just by polishing my guns.

Left out of this version (and possible changes for next version):

  • Drive flattening in special cases
  • Dive protection
  • The Red Eyed Monkey

Rumble Results

Version 3.5 had a couple of bugs that were causing it to crash hard. I found the bugs and updated it. Waiting to see how 3.5.1 does.

Performed worse than 3.4. The problem I believe is a combination of 2 factors -- my segmentation isn't right, and my mix of guns is throwing things off. I believe by continuing to allow other guns to fire, it is polluting the statistics of the stat gun (the stat gun still records everything, but the opponent behaves in a less predictable fasion).

Note: despite worse performance overall, performance on uCatcher improved quite a bit due to the improvements to the stat gun core.

Version 3.6

This version will include the following changes from the previous version:

  • Linear and Circular guns are only be used if their hit ratio early on is very high.
  • New higher quality segmentation processing for the guns allowing for the comparison of segment combinations on the fly (hotness!).
  • Gun segmenters in use changed to lateral velocity, bullet speed, and wall smoothing (wall proximity).

Rumble Results

No improvement overall. Improvement against the top robots, but somehow this version loses too many points against the middle of the pack. It could be the restriction of the linear and circular guns has something to do with it.

Version 3.7

This version includes the following changes from the previous version:

  • Re-worked how guns are handled in the Xander framework. The performance of all guns can now be tracked simultaneously, rather than only for the active gun. This is a big deal and should help a lot with some of my earlier troubles where gun selection was sloppy. What this means is that I no longer have to actually shoot a gun to know it's performance, and can switch between them much more intelligently.

Rumble Results

Positive movement, and highest rank yet, though only by a few places. The update in this version is brilliant, but not a silver bullet. Still a few areas I need to work on.

Version 3.8

Version changes:

  • Fire power. I haven't changed how I figure fire power since the beginning. With version 3.8, I've finally tuned it. This alone made enough of a change that I have decided to release it as a new version, without making any other changes.

Version 3.9

Changes in this version:

  • Added new gun that takes care of a problem area. The new gun specifically targets the factor the opponent was at on the previous shot.
  • Fixed bug of checking gunTurnRemaining() < really-small-number before firing (oops! it can return negative values for left turns -- need to take absolute value!)
  • Fixed bug that was making calculated timing of when my bullet waves hit the opponent inaccurate.
  • Fixed issue with hit ratio of Xander guns going down immediately on bullet fire (then back up if it hits); it now waits until the bullet either hits or misses before updating hit ratio numbers.
  • Fixed bug in wall smoothing gun segmenter.
  • Now handling bullet-hit-bullet when tracking my own bullet waves.

Areas that can still improve:

  • Stat Drive? I still don't have a good dive protection. And I could potentially employ the dynamic segmentation approach I created for the Stat Gun, and adjust the segmentation for it as well. I could also play with "flattening" again in special cases, but the approach would need to be sure-proof.
  • More analysis could improve things. Possibly changing how data points get rolled off in the StatGun and StatDrive.
  • Fire power selection might could be tuned again, but for this version I left it as is to get a better idea of how the other changes play out.

Rumble Results

Moved up in the ranks some. How much of it was my bug fixes and how much of it was the new gun is hard to say. GeomancyBS and BulletCatcher results were interesting. Possible bug causing my bot to disable? I'll have to investigate it.

LOL. No bug with BulletCatcher or GeomancyBS. My guns appear to be newly vulnerable to bullet shielding, likely due to some of my bug fixes. Pretty funny really. I will make sure it's fixed in the next version. Skotty 22:08, 13 June 2011 (UTC)

Version 4.0

Since this version goes back to working on the drive instead of the guns, and since XanderCat is quite a bit different from where it was at version 3.0, I've decided to update the major version number.

Changes in this version include:

  • "Dynamic" segmentation processing, developed originally for the Stat Gun, is now added to Stat Drive as well. This allows me to consider different segment combinations on the fly, rather than being locked into one segmentation combination.
  • Changed segmenters used in the stat drive to lateral velocity, relative direction, defender speed, and wall smoothing (wall proximity).
  • Increased stat drive bins from 47 to 87.
  • Added new bullet shielding protection gun. This gun is just a wrapper (or decorator, in GUI terms) for other guns. This gun wrapper detects bullet shielding and, when detected, shifts the position of the opponent "snapshot" a small random amount laterally (currently a distance of 5 to 10 in either direction).
  • When the opponent is in the way from reaching the "ideal position", the IdealPositionDrive now tries to drive around the opponent instead of through them.
  • Cleaned up framework in a few areas.

Version 4.1

Changes in this version include:

  • Now using a fixed bullet power instead of variable. Takes an extra variable out of the equation.
  • Fixed bug in segmentation handling in the StatDrive where segments would get used before they had enough data points.
  • Changed gun segmenters (since I switched to fixed bullet power, and one of my previous segmenters was bullet speed, I figured I might as well swap them up a bit -- changed them to match what I am currently using in the drive)

Version 4.2

Plans for this version include:

  • Update segmentation processing on the stat drive such that the no-segmentation array is always considered as an option, rather than just being used as a backup early in the game when the segments are low on data points. Will this improve my scores on the middle pack?
  • Updated fire power selection. Fire power will remain at a constant level as in the previous version most of the time, but will jump up to maximum power at very close ranges where a miss is unlikely.
  • New Ram Escape Drive added to the "drive tree". This drive engages only when in very close proximity to the opponent, and attempts to back away in an intelligent manner. It is targeted primarily at ramming robots or robots who like to crowd in as close as possible (e.g. as.xbots 1.0). At such close ranges, wave surfing is rendered ineffective, resulting in roughly 50% scores. The Ram Escape Drive intends to increase scores against such robots.
  • Fix bug where XanderCat still fires a bullet when down to 0.1 energy.

Drive tree for Version 4.2:

               Ram Escape Selector
  Ram Escape Drive               Anti-Mirror Selector
                    Anti-Mirror Drive              Active Bullet Waves Selector
                                   Ideal Position Drive                     Advanced Stat Drive

Gun tree for Version 4.2

           Opponent Disabled Check
 Head-On Gun              Bullet Shield Protected Wrapper
                               Anti-Mirror Selector
                   Anti-Mirror Gun             Virtual Hit Ratio Selector
                            Linear Gun     Circular Gun      Stat Gun*     Advanced Stat Gun                       
  • The basic Stat Gun is configured specifically to target the last guess factor where an opponent was seen.

I also plan to investigate more middle-pack opponents to try to determine where XanderCat can improve. This might result in a few other changes.

Version 4.3

Changes from the previous version:

  • Fixed issue with advanced stat gun segments not being properly balanced based on data load.
  • Advanced stat gun segments must now have a certain number of data points before being used.
  • Advanced stat gun no-segmentation array is now a valid option at all times.

Version 4.4

Changes from the previous version:

  • Finally implemented dive protection (score on Barracuda up from about 95% to about 98%).
  • Fixed bug where the number of data points for a segment in the stat gun / advanced stat gun was being calculated incorrectly.
  • Fixed bug with Bullet Shield wrapper not propagating call to initialize wrapped gun for new round.
  • Added bias to the virtual hit ratio gun selector such that linear gun is only used if it's virtual ratio is at least 5% better than the other guns. (this may be modified again before this version is released)
  • Changed segmentation on main gun and drive to use defender relative direction, defender speed (positive only), bullet travel time, and wall smoothing (wall proximity).
  • Added minor negative danger (-5% of what gets added for a hit) in the stat drive for factors when XanderCat doesn't get hit. Not sure if this is a good idea or not overall, but it makes sense to me. It means if XanderCat keeps going to the same factor, the opponent would have to get above a 5% hit ratio at that factor for XanderCat to go somewhere else. Works well on an opponent like Barracuda who might occasionally get in a lucky hit.

Version 4.4.1

Changes from the previous version:

  • Fixed bug that was causing stat gun no-segmentation array to never be used. This was rendering the basic stat gun targeting the last factor completely ineffective.
  • Fixed issue in how ram escape drive attempts to dodge bullets.

Rumble Results

Amazing how many differences there are with the "last factor" gun working again. While the last factor gun works well on certain opponents, it's presence seems to interfere with the performance of the advanced stat gun. Perhaps what I need to do is add a "bias" to the last factor gun, where it does not get used unless it's virtual hit ratio exceeds the advanced stat gun virtual ratio by a certain margin. Especially in the early rounds where the advanced stat gun is still learning.

The only other change this vesion was a change to the ram escape drive, to make it dodge bullets a little better. While this worked well on opponents like GubbmThree, it also worked a little worse in at least one case (as.xbots). I'll have to review this to see if it was just a matter of chance or if the ram escape drive needs more tweaking.

On further analysis, it appears the rank differences are not just a result of the last factor gun coming back online. It's a combination of factors that results in slightly different results against the same opponents.

Version 4.5

Changes from the previous version:

  • Xander framework updated to track rolling virtual hit ratios, configurable through the Configuration class. XanderCat makes use of this through the VirtualHitRatioGunSelector for choosing a primary gun. The VirtualHitRatioGunSelector looks at both the overall virtual hit ratio and the rolling virtual hit ratio. XanderCat currently weights the rolling ratio at 60% and overall ratio at 40% (subject to change before release).
  • Bullet fire power now ranges from 1.8 to 2.4 dependent on overall hit ratio on opponent.
  • Disabling self with bullet shot is now allowed if opponent is already disabled.

Version 4.5.1

Changes from the previous version:

  • Fixed bug where overall hit ratio was not getting carried over from round to round.

Version 4.6

This version adjusts fire power selection and focuses on improving distancing. Changes from the previous version:

  • Bullet fire power range adjusted to be from 2.0 to 2.5 (from 1.8 to 2.4).
  • Stat drive now retreats away from opponent rather than away from bullet wave when inside of optimal range.
  • Stat drive now advances on opponent some when outside of optimal range.

Opponent scan for retreat/advance is currently from the moment wave being surfed changes; it does not presently update on the fly, as the design doesn't currently support it. Nevertheless, using the opponent scan should be better than using the wave origin.

Version 4.7

Changes from the previous version:

  • Introduction of a Simple Targeting Drive, targeted primariliy at increasing scores against simple linear targeting, though it is also designed to work against head-on targeting. The advanced stat drive works fine against head-on targeting, but underperforms against simple linear targeting (achieving only around 75% against linear targeters, whereas over 90% is a reasonable expectation for an intelligent robot). Are there many linear targeters out there? Well...I know of at least one, so might as well take it into consideration. Simple Targeting Drive stays online so long at hit ratio against it does not exceed 9%.
  • Refactored a lot of my wave surfing and guess factor code to use common components where ever possible. I had already done this with Segmenters in the past, but I'm now doing it with various other tasks as well, like determining reachable factor ranges, converting between factor angles and factor indexes, distributing weight within a factor array, and choosing best factors within an array. While I could have introduced bugs by doing this, in the long run it should decrease the likelihood of bugs, eliminate code duplication, make it easier to develop new guess factor components, and reduce overall code size.

A note on distributing weight within an array:

XanderCat 4.7 uses a WeightDistributer interface for it's guess factor guns and wave surfing drives. This allows the means for weight distribution within an array to be interchanged easily. At the moment, I have 3 different weight distributers: Triangle Distributer (used in XanderCat's guns), Wave Distributer (used in XanderCat's drives), and Point Distributer (currently unused).

Point Distribution     Triangle Distribution      Wave Distribution

        X                                                  X
        X                         X                        X
        X                       X X X                    x X x
_ _ _ _ X _ _ _ _         _ _ X X X X X _ _      . x x X X X X X x x .

Version 4.7.1

Changes in this version:

  • Fixed AIOOB bug in refactored method for getting reachable factor ranges. This bug was causing XanderCat to disable periodically. By chance, I didn't run across it in initial testing.

Version 4.7.2

Changes in this version:

  • Fixed bug in calculating factor span of opponent robot body. This was hurting performance of all stat guns.
  • Fixed bug with stat guns not rolling history properly.
  • Fixed the "last factor" gun, which I broke again during the version 4.7 update.
  • Sometimes the bullet (x,y) coordinate at time of bullet-hit-bullet seems to be a tick off. I don't see any flaws on my bullet position calculations -- could this be a Robocode quirk or bug? The problem this was causing was in trying to find a matching bullet wave for a bullet-hit-bullet event. To work around this, the code for finding the matching bullet wave will now consider it a match when the distance between bullet (x,y) and calculated bullet (x,y) is slightly over the bullet velocity.

Version 4.7.3

Changes in this version:

  • Fixed bug resulting in incorrect hit ratios for XanderCat's guns. (Oops! How long has that been broken?)
  • Fixed bug in gun controller that could result in NullPointerException when looking for bullet wave for bullet-hit-bullet event.
  • Now using Head-On Gun when "ram escape" is engaged.
  • Tweaked RamEscapeDrive.
  • Reduced rolling virtual hit ratio depth to 16 shots (down from default of 30).

Version 4.8

Focus of this version is in two areas:

1) Overall performance enhancements through analysis 2) Optimizing for top scores against head-on targeters so people will quit harassing me about my wave surfing performance against Barracuda and HawkOnFire. :-P

Changes from the previous version:

  • Simple Targeting Drive selection changed up a bit (no longer leads off the battle / only engaged when deemed useful), and now only focuses on linear targeters.
  • Stat Drive factor arrays now only initialized to avoid head-on (end points are no longer weighted).
  • Simple Targeting Drive distancing changed to prefer a slightly closer distance (same distance as stat drives).
  • Now excludes certain segment combinations that just don't make much sense to use.
  • Stat drives changed to balance segments (for the sake of picking the best segment combination) based on segment visits rather than on hits in that segment (after some heavy thought, I think this is a better approach).
  • Eliminated the minor negative flattening I was trying out the last few versions in the main drive.
  • Added ability to log drive time usage throughout the battle.

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.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 6.9

Changes from previous version:

  • Fixed or improved on various issues in the drive against opponents with simple targeting strategies.

Version 7.0

This version is mostly about using the refactored and cleaned up version of the Xander framework. There should not be much change in the Rumble rank with this version. If the rank drops significantly, it means some bugs slipped through and I will need to embark on a new round of debugging.

Changes from previous version:

  • Xander framework refactoring and cleanup. XanderCat now uses the Xander framework version 1.0.
  • Drive tree changed to use separate branches for head-on and linear targeting detection rather than having that functionality jammed into the main Evolution Drive.
  • Number of Gun bins for the factor array based guns reduced from 121 to 91 (I don't think this will degrade performance, but it should help reduce turn time)
  • Further increased bullet shielding detection threshold, as it was still occasionally getting false positives.

Version 7.0.1

  • Linear and Head-On Avoidance Drives were accidentally set up without distancing. Applied same distancing to these drives as is used on the main drive.
  • Fixed issue where NullPointerException could occur in the Linear Avoidance Drive.
  • Fixed issue in Mirror Detector that was causing mirror detection to be inconsistent.

Version 7.0.2

  • Reverted back to using targeting detectors within the main Evolution Drive.
  • Adjusted various drive and gun selectors.
  • Fixed bug where head-on gun wasn't getting used for disabled opponents.

Version 7.0.3

  • Fixed bug where disabled robot gun was not getting properly initialized, resulting in NullPointerExceptions.
  • Minor change to early-game factor array initialization to be more consistent with version 6.8 and 6.9.

Version 7.0.4

  • Fix recurring exception due to how guns were set up in previous version. Not expecting this to change performance though.
  • No longer using rolling history on main gun. There wasn't much value to it and code will run faster without it.

Version 7.1

Changes from the previous version:

  • This version replaces the original main gun segmentation set with a segmentation set very similar to what the main drive uses. Specifically, the segmentation changes are:
    • Defender speed segmenter reduced from 4 to 3 slices.
    • Bullet travel time segmenter removed.
    • Defender acceleration segmenter added.
    • Defender time since last velocity change added, with time slices at 3, 6, and 9 ticks.

This version was not tested against a large sample base before release, so it was unknown whether this version would yield a higher or lower score. However, my gut told me it was the right thing to do.

Version 7.2

Changes from the previous version:

  • Try balancing factor array combinations in the main gun by dividing by the number of combined segments rather than the number of visits in the combined segments.
  • In the main gun, switched to using visit count instead of calculating factor array "load" to determine if there is enough data to use an array. This change technically should not effect score, but it should make the code run faster.
  • Required load/visits that determines whether or not there is enough data to use a factor array in the main gun reduced from 8 to 4.

Version 7.2.1

Changes from previous version:

  • Looks like dividing by the number of combined segments makes things worse. Switch back to dividing by number of visits.
  • Further reduce required visits before using a factor array from 4 to 2. A relatively low value should be optimal when version 7.3 changes are put into effect.

Version 7.3

Changes from the previous version:

  • Version 7.1 resulted in a slightly lower score than version 7.0.4 after modifying the gun segmentation. I believe this is because it gave the gun more dimensions to process, making it a slower learning gun. A solution to this problem (if I am correct) is to implement neighboring segment bleed (a term I just came up with), which may be similar to using dynamic clustering (DC), but I've never looked closely enough into DC to know for sure. The idea is, for each logged visit, instead of just adding weight to the specific segment combination for the wave, also add lesser amounts of weight to "nearby" segment combinations. I previously tried this in the drive, so it will be easy to adapt to the gun. It didn't help the drive (for whatever reason), but I think it may work much better for a gun.

Version 7.4

Changes from previous version:

  • Remove neighboring segment bleed. Effect is minimal and it's not worth the extra computing time.
  • Revert main gun segmenter back to original (as it was in v7.0.4)
  • Try increasing the significance and sensitivity of the head-on and linear targeting detectors.

Version 8.0

This version is my first stab at using a KNN approach, and initially it is used only in the drive. While I am hopeful that it will perform well, it is not an expectation, as array initialization is not well fleshed out, it does not presently use targeting detectors to modify the array, and the various adjustable parameters have not been tuned. This version is like an early beta.

Changes from previous version:

  • New KNN Factor Array Processor used in the main drive. No targeting detectors in this version. Head-on avoidance used only when no data points are available.
  • Segmenters used for new factor array processor are:
    • Defender Speed Segmenter (8 slices)
    • Bullet Travel Time Segmenter (12 slices)
    • Defender Acceleration Segmenter (currently fixed at 3 slices)
    • Defender Time Since Last Velocity Change Segmenter (slices at 2, 4, 6, 8, and 10 ticks)
    • Wall Smoothing Segmenter (currently fixed at 4 slices)

Version 8.1

This minor series (8.1.x) focuses on adding the KNN Factor Array Processor to the main guess factor gun. This involved replacing the old StatTargeter with a new GuessFactorTargeter that utilizes the FactorArrayProcessor interface for handling factor array selection, implementing the KNN Factor Array Processor as the factor array processor for the main gun, and tuning it's parameters.

Changes from previous version:

  • Use KNN Factor Array Processor in the main gun. Same segmenters as is used in the main drive. Still using TriangleDistributer for the data points.
  • A few minor changes to the KNN Factor Array Processors:
    • Points used is now further restricted by a minimum match percent. (e.g. if the desired number of points is 12 and 12 points are available, but 4 of them are under the minimum match percentage, only the closest matching 8 points are used.)
    • Artificial Head-on data point is now used up until the number of data points exceeds the set minimum (as opposed to only using a Head-on data point when no data points are available).

Version 8.1.1

Changes from previous version:

  • Adjusted KNN Factor Array Processor parameters in main gun from default to values that should work better for a gun (though may need further adjustment later):
    • Minimum data points changed from 4 (default) to 10.
    • Maximum data points changed from 18 (default) to 200.
    • Optimal data point percent of total changed from 0.08 (default) to 0.18.
    • Minimum data point match percent changed from 0.35 (default) to 0.75.

Version 8.1.2

This version relies on RoboResearch results from a custom challenge set to further tweak the gun parameters.

Changes from previous version:

  • Further adjusted KNN Factor Array Processor parameters in main gun.
    • Maximum data points reduced from 200 to 100. (may be further adjusted slightly before release)
    • Minimum data points increased from 10 to 20.
    • Minimum data point match percent reduced from 0.75 to 0.50

Version 8.2

This version focuses on tuning the KNN Factor Array Processor parameters for the main wave surfing drive (something I should have done as 8.0.x versions, but since I didn't, it will go into this version).

Changes from the previous version:

  • KNN Factor Array Processor parameters in the drive adjusted (first pass).
    • Minimum data points increased from 4 (default) to 12.
    • Maximum data points increased from 16 (default) to 50.

Version 8.2.1

Changes from previous version:

  • KNN Factor Array Processor parameters in the drive adjusted.
    • Optimal data point percentage increased from 8% to 12%.
    • Minimum match percent increased from 35% to 75%.

Version 8.3

Changes from previous version:

  • IdealPositionDrive, which was always rather crude, has been replaced with a new DistancingDrive. Like before, this drive is used whenever there are no opponent bullet waves in play. The old drive attempted to reach what it thought was an ideal position on the battlefield, but there is rarely ever enough time to achieve such position. The new drive focuses more on the short term, and just tries to achieve better distancing from it's current position.
  • Adjusted overall distancing danger amplification to go into effect at range 300 (up from 240) with significant increase at range 160 (up from 80).

Version 8.4

Changes from previous version:

  • Switched back from DistancingDrive to IdealPositionDrive. For reasons I can't even fathom, the IdealPositionDrive gives a better score in the rumble.
  • Try out a new weight distributer in the main drive. The new weight distributer is similar to the older WaveDistributer (which works basically the same way as the weight distribution in BasicGFSurfer), but creates a bulge instead of a sharp point at the index of the hit. The width and height of the bulge is determined by how many factors wide the robot width is.

Version 8.4.1

Changes from previous version:

  • revert back to original weight distributer for main drive.

Version 9.0

The changes in this version from previous are fairly extensive. Changes listed are just a quick summary.

Changes from previous version:

  • Using Xander framework 2.0.
  • Using Bullet Shadows in the main wave surfing drive.
  • Various segmenter changes.

Version 9.0.1

Changes from previous version:

  • Re-added x5 power selection from previous versions.

Version 9.1

Changes from previous version:

  • Increase the ganularity of the drive segmenters.
    • Defender Speed Segmenter increased from 8 to 12 slices.
    • Bullet Travel Time Segmenter increased from 12 to 18 slices.
    • Attacker Bearing Segmenter increased from 10 to 12 slices.
    • Defender Acceleration Segmenter unchanged (3 slices).
    • Wall Smoothing Segmenter unchanged (4 slices).
  • Re-added robot colors and changed color scheme a little.
  • A few minor adjustments to maintain compatibility with some older versions of Robocode (for RoboResearch...yeah, yeah, I should just set up RoboResearch with a newer version of Robocode :-P)

Version 9.2

Changes from previous version:

  • Replaced my old wall smoothing segmenter with a new wall stick segmenter. The new segmenter has the following advantages:
    • More slices. The old segmenter was fixed at 4 slices; the new segmenter has a variable number of slices.
    • Taking movement direction into account. The old segmenter looked at clockwise vs counter-clockwise; the new segmenter looks at forward vs reverse.
    • More efficient. The old segmenter used a robot predictor which was processing expensive; the new segmenter uses a simple wall stick approach that is quick to calculate.

Version 9.3

Changes from previous version:

  • Started using bullet-hit-bullet as valid data points for the main wave surfing drive.
  • Implemented improved algorithm for handling distancing. In addition to providing better overall distancing, this takes care of a recently discovered bug in the old system. The new system picks from a range of drive angles for distancing instead of having a fixed drive angle. For example, if the robot only has to drive a very short distance to reach the desired factor angle, it can choose to use a steeper advancing or retreating angle to get closer to the optimal distance (so long as it can still achieve the same desired facor angle).

Version 9.4

Changes from previous version:

  • Replaced DefenderSpeedSegmenter with LateralVelocitySegmenter in the main drive.

Version 9.5

Changes from previous version:

  • Switch to using my own scan from 2 ticks ago (instead of 1 tick ago) when creating opponent waves.
  • Implemented form of surfing 2 waves at once. The surf selector will choose both a first and second choice for where to surf for the closest wave. From where each of those choices would position the robot, the first choice for the second wave will be considered. The first wave danger is added to the second wave danger for both the first and second choice. The drive will then use whichever choice had the lower combined danger value (see description at top of page for more detail).

Version 9.6

While rolling drive data in the past has provided dubious results, latest testing suggests that rolling drive data will have a positive impact. This version takes a first stab at rolling the drive data.

Changes from previous version:

  • Now rolling drive data (previous there was no rolling at all). As currently configured, data point significance will drop in a linear manner with age, dropping to 1% of original significance after 1000 ticks. Data will never roll off completely; once significance has dropped to 1%, it will not drop any further.

Version 9.7

Changes from previous version:

  • Fixed bug where robot history snapshots were not getting cleared out between rounds.
  • Updated KNNFactorArrayProcessor to initialize with a linear point when used for a gun and no data is available (previously it would initialize with a head-on point).
  • Fixed issue where multi-wave surfing was not being updated when bullet-hit-bullet eliminated a wave other than the next wave to hit.
  • Changed gun so that aiming only occurs when gun heat is low.
  • Updated multi-wave surfing so that multiple first wave points can be considered (currently using 6 points with minimum 1 robot width separation between each), rather than just a first and second choice.
  • Changed wave weighting from equal to bullet damage / time until hit.
  • Added flattener that engages whenever opponent hit ratio exceeds 12.5%. Will not engage until at least the 3rd round. This is still somewhat experimental, but initial test results are encouraging.

Version 9.7.1

  • Relaxed flattener a little. Now engages at 13% hit ratio, and not until 4th round.
  • Fixed issue with anti-ram and anti-mirror gun power selectors not honoring x5 requirements.

Version 9.8

Changes from previous version:

  • Increase granularity on main drive segmentation:
    • Increased slices on bullet travel time segmenter from 18 to 24.
    • Increased slices on attacker bearing segmenter from 12 to 24.
  • Change main gun segmentation:
    • Increased slices on defender speed segmenter from 8 to 16.
    • Increased slices on bullet travel time segmenter from 12 to 24.
    • Increased slices on attacker bearing segmenter from 10 to 24.
  • Increase energy level to stop firing at from 0.1 to 0.5.
  • Reduce default number of first wave surf position options from 6 to 5. (given current wave weighting, option 6 is almost never being selected)

Version 9.9

Changes from previous version:

  • Updated distancing equation (techincally, I added and use a new SmartDistancingEquation that extends the original DistancingEquation). The original DistancingEquation is considered a Xander framework class, while the new SmartDistancingEquation is not.
    • Now takes wall proximity into account and will no longer recommend retreat angles when against a wall (as doing so can negatively affect the reachable range the drive uses).
    • Now behaves differently against top competitors.

Version 9.9.1

  • Fix a couple of issues with the updated distancing.
  • Reduce flattener engage percentage back to the original 12.5% opponent hit ratio (from 13%)

Version 9.9.2

  • Turn flattener off. Once again, it has proved to be more trouble than it's worth.
  • Improve how distancing determines if robot is against a wall.

Version 9.9.3

  • Turn flattener back on. Flattener now engages at 12.5% opponent hit ratio, but only if my own hit ratio is under 12%.
  • Added saving of certain battle statistics to file. This is used only for performance analysis; it is not used by the robot for in-battle tactics. Currently saving hit ratios and some flattener info.
  • XanderGun now reduces fire power to 1/3 the normal level when robot energy drops below 7.

Version 9.9.4

  • For the flattener, instead of requiring my own hit ratio to be under 12%, instead require that my own hit ratio simply be less than the opponent hit ratio.
  • Remove the robot energy 1/3 power when robot energy is below 7 adjustment.
  • When not "for real" aiming due to gun heat, point gun directly at opponent to keep it in the generally correct direction.
  • Power selection now reduces power to slightly less than what opponent is using when both self hit ratio and opponent hit ratio are very low (try to let the opponent run itself out of energy before us).
  • Implement factor array caching in the KNNFactorArrayProcessor. This should improve overall drive efficiency, especially with the multi-wave surfing.

Version 9.9.5

  • Fix issue where power selector could try to fire power 0 bullets (bug introduced with a change in 9.9.4).
  • Add new and improved bullet-shielding protected gun. Take that MoxieBot!
  • Stop logging no-fire forced energy drains as opponent bullet waves (a minor issue, but needed to be fixed for the new bullet-shielding protected gun to function properly).

Version 9.10

  • Fixed significant bug in how drive data is rolled with age. This may have been a "performance enhancing bug", as my drive isn't perfected yet and the bug gave the drive data more randomness. With the bug fixed, it will take a significant amount of new analysis before the drive parameters are properly re-tuned.
  • Improved ram escape drive. APS should be about the same against some of the trickier rammers like xbots, but should increase by a reasonable margin against some other rammers such as RedBull.
  • New Drive Array added to further improve scores against simple targeters. Drive array includes Anti-HeadOn drive, Anti-Linear drive, Anti-Circular drive, and the main drive. Drives other than the main drive are only used so long as the opponent hit ratio against them remain very low. Some comments on each:
    • Anti-HeadOn Drive -- not expected to improve score overall, as the main drive handled head-on targeters just fine, but this will drop CPU usage a fair amount against head-on targeters.
    • Anti-Linear Drive -- The main drive does a fair enough job against linear targeters, but this drive does better. Several APS increase against linear targeters expected.
    • Anti-Circular Drive -- The main drive has a harder time with certain circular targeters. APS increase could be as high as +15 in some cases. However, the number of cases where this will apply is expected to be very low.
  • Now rolling gun data when my hit ratio is below a certain threshold.

Version 9.10.1

  • Disable drive array. This should stabilize the robot until certain other parameters can be adjusted, and will also help indicate if the new drive array is hurting more than it is helping (it definitely helps against some robots, but could it be hurting overall?)

Version 9.10.2

  • Increase data roll rates.
  • Minor tweak to low hit ratios power selection.

Version 9.11

Changes from previous version:

  • Slight refactoring to allow same data logging system to be used with multiple factor array processors with different parameters.
  • Take first stab at dynamic drive data rolling.
  • Remove special low-hit-ratio power selection routine due to poor performance.

Version 9.12

Changes from previous version:

  • Make dynamic drive data rolling a linear effect, instead of the more crude on/off approach.

Version 9.13

Changes from previous version

  • Minor tweak to Ideal Position Drive so that it keeps robot a little further away from opponent when attempting to drive past opponent.
  • Double the granularity of drive segmenters for bearing and bullet travel time.

Version 9.14/9.15

All versions from 9.14 through the end of the 9.x series are alpha and beta tests for series 10.x. Refer to Version 10.0 notes for an idea of what these versions may include.

Version 10.0

Changes from previous version:

  • Switch to using a true KD Tree for managing drive and gun data. KD Tree from Simon D. Levy at the Washington and Lee University in Lexington, Virginia.
    • Gun set up to use k-nearest neighbor data selection.
    • Drive set up to use k-nearest neighbor data selection (explored some other variations such as range search, but staying with straight knn for now).
  • Remove bullet travel time segmenter and reverse direction wall stick segmenter from the drive.
  • Fix massive bug in my Bullet Travel Time Segmenter. This bug has surprisingly been around for a long time, and was rendering the bullet travel time segmentation ineffective for the drive. However, since this segmenter has been removed from the drive, this change will have no impact.
  • Fix bug in AbstractSegmenter (the base class for most of my segmenters) that was causing dimension values to fall out of the proper range for the KD Tree (note: it sounds a little weird to have a bug fix related to the KD Tree when the KD Tree is listed as new to this version; this is because the final versions of the 9.x series used the KD Tree as beta tests for the upcoming 10.x series, but I didn't want to officially list the KD Tree as a feature until this version).
  • Minor refactoring of Guess Factor and Wave Surfing components to better separate responsibilities and allow for better caching.
  • Implement virtual gun array. Currently 3 guns, each being a guess factor gun but with slightly different parameters on how to surf the data. This takes advantage of the better caching, as each gun uses the same caching log reader, meaning each gun after the first uses a cached copy of the nearest neighbor search results.
  • Implement drive array. Currently 2 drives, a targeting detector drive and the main wave surfing drive. Targeting detector drive is only used so long as it's hit ratio is lower than the main drive ratio, and that ratio stays under 8%.
  • Implemented more aggressive energy conservation at low energy levels.
  • Reduce opponent hit ratio to start rolling drive data at from 9% to 7%.
  • Opponent hit ratios against specific drives are only updated if the active drive had at least 5 ticks to react to the wave. This prevents penalizing drives for getting hit by close range shots.

Version 10.1

  • Flattener issues again. Increase flattener engage percentage to opponent hit ratio of 13% (up from 11.5%).

Version 10.2

  • Return flattener and drive roll parameters to their magic numbers from beta version 9.15.

Version 10.3

  • Replace Ideal Position Drive with Ideal Orbital Drive. The new drive should hopefully do a better job of getting the robot to a good position when bullets are not flying (primarily at the beginning of each round). The goal of this change is to hopefully give a small improvement across the entire field of competitors. I tried this once before without success...hopefully this time will work better!

Version 10.3.1

  • Give the Ideal Orbital Drive more aggressive "king of the hill" positioning (more favor towards centering in battlefield, less favor towards distancing from opponent).

Version 10.4

  • Revert to using the Ideal Position Drive for beginning of round positioning. It's magical powers are undeniable.
  • See if I can pull off an "lxx" APS increase by increasing my robot's preferred distance (from 400 to 450).

Version 10.5

  • Revert to original preferred distance (from 450 back down to 400).
  • Bring back the performance enhancing age roll bug to see if it still works, only now it's a feature! *grin*

Version 10.5.1

  • Don't use creative age roll feature against top robots.

Version 10.6

  • Switched to using power selector that increases fire power when my hit ratio is high. Hoping for a broad-range small APS increase on this one.
  • Added new scenario to use Circular Gun when extensive circular driving is detected. Won't make that much impact. I just felt dirty missing so many shots against opponents like SpinBot. And I missed having my Circular Gun in action.

Version 10.7

  • Trying a different power selection.
  • Added ZIP compression to battle stats file.

Version 10.7.1

  • Fix bug in file IO that was causing security violation.

Version 10.7.2

  • Add common battle stats support and log common wins by round to the battle stats file. This will provide insight into early battle, mid battle, and late battle performance.
  • See what happens if the Middle-Ground Gun is removed from the Gun Array (leaving only the original gun and the Anti-Scarlet gun).

Version 10.8

  • Try swapping back and forth a bit between two different KD Tree selection methods in the main drive. This is accomplished by introducing a new drive array with the original main drive and a range search main drive, which is then put into another drive array with the targeting detector drive (nested drive arrays).
  • Turn the "creative" drive data roll back off.

Version 10.9

  • Revert second KD Tree selection experiment.
  • Double the weighting on the speed and bearing segmenters in both the drive and gun.

Version 10.9.1

  • Readjust weighting of all segmenters.

Version 10.9.2

  • Readjust weighting of segmenters.
  • Adjust drive data roll parameters.

Version 10.9.3

  • Revert drive data roll parameter changes.
  • Reduce minimum weight for old data point from 1% to 0.1%.

Version 10.9.4

  • Fix bug preventing minimum weight parameter for old data point from being honored.

Version 10.10

  • Reintroduce main drive sub-array. This time, both use the same KNN selection parameters (same log reader), but one with a high minimum weight for old data, the other with a low minimum weight for old data. "Drive lock-in" occurs after 160 hits.

Version 10.11

  • Remove the main drive sub-array. It served as a good diagnostic measure, but is unfit for continued use.
  • Increase minimum weight for old data points from 1% to 2%. May need further adjustment later (possibly increasing further). This may be the first attribute change in the entire 10.x series that actually improves performance.

Version 10.12

  • Vary minimum weight for old data points using a linear equation. Weight will vary from 0.5% to 4% depending on the difference between my hit ratio and the opponents hit ratio.

Version 10.13

  • Set minimum weight for old drive data points to a fixed 5%. Linear equation of 10.12 wasn't working well. This will hurt performance against a couple of specific robots, but I think it should provide a reasonable improvement overall.

Version 10.14

  • Expand gun array to 4 guns. Only difference being data roll rate, with rates of 0, 0.001, 0.002, and 0.003.

Version 10.15

  • Reduce gun array back to 2 guns. Reduce influence of recent virtual hit ratio (as opposed to overall virtual hit ratio) from 60% to 33%.

Version 10.16

  • Add Time Since Direction Change segmenter to guns.

Version 10.17

  • Revert addition of Time Since Direction Changes segmenter from guns.
  • Change minimum weight for old data in the drive from 5% to 7.5%.
  • Change influence of rolling virtual hit ratio from 1/3 to 1/4.

Version 10.18

  • Tweak distancing adjustments against tough competitors.
  • Change from using a mostly fixed 1.85 power selection to a switching power selection between 1.85 and 1.95. Higher power is used when my hit ratio exceeds 17%.

Version 10.18.1

  • Fix power selector initialization bug that was causing exceptions against most opponents.

Version 10.19

This version provides an enabled copy of the Xander Painting Framework within the JAR. Performance-wise, this version experiments with being even more conservative with energy at low energy levels.

  • Utilize new Xander Painting Framework. Painters are left in place such that others can experiment with the framework and extract it from the JAR if they want it.
  • Increase min energy to fire from 4.1 to 5.8.
  • Change low energy conservation rate in the gun from 1/3 to 1/6.
  • Fix chain order, so that NoBulletWavesScenario comes after the AntiRamScenario and AntiMirrorScenario as intended. However, ultimately this should have no effect, since the NoBulletWavesScenario has only a drive, while the ram and mirror scenarios have drive/gun pairs which would override the NoBulletWavesScenario anyway.

Version 10.20

  • Disable Xander Painting Framework.
  • Revert low energy conservation changes from 10.19.
  • Use a new stepped hit ratio power selector that switches between fire powers of 1.75, 1.85, 1.95, and 2.05.
  • In multiple wave surfing, reduce default wave 1 surf options from 5 to 4.

Version 10.21

  • Change low energy conservation rate in main guns from 1/3 to 1/4.
  • Change stepped power hit ratio selector to use values 1.85, 1.95, and 2.05. Also increase percentage at which 2.05 is used.
  • Add new fire power drop that engages when leading in energy by >= 15 and my hit ratio < 13.5% and opponent rolling average fire power < my fire power. When this happens, my fire power is reduced to the same level as the opponents rolling average fire power.
  • Change distancing equation hit ratio thresholds from 13% and 11% to 12.5% and 10.5% (closer to original default of 12% and 10%).
  • Reduce minimum weight for old drive data from 7.5% to 6%.

Version 10.22

  • Fixed buggy bullet shadows implementation.

Version 10.23

For this version, I was looking for something to fix or improve that would give me another significant bump in performance. I found an issue with the multi-wave surfing that I didn't expect to make much difference, but when pitting this version against the previous, this version kept winning. So I'm not making any more changes. This one is getting released with just the multi-wave surfing bug fix, and a minor revert of a fire power selection option that wasn't helping.

  • Removed 2.05 fire power option from fire power selection.
  • Fixed issue with multi-wave surfing where first wave surf options from a previous wave could potentially get used for the current wave if the surf selector does not fill all options.

Update: This change had no effect. Bleh.

Version 10.24

  • Adjust the flattener to wait until round 6 before engaging (previously 5), and only when my hit ratio is more than 0.5 less than the opponent hit ratio (previously any time my hit ratio was less than opponent hit ratio).
  • Increase high hit ratio fire power from 1.95 to 1.99.

Version 10.25

  • Change low energy conservation rate from 1/4 back to to 1/3.
  • Revert flattener change from previous version, but keep the change to wait until round 6 instead of 5 before engaging.
  • Increase roll value on Anti-Scarlet gun from 0.003 to 0.005.

Version 10.26

  • Vary drive data point weight by distance.

Version 10.27

  • Revert varying drive data point weight by distance.
  • Set maximum size on drive KD Tree to promote using newer data. Maximum visits set to 726, maximum hits at 13% of visits.

Version 10.28

  • Revert maximum size change on KD Tree.
  • Relax aggressiveness of distancing (from max retreat/advance 75/40 degrees to 45/20).

Version 11.0

This version includes a modification to the Xander framework to make it easier to use precise MEA. MEA for each wave is now stored with the wave itself. And per a setting in the Configuration, you can now set usePreciseMEAForMyWaves and usePreciseMEAForOpponentWaves. When false, the common approximation by bullet velocity calculation is used; when true, a predictor is used to determine the maximums.

In addition, a new resource has been introduced -- the FactorIndexer -- which handles converting between factor angles and indexes. Like all resources, it is available through the Resources class. Unlike other resources, it is defined by an interface, and you can change the implementation through the Configuration. The default implementation is known as the BalancedFactorIndexer, which evenly splits all bins between the counter-clockwise and clockwise maximum escape angles.

The framework was also changed to make guns more efficient. Previously, the gun-related code was sloppy about creating multiple wave objects for aiming. Now that creating a wave is quite a bit more expensive when Precise MEA is enabled, this needed to be improved. For now, the solution was to creating a temporary wave cache in the WaveHistory, such that repeated requests to get a wave for the same snapshots and fire power pull from the cache. This cache is cleared out at the beginning of each turn. In addition, targeters are now passed a wave instead of just a bullet velocity when aiming. Despite these changes, the gun code is still not as efficient as it should be, and will likely see additional changes in later versions.

  • Use honest precise MEA for the guess factor guns. Previously, I was just capping the ranges.

Version 11.1

This version is a general maintenance release focusing on optimization, cleanup, code size reduction. May also include minor gun and/or drive tweaks.

  • Fix CPU performance issues in the gun system, and minor optimization across the board.
  • Remove old paint code that the Xander Painting Framework can take over for.
  • Remove some old experimental functionality that was not in use and had no useful impact when it was tested.
  • Turn off "distancing dropoff" effect against difficult opponents.

Version 11.2

Sanity check release. Version 11.1 had a performance drop without any intended change in functionality. This version was released to verify original score and ensure proper source roll back. Intended v11.1 changes will be reapplied in a later version.

  • Revert to source code used in 11.0.

Version 11.3

This version reapplies version 11.1 changes with the version 11.1 bug fixed. The problem was in the cache used in the WaveHistory for improving the efficiency of the gun system. The cache was caching waves, and it did not work correctly with virtual waves. I have modified the system to only cache the calculated MEAs, which was all I really needed the cache for in the first place.

  • Fix CPU performance issues in the gun system, and minor optimization across the board.
  • Remove old paint code that the Xander Painting Framework can take over for.
  • Remove some old experimental functionality that was not in use and had no useful impact when it was tested.
  • Turn off "distancing dropoff" effect against difficult opponents.

Version 11.4

  • Update KD Tree related components in the xander.gfws package to allow for multiple KD Tree implementations.
  • Switch from Levy's KD Tree to Rednaxela's 3rd Gen KD Tree.

Version 11.5

This version consists of minor tweaks to hopefully slightly improve overall score and performance against some of the top robots. More than that, this version will serve as a measure of my latest sample set I test with to see how closely score changes in my sample set match up to score changes in the Rumble. (Note: I now run a minimum of 20 to 30 seasons with my sample set -- quite a few more seasons than I used to use -- in order to get a more stable and accurate reading on how various changes affect the robot against competitors.)

My sample set indicates a 0.30 score increase. My sample set excludes certain types of robots, so overall I would expect -- if it's a good sample set -- the Rumble score change to be less than what I get with the sample set. I'll guess maybe half as significant. So what I will be hoping for here is a 0.15 APS score increase. However, I have no expectations, and would not be overly shocked if I see a result quite different from that, possibly even a score drop. Once this version has enough battles run for a stable score, I will then refine my sample set until I find a set that as closely as possible reflects what happened in the Rumble.

Changes in this version include:

  • Increase Anti-Scarlet gun data roll from 0.005 to 0.015.
  • Decrease flattener visit weight percentage from 33% to 15%.
  • Switch out DefenderSpeedSegmenter for the LateralVelocitySegmenter in the guns.
  • Improved how battle stats are averaged from battle to battle against the same opponents -- all battles are now weighted equally (note: the saved battle stats are only used for diagnostics; this will have no effect on performance).
  • Fix naming mistake for configuration MEA settings (has no effect on performance).

Version 11.6

If the results for 11.5 in the Rumble so far hold, the changes from the previous version 11.4 resulted in a scratch. Some ups and downs, but no overall score change. This is not entirely consistent with my test set of robots, so I will be looking at some significant changes to my test set.

For this next version, I will be comparing versions 11.5 and 11.4, and taking a close look at the opponents where I had the greatest score difference between the two versions, both in the positive and negative direction, and put a bunch of those into my test group. I will then focus on adjusting XanderCat for the updated test set such that there are positive score changes without any significant negative score changes over 20+ seasons. Once that is achieved, XanderCat 11.6 will be released into the Rumble.

While a lot of my usual ideas haven't yielding any notable improvements, I had an idea cross my mind that I wanted to try out. It showed improvement on my revised test set (+0.30 in 20 seasons) and now it's time to see what effect it has in the Rumble (if any).

Changes from previous version:

  • Revise drive bounds for self.

Rumble Results

I was hoping this version would solidify my place ahead of mue.Ascendant 1.2.27, who XanderCat had been trading places with in ranks due to nearly identical scores (flip-flopping between 9th and 10th). Happily, this version did that and then some, placing XanderCat slightly ahead of kc.serpent.Hydra 0.21 and barely squeaking into 8th place. (will I be trading ranks with Hydra now?) This version in particular marks a milestone as it is the first time I have reached 85 APS. Ironically, after trying many complex changes, it was a simple change in this version that got me there.

Version 11.7

Version 11.6 showed about a +0.20 improvement in the Rumble. This is a good correlation with my last test set, so I will keep my last test set mostly as is for version 11.7 development.

Changes in this version:

Xander Framework Updates:

  • In AbstractXanderRobot, initialize the RobotProxy object earlier such that it can be used in the configure() method implemented by any subclasses.
  • In the ComponentScenario class, allow the same component to serve multiple functions. This allows, for example, a modified RaikoGun to serve as both a Radar and Gun in the MC2K7 challenge.
  • Add methods isAdjustXxxForYyy() to the RobotProxy class.
  • In the GunController class, do not issue a GunFiredEvent when the setFireBullet method is called unless gun heat <= 0. This prevents erroneous GunFiredEvents if a gun attempts to fire bullets when they are not actually able to.
  • In the LinearEquation class, fix a couple of corner case bugs for lines of the form x = b and y = b. Also, when computing a line intersection between two parallel lines that do not intersect, return null instead of a double[] filled with Double.NaN values.

XanderCat Updates:

  • Improved the capabilities of my anti-mirror components (at the expense of more memory used and a little more processing). Yeah, it didn't need it, but it's my only claim to fame. :-) The new components should be able to accurately detect mirroring bots that use a time delay in the mirroring; I know there is at least 1 bot in the rumble that does this, though I can't remember which it is.
  • When sending out next wave to hit event to OpponentWaveListener classes, determine the next wave to hit by time to hit rather than by distance.
  • Bump the gun selector rolling hit ratio significance up from 25% to 35%. (to be further tweaked at a later date, as I haven't fleshed this parameter out fully yet)
  • Track wall hits and robot hits. I may be occasionally hitting the wall, so there is a chance for improvement there. I'll be able to tell that for sure after a good number of battles I can look back on.

Version 11.7.1

  • Revert gun selector rolling hit ratio significance back to 25% to verify whether or not this was the sole contributing factor to the score change from previous version (I expect this to be the case). (Note: I have plans for making this parameter dynamic in the next version)
  • Fix the tracking of wall hits and robot hits (forgot to add the listener).
  • Add tracking for drive usage percent. In particular, I'm looking for which opponents the mirror drive engages for, though it's of interest for all drives.
  • Update framework so that the DriveStats class can provide a list of all possible drives, and not just the ones that get used in the battle.

Note: Early indications from a couple of quick test runs suggests that XanderCat is hitting the wall quite a bit (average of 48 hits per battle!) If this holds true for a larger number of battles and I verify I didn't make any mistake in the calculation, then there may be a significant bump to be had from fixing this.

Version 11.7.2

Okay, it wasn't the gun selector rolling hit ratio that dropped my score in 11.7. Now I'm thinking I'm getting more false positives with my expanded anti-mirroring components. This version will scale that back.

  • Change anti-mirror components to only track back about 3 ticks instead of 50. This should make it roughly equivalent to what existed in 11.7. I thought there was at least 1 opponent that used a mirroring delay, but I'm not seeing it now, so scaling it back can only help. Maybe I'll work on trying to eliminate false positives in the detector some other time.
  • Update wall hit tracking to track damage taken, not just a count of wall hits. (after checking the docs, it appears the only downside to hitting a wall is taking damage, and damage taken depends on speed when the wall is hit; if I only ever hit the wall at a speed of 2 or less, then the wall hits won't matter; for the sake of an easy upgrade, I kind of hope I'm running into the walls at high speed.)

Version 11.8

Changes from previous version:

  • Tweaked drive parameters to eliminate most instances of XanderCat running into walls (not perfected -- reduced to maybe a 1/4 to 1/3 of what they were -- took a sledge hammer to the problem to see if it makes a difference first, before fine tuning on it)

Version 11.8.1

  • Adjusted virtual hit ratio significance again. A minor tweak partly done just to verify how closely my new test bed is to the entire rumble (latest test bed is 58 robots that I typically run 10 seasons on).

Version 11.9

  • Change how movement is predicted into the future for the purposes of gun aim. I currently predict 1 tick into the future when aiming my guns. Previously I had a crude prediction that just continued the robot's current velocity and heading. In this version, the prediction also takes acceleration/deceleration and turn from the previous tick into account.

Version 11.10

This version and every remaining version in the 11.x line are pre-releases of the upcoming version 12.0 to validate various changes before there is an official version 12.0.

This version validates changes to the framework segmenter interfaces and the corresponding segmenters that use those interfaces that will be used from here forward. My only expectation for this version is that APS does not decrease from the previous version.

Version 11.11

Removed some diagnostic code from previous version. Updated functionality of acceleration segmenter used in guns. Framework updated to support separate FactorIndexers for self and opponent -- what XanderCat uses wasn't changed, but it's possible bugs could have been fixed or introduced from the change. Seeing some unexpected results in my small scale local testing. Releasing to the rumble to see what happens there...

Version 11.12

Updated framework to allow for custom functions for how to roll data in guess factor guns and wave surfing drives that use factor arrays. The old way used a simple hard coded linear function, while the new way allows a function defined by an interface. For this pre-12 version, I replaced the old linear means for rolling my drive data by a new function (guns unchanged for this version).

Version 11.12.1

Tweak of one of the data roll parameters.

Version 11.13

Diagnostics release where drive data roll was completely turned off.

Version 11.14

Drive data roll turned back on with new parameters.

Version 11.15

Reverted to old data roll parameters. Still about 0.3 APS below where it was in version 11.11, an issue I am looking at more closely now but don't have an explanation for. This seems to have happened when I switched from a dumb simple drive data roll implementation to one driven by an interface allowing the function to be swapped out with ease. It will take some deep digging to analyze why this had any APS impact, as the function class I used should have been identical to the old method. Despite the APS drop, performance against Diamond and DrussGT in particular is quite good. At this point, I don't anticipate any more releases until I do something significant and release version 12.

Version 11.16

Added workaround for minor bug that was resulting in an occasionally Exception in all versions since v 11.11. Also added some minor diagnostic output to trace the original glitch (which still exists, it just doesn't result in an exception anymore; with the added diagnostics, I might be able to fix the source of the glitch in a later version)