Difference between revisions of "Talk:BasicSurfer"
(migrating discussion) |
(Robobot 0.1 : correcting user page links) |
||
Line 1: | Line 1: | ||
== From old wiki == | == From old wiki == | ||
− | Hey [[Skilgannon]], I'm pretty sure it's right how it was. If you're going solely on the evidence of graphical debugging, be warned that it doesn't always line up with reality. Been a while since dealing with nitty gritty surf details, so I'll double check later, but pretty sure it's right as is. -- [[Voidious]] | + | Hey [[User:Skilgannon|Skilgannon]], I'm pretty sure it's right how it was. If you're going solely on the evidence of graphical debugging, be warned that it doesn't always line up with reality. Been a while since dealing with nitty gritty surf details, so I'll double check later, but pretty sure it's right as is. -- [[User:Voidious|Voidious]] |
− | IIRC, -1 is correct. Because you can only detect energy drop 1 round after it has happened. And -2 for the data cause thats the data the enemy used to aim, as it fires the turn after it is stated. Then again my memory is shotty, maybe Voidious can clear that up some. --[[Chase-san]] | + | IIRC, -1 is correct. Because you can only detect energy drop 1 round after it has happened. And -2 for the data cause thats the data the enemy used to aim, as it fires the turn after it is stated. Then again my memory is shotty, maybe Voidious can clear that up some. --[[User:Chase-san|Chase-san]] |
− | * Yeah, that's how it is - to the best of my recollection, anyway. =) -- [[Voidious]] | + | * Yeah, that's how it is - to the best of my recollection, anyway. =) -- [[User:Voidious|Voidious]] |
Using debug graphics I couldn't get it to line up with bullets on the waves. My score went up about 10% against DevilFISH (to 92%, with segmentation) after changing it to -2. Here's the debug code I used: | Using debug graphics I couldn't get it to line up with bullets on the waves. My score went up about 10% against DevilFISH (to 92%, with segmentation) after changing it to -2. Here's the debug code I used: | ||
Line 20: | Line 20: | ||
} | } | ||
</pre> | </pre> | ||
− | It may have to do with the doSurfing() being in the onScannedRobot() instead of the run(), and the order of event execution, I'm not sure. -- [[Skilgannon]] | + | It may have to do with the doSurfing() being in the onScannedRobot() instead of the run(), and the order of event execution, I'm not sure. -- [[User:Skilgannon|Skilgannon]] |
− | Just reviewed some things, I'm as sure as I could be that it's right with T-1. There's discussion about it on the [[RobocodeSG]], [[EnemyWaves]], and [[EnergyDrop]] pages. According to [[GamePhysics]] page, the battlefield draws between onScannedRobot and run - so in terms of robot performance, it doesn't matter in which you put your code, but it might for debugging graphics. ''Edit: Umm, duh, it still shouldn't matter as the timer doesn't advance anywhere in there.'' -- [[Voidious]] | + | Just reviewed some things, I'm as sure as I could be that it's right with T-1. There's discussion about it on the [[RobocodeSG]], [[EnemyWaves]], and [[EnergyDrop]] pages. According to [[GamePhysics]] page, the battlefield draws between onScannedRobot and run - so in terms of robot performance, it doesn't matter in which you put your code, but it might for debugging graphics. ''Edit: Umm, duh, it still shouldn't matter as the timer doesn't advance anywhere in there.'' -- [[User:Voidious|Voidious]] |
− | Yeah, that would do it. The debug gets called before the 'advance waves', so prints with the old data. I'm still not sure why my score leapt up, though. Maybe I'll try to fix mine to call from the run() using getAllEvents(), though I don't really mind PerformanceEnhancingBugs =) -- [[Skilgannon]] | + | Yeah, that would do it. The debug gets called before the 'advance waves', so prints with the old data. I'm still not sure why my score leapt up, though. Maybe I'll try to fix mine to call from the run() using getAllEvents(), though I don't really mind PerformanceEnhancingBugs =) -- [[User:Skilgannon|Skilgannon]] |
Finally found the bug that was causing my score to do better with the T-2, it had to do with my distancing. I'm now getting 97.5% vs. DevilFISH, without firing, over 500 rounds. This is with T-1. I've changed my debug code: | Finally found the bug that was causing my score to do better with the T-2, it had to do with my distancing. I'm now getting 97.5% vs. DevilFISH, without firing, over 500 rounds. This is with T-1. I've changed my debug code: | ||
Line 43: | Line 43: | ||
} | } | ||
</pre> | </pre> | ||
− | Thanks for catching that, guys. Maybe it would be a good idea to add this code to BasicSurfer? -- [[Skilgannon]] | + | Thanks for catching that, guys. Maybe it would be a good idea to add this code to BasicSurfer? -- [[User:Skilgannon|Skilgannon]] |
− | * Oops, sorry, I forgot to comment that I think that's a good idea. Too late. =) -- [[Voidious]] | + | * Oops, sorry, I forgot to comment that I think that's a good idea. Too late. =) -- [[User:Voidious|Voidious]] |
Revision as of 08:39, 22 May 2009
From old wiki
Hey Skilgannon, I'm pretty sure it's right how it was. If you're going solely on the evidence of graphical debugging, be warned that it doesn't always line up with reality. Been a while since dealing with nitty gritty surf details, so I'll double check later, but pretty sure it's right as is. -- Voidious
IIRC, -1 is correct. Because you can only detect energy drop 1 round after it has happened. And -2 for the data cause thats the data the enemy used to aim, as it fires the turn after it is stated. Then again my memory is shotty, maybe Voidious can clear that up some. --Chase-san
- Yeah, that's how it is - to the best of my recollection, anyway. =) -- Voidious
Using debug graphics I couldn't get it to line up with bullets on the waves. My score went up about 10% against DevilFISH (to 92%, with segmentation) after changing it to -2. Here's the debug code I used:
public void onPaint(java.awt.Graphics2D g) { g.setColor(Color.red); for(int i = 0; i < _enemyWaves.size(); i++){ EnemyWave w = (EnemyWave)(_enemyWaves.get(i)); int radius = (int)w.distanceTraveled; Point2D.Double center = w.fireLocation; if(radius - 40 < center.distance(_myLocation)) g.drawOval((int)(center.x - radius ), (int)(center.y - radius), radius*2, radius*2); } }
It may have to do with the doSurfing() being in the onScannedRobot() instead of the run(), and the order of event execution, I'm not sure. -- Skilgannon
Just reviewed some things, I'm as sure as I could be that it's right with T-1. There's discussion about it on the RobocodeSG, EnemyWaves, and EnergyDrop pages. According to GamePhysics page, the battlefield draws between onScannedRobot and run - so in terms of robot performance, it doesn't matter in which you put your code, but it might for debugging graphics. Edit: Umm, duh, it still shouldn't matter as the timer doesn't advance anywhere in there. -- Voidious
Yeah, that would do it. The debug gets called before the 'advance waves', so prints with the old data. I'm still not sure why my score leapt up, though. Maybe I'll try to fix mine to call from the run() using getAllEvents(), though I don't really mind PerformanceEnhancingBugs =) -- Skilgannon
Finally found the bug that was causing my score to do better with the T-2, it had to do with my distancing. I'm now getting 97.5% vs. DevilFISH, without firing, over 500 rounds. This is with T-1. I've changed my debug code:
public void onPaint(java.awt.Graphics2D g) { g.setColor(Color.red); for(int i = 0; i < _enemyWaves.size(); i++){ EnemyWave w = (EnemyWave)(_enemyWaves.get(i)); int radius = (int)(w.distanceTraveled + w.bulletVelocity); //hack to make waves line up visually, due to execution sequence in robocode engine //use only if you advance waves in the event handlers (eg. in onScannedRobot()) Point2D.Double center = w.fireLocation; if(radius - 40 < center.distance(_myLocation)) g.drawOval((int)(center.x - radius ), (int)(center.y - radius), radius*2, radius*2); } }
Thanks for catching that, guys. Maybe it would be a good idea to add this code to BasicSurfer? -- Skilgannon
- Oops, sorry, I forgot to comment that I think that's a good idea. Too late. =) -- Voidious