Performance Enhancing Bug
This article is a stub. You can help RoboWiki by expanding it. |
Quote from Shadow page
Thanks, but I had to revert almost everything to 3.66 level. I found a huge bug in my recent attempt at "dynamic dimension weighting" that wasn't working as expected. Turns out that correcting that bug costs me at least 30 ranking points... talk about PerformanceEnhancingBugs?! -- ABC
A particularly nasty type of bug that can be very difficult to deal with. The buggy code is not working as intended, but once the bug is "fixed", performance (usually RoboRumble rating) actually decreases.
There are a few possible ways to deal with this bug:
- Leave it in. This is the best performing solution in the short-term. However, it may become an obstacle to future improvements. The behavior caused by the bug may be erratic and unpredictable, making it difficult or impossible to tune other behaviors around the buggy behavior.
- Fix the bug anyway. You may prefer to just accept the lower performance of your bot if it means it is "bug-free".
- Analyze the bug, fix it, and re-tune. The best possible scenario is that you are able to analyze what effect the bug is having, figure out why that causes increased performance, and implement a similar behavior in a bug-fixed version. This can be difficult and sometimes is not possible at all, but it is the win-win solution to strive for.
Examples
- For pattern matcher NanoBots, the
setAdjustGunForRobotTurn(true)
that is usually added to make targeting more accurate is a nice example of this bug. Without that, the robot will get more score. Usually for this bug, Robocoders will "Leave it in" since NanoBots can't fit more complex code that would emulate this effect. - Recently (late May, 2009), Diamond 1.111 showed a .4% APS improvement over 1.11 by restoring a bug involving a random direction change timer. This example use a "Analyze the bug, fix it, and re-tune" solution.