Performance Enhancing Bug
The highlighted comment was created in this revision.
I started working on a mini-sized GF gun which I plan to have both an anti-RM and anti-WS component. First, I used Raiko's gun as a base, and then I added Bin Smoothing from Vyper. The problem was, I forgot to change the array type from int
to double
, so the bins couldn't hold decimal values and got rounded down. One would think that this would have a harmful effect, but it actually had a significantly positive effect on my robot's score against surfers. I thought that maybe the smoothing was too heavy, so I tried lower smooth factors, and I even tried getting rid of the smoothing altogether, but I still couldn't replicate the score increase.
Any ideas why this happened? Could it be something about the decay rate instead of the smoothing? Has anyone else ever noticed this?
That's very interesting. Since lower smoothing factors didn't replicate the score increase, I believe key difference is most likely the shape of the smoothing rather than the extent of the smoothing. I can think of two changes in the shape of the smoothing that may be caused by integer rounding and may be significant:
- Depending on what kind of smoothing you used, the integer rounding may have caused several bins at the center of the hit to be incremented by the same value. It's possible eliminating the bias towards the center of the 'hit' may be of benefit in targeting surfers perhaps. To confirm/refute this hypothesis, you can keep 'double' but modify your smoothing code to keep a 'flat' region around the center of the smoothing.
- The integer rounding would reduce the influence far from the 'hit' to zero. It is possible that small influences from excessively distant 'hits' may have a detremental effect, possibly making your targeting more predictable. To confirm/refute this hypothesis, you can keep 'double' but modify your smoothing code have a sharp cutoff for the maximum distance from the 'hit' that it gets smoothed into.