Difference between revisions of "Bin Smoothing"
Jump to navigation
Jump to search
J Litewski (talk | contribs) (tried to make a decent page) |
J Litewski (talk | contribs) m (added code) |
||
Line 5: | Line 5: | ||
=Bin Smoothing Formulas= | =Bin Smoothing Formulas= | ||
If you have your own Bin Smoothing Formula, feel free to post it here. | If you have your own Bin Smoothing Formula, feel free to post it here. | ||
− | == | + | ==[[Pugilist]]== |
− | ( | + | <pre> |
+ | double smoothedVisits(int index) { | ||
+ | double smoothed = 0; | ||
+ | int i = 0; | ||
+ | do { | ||
+ | smoothed += (double)visits[i] / Math.sqrt((double)(Math.abs(index - i) + 1.0)); | ||
+ | i++; | ||
+ | } while (i < Pugilist.FACTORS); | ||
+ | return smoothed / Math.pow(distanceToTarget() / bulletVelocity, 1.3); | ||
+ | } | ||
+ | </pre> | ||
==PPP== | ==PPP== | ||
− | ( | + | <pre> |
+ | double smoothedVisits(int index) { | ||
+ | double smoothed = 0; | ||
+ | if (index > 0) { | ||
+ | smoothed += visits[index - 1] / 2; | ||
+ | } | ||
+ | if (index < FACTORS - 1) { | ||
+ | smoothed += visits[index + 1] / 2; | ||
+ | } | ||
+ | smoothed += visits[index]; | ||
+ | return smoothed; | ||
+ | } | ||
+ | </pre> | ||
+ | ==Other Ways== | ||
+ | <pre>Math.pow(0.5, Math.abs(index - count))</pre> | ||
+ | This does a 50% decrease. | ||
+ | <pre>Math.pow(0.1, Math.abs(index - count))</pre> | ||
+ | This does a 90% decrease |
Revision as of 20:27, 8 June 2009
This article is a stub. You can help RoboWiki by expanding it. |
Bin Smoothing is the process of spreading or normalizing the values stored in a Bin for WaveSurfing or Segmentation. It's not needed for WaveSurfing or Segmentation, but can, in theory, improve performance if done right.
How Bin Smoothing Works
Bin Smoothing 'flattens' small spikes within it's Bins.
Bin Smoothing Formulas
If you have your own Bin Smoothing Formula, feel free to post it here.
Pugilist
double smoothedVisits(int index) { double smoothed = 0; int i = 0; do { smoothed += (double)visits[i] / Math.sqrt((double)(Math.abs(index - i) + 1.0)); i++; } while (i < Pugilist.FACTORS); return smoothed / Math.pow(distanceToTarget() / bulletVelocity, 1.3); }
PPP
double smoothedVisits(int index) { double smoothed = 0; if (index > 0) { smoothed += visits[index - 1] / 2; } if (index < FACTORS - 1) { smoothed += visits[index + 1] / 2; } smoothed += visits[index]; return smoothed; }
Other Ways
Math.pow(0.5, Math.abs(index - count))
This does a 50% decrease.
Math.pow(0.1, Math.abs(index - count))
This does a 90% decrease