Difference between revisions of "User:Nfwu/Segmentation"

From Robowiki
Jump to navigation Jump to search
(Working on this)
 
(Blanking Page)
 
Line 1: Line 1:
''I'm working on this --Nfwu''
 
  
Segmentation is probably one of the most complex and most nessecary parts of current robocoding. This is the age of [[GuessFactorTargeting]] and [[WaveSurfing]], where success is about finding and exploiting your opponents weaknesses. This is where segmentation comes in. Segmentation is where one takes the traditional statistics gained through [[Waves]] or [[VirtualBullets]] and split it into segments based on the current factors at the time. A target may have the flattest [[profile]] you have ever seen, but it is when it is approaching a wall, changing velocity, advancing or retreating, or doing one of many other things, this profile could fail and allow you to exploit the [[spikes]] that occur.
 
 
==Segments==
 
 
When gathering data for a statistical operation, you will segment on one or more of these variables.  Here are most of the variables that are segmented on, feel free to add variables and how to collect them to the list.
 
 
* VisitCount: Typically GuessFactor, but it could be applied to whatever you wish.  You always have this segment.
 
** <pre> (oldAngle-newAngle)/max_escape_angle // eg, Math.asin(max bot velocity/bullet velocity)</pre>
 
* Distance: Range to the target at shot time.
 
** <pre> e.getDistance() </pre>
 
* Bullet Flight Time: Time from fire until the bot will be hit.
 
** <pre> e.getDistance() / (20 - 3 * shotPower) </pre>
 
* Bullet Power: The power of the bullet you fire with. Could be useful against wavesurfers that weight danger on power.
 
** <pre> shotPower </pre>
 
* Target Velocity: The targets velocity.
 
** <pre> e.getVelocity() </pre>
 
* Target Heading: Can either use the change in target heading or relative target heading.
 
** <pre> e.getHeading() - oldHeading </pre>
 
** <pre> e.getHeading() - (e.getBearing() + getHeading()) // abs heading - abs bearing </pre>
 
* Target LateralVelocity: The velocity perpendicular to your direction.
 
** <pre> e.getVelocity() * Math.sin(e.getHeadingRadians() - (e.getBearingRadians() + getHeadingRadians())) </pre>
 
* Target AdvancingVelocity: The velocity parallel to your direcion.
 
** <pre> e.getVelocity() * -1 * Math.cos(e.getHeadingRadians() - (e.getBearingRadians() + getHeadingRadians())) </pre>
 
* Target Acceleration: If target is accelerating, constant, or decelerating. Often very useful.
 
** <pre>    int accelSegment(double deltaBearing, double oldDeltaBearing) {
 
        int delta = (int)(Math.round(5 * enemyDistance * (Math.abs(deltaBearing) - Math.abs(oldDeltaBearing))));
 
        if (delta < 0) {
 
            return 0;
 
        }
 
        else if (delta > 0) {
 
            return 2;
 
        }
 
        return 1;
 
    }</pre>
 
* Near Wall: Probably the most useful. Usually split into middle, near wall, and near corner.
 
* Move Times: Number of ticks since the velocity was last 0, since velocity changed, or since velocity was max speed. Useful against stop and go and oscillators, and many other types of movement. Some tanks, like CassiusClay, also make this (inversely) proportional to the enemy's distance.
 
** <pre>
 
if(enemyVelocity==0) moveTimes=0;  else  moveTimes++;
 
moveTimesIndex = Math.min(9, moveTimes/5);
 
</pre>
 
* Wave Type: If data is from real or virtual bullet. Only useful if profiles match.
 
 
 
[[Melee]]
 
* Antigravity Force: The magnitude of the antigravity vector acting on an enemy
 
** This means calculating the antigravity for the enemy rather than for self, and segmenting on this; I had been planning something similar in another of my bots a while back, but never got around to it
 
* Robots Remaining: The number of enemies remaining.
 
 
[[Teams]]
 
* Number of Teammates: The number of teammates an enemy has remaining
 
** Could be very useful; droids can die when there are no radars left, and certain teams may modify their movement strategies based on this (DrunkenTeam comes to mind)
 
 
== See Also ==
 
* [[BinSmoothing]]
 
* [[Ali/BumbleBee]]
 
* [[AndrewsCoolWay]]
 
* [[AutomatedSegmentation]]
 
* [[CompressedSerialization]]
 
* [[CribSheet]]
 
* [[DataSmoothing]]
 
* [[David Alves]]
 
* [[DynamicFactors]]
 
* [[DynamicSegmentation]]
 
* [[Entropy]]
 
* [[ReducedDimensionalSegmentation]]
 
* [[ReducingDataFileSize]]
 
* [[SavingDataHowto]]
 
* [[Segmentation/Prioritizing]]
 
* [[SegmentedData/Segments]]
 
* [[SavingData/Strategies]]
 
* [[StatsDecay]]
 
* [[VisitCountStats]]
 
* [[WhatToSaveBetweenRounds]]
 
* [[WikiTargeting]]
 

Latest revision as of 03:46, 18 September 2008