Difference between revisions of "XanderCat/History"
(Added old history information) |
m (moved XanderCat History to XanderCat/History: version history is usually a subpage, hope you don't mind!) |
Revision as of 15:34, 28 June 2011
This page provides version notes for XanderCat prior to the current major version.
Contents
- 1 Version 1.0
- 2 Version 2.0
- 3 Version 2.1
- 4 Version 3.0
- 5 Version 3.1
- 6 Version 3.2
- 7 Version 3.3
- 8 Version 3.4
- 9 Version 3.5
- 10 Version 3.6
- 11 Version 3.7
- 12 Version 3.8
- 13 Version 3.9
- 14 Version 4.0
- 15 Version 4.1
- 16 Version 4.2
- 17 Version 4.3
- 18 Version 4.4
- 19 Version 4.4.1
- 20 Version 4.5
- 21 Version 4.5.1
- 22 Version 4.6
- 23 Version 4.7
- 24 Version 4.7.1
- 25 Version 4.7.2
- 26 Version 4.7.3
- 27 Version 4.8
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.