Difference between revisions of "XanderCat/History"

From Robowiki
Jump to navigation Jump to search
m (Move Series 5.x version notes to XanderCat History page)
(added series 6.x version history)
Line 363: Line 363:
 
Changes from the previous version:
 
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.
 
* 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 [http://sourceforge.net/tracker/?func=detail&aid=3312402&group_id=37202&atid=419486 Robocode bug #3312402].
 +
* Removed old diagnostics code, with the exception of the part that removes the old diagnostic files (this version will clean out all the old saved data files).
 +
 +
'''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.
  
  
 
[[Category:Bot Version Histories]]
 
[[Category:Bot Version Histories]]

Revision as of 15:55, 27 July 2011

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.