Difference between revisions of "Targeting"

From Robowiki
Jump to navigation Jump to search
m (Added Targeting Navbox)
Line 24: Line 24:
 
* '''[[Dynamic Clustering]] / [[GuessFactors]]''' - Choose a few attributes to describe firing situations, log the attributes and hitting GuessFactor for every situation encountered. At fire time, choose some number of similar situations from your log, and find the densest area of the graph of the corresponding GuessFactors.
 
* '''[[Dynamic Clustering]] / [[GuessFactors]]''' - Choose a few attributes to describe firing situations, log the attributes and hitting GuessFactor for every situation encountered. At fire time, choose some number of similar situations from your log, and find the densest area of the graph of the corresponding GuessFactors.
  
 +
{{Targeting Navbox}}
 
[[Category:Targeting]]
 
[[Category:Targeting]]

Revision as of 13:38, 28 March 2013

Youtube
Youtube has a video of Targeting in action: click here to watch

In Robocode, you deplete your opponent's energy, increase your own energy, and collect points by hitting other bots with bullets. For info about bullet damage and scoring, see Robocode/Game Physics and Robocode/Scoring. For info about different targeting techniques, see Category:Targeting.

The main components of a targeting system are:

  • Choosing a target (Melee only) - Find the right balance of conserving energy, collecting bullet damage points, picking off easy targets, and killing bots that are dangerous to you.
  • Energy Management - Choosing the right bullet power, or whether to fire or conserve your energy.
  • Choosing a firing angle

Targeting as a classification problem

Most descriptions of Robocode targeting systems focus on choosing a firing angle. This is essentially a classification problem. The enemy robot can't react to where you fire your bullets because he can't see your gun or your bullets (until/unless they hit him or one of his bullets). He can, however, see when you fire by monitoring your energy.

Some aspects that make Robocode targeting an interesting classification problem are:

  • You have a very small amount of time per tick to make a decision. Dropping in the most sophisticated classification algorithm you can find in a textbook won't work. The time you have needs to be split between collecting data and generating firing angles.
  • You have to continually make decisions with a changing data set. When you have no data, when you have 50 ticks, 500 ticks, or 20,000 ticks of data, your algorithm has to perform well and remain fast.
  • Improving a classification algorithm is hard. Some of the biggest advancements come from insights into collecting data accurately and how inputs and outputs are represented, like GuessFactors, innovative wall distance measurements, precise max escape angles, precise wave intersection, and choosing the right gun.

Common gun configurations

Some of the most common learning gun configurations are:

  • Pattern Matching / Play It Forward - Use the enemy's recent movements as the input, find a time in the past when his relative movements were similar, and guess that he will continue in the same fashion as he did in the most similar previous situation.
  • Visit Count Stats / Segmentation / GuessFactors (aka GuessFactor Targeting (traditional)) - Choose a few attributes to describe firing situations, segment them into a multi-dimensional array that covers all possible situation, and tally the hitting GuessFactor in each situation encountered (like a multi-variate histogram). At fire time, fire at the most often visited GuessFactor for the segment describing the current situation.
  • Dynamic Clustering / GuessFactors - Choose a few attributes to describe firing situations, log the attributes and hitting GuessFactor for every situation encountered. At fire time, choose some number of similar situations from your log, and find the densest area of the graph of the corresponding GuessFactors.