Difference between revisions of "Thread:Talk:DrussGT/timeSinceDirChange bug"
m (New thread: timeSinceDirChange bug) |
m |
||
(One intermediate revision by the same user not shown) | |||
Line 3: | Line 3: | ||
I looked throughout the wiki and found nothing about it being a known bug (and probably performance enchancing?), so I'll put it here anyway. | I looked throughout the wiki and found nothing about it being a known bug (and probably performance enchancing?), so I'll put it here anyway. | ||
− | In the onScannedRobot() method, you override the "lastDirection" variable with the new direction value before updating "timeSinceDirChange". This causes this variable to be incremented at every scan, as you increment it if(lastDirection == direction). So, the normalized version 1/(1+2x) | + | In the onScannedRobot() method, you override the "lastDirection" variable with the new direction value before updating "timeSinceDirChange". This causes this variable to be incremented at every scan, as you increment it if(lastDirection == direction). So, the normalized version 1/(1+2x) goes quickly towards zero during the round, which is probably almost the same as having a very low weight for this feature. |
− | Not sure when you introduced this, but maybe it is worth | + | Not sure when you introduced this, but maybe it is worth fixing it in the future for a possible programmatic tuning round. |
Latest revision as of 23:21, 30 October 2017
Hey, I was trying to plug Druss' gun into Knight (to do some experiments using my MEA/preciseIntersection/features calculations to see if they break your gun) and I noticed something interesting in the code.
I looked throughout the wiki and found nothing about it being a known bug (and probably performance enchancing?), so I'll put it here anyway.
In the onScannedRobot() method, you override the "lastDirection" variable with the new direction value before updating "timeSinceDirChange". This causes this variable to be incremented at every scan, as you increment it if(lastDirection == direction). So, the normalized version 1/(1+2x) goes quickly towards zero during the round, which is probably almost the same as having a very low weight for this feature.
Not sure when you introduced this, but maybe it is worth fixing it in the future for a possible programmatic tuning round.