Difference between revisions of "Talk:Wave Surfing Tutorial"

From Robowiki
Jump to navigation Jump to search
(migrating discussion)
 
(Robobot 0.1 : correcting user page links)
Line 1: Line 1:
 
== From old wiki ==
 
== From old wiki ==
  
Nice tutorial. I'm feeling inspired to go through [[Cyanide]] to make sure all of its small details (and potential bugs) match this. One thing though, I thought that the iterative wall smoothing came from Jam. At least I first saw it in one of the Raikos. Slightly OT and maybe not for this page, but what's your take on keeping track of enemy waves fired every tick, as opposed to just the actual bullets. -- [[Alcatraz]]
+
Nice tutorial. I'm feeling inspired to go through [[Cyanide]] to make sure all of its small details (and potential bugs) match this. One thing though, I thought that the iterative wall smoothing came from Jam. At least I first saw it in one of the Raikos. Slightly OT and maybe not for this page, but what's your take on keeping track of enemy waves fired every tick, as opposed to just the actual bullets. -- [[User:Alcatraz|Alcatraz]]
  
I'll look into the source of the iterative WallSmoothing, thanks for pointing that out. [[Dookious]] does keep track of EnemyWaves from every tick, but non-firing waves are tracked in separate stat buffers and only on visits (like with a gun) and never with onHitByBullets. Those stat arrays are used as a flattener when the enemy's hit % is high enough, and (in rare circumstances) he'll surf those waves if there are no others in the air. Frankly, though, I've found that doing any kind of flattening is really dangerous for the majority of RR opponents - even against really good guns, Dookious sometimes does better to just surf normally. (I do [[RollingAverage|roll]] all surf stats pretty quickly, though.) -- [[Voidious]]
+
I'll look into the source of the iterative WallSmoothing, thanks for pointing that out. [[Dookious]] does keep track of EnemyWaves from every tick, but non-firing waves are tracked in separate stat buffers and only on visits (like with a gun) and never with onHitByBullets. Those stat arrays are used as a flattener when the enemy's hit % is high enough, and (in rare circumstances) he'll surf those waves if there are no others in the air. Frankly, though, I've found that doing any kind of flattening is really dangerous for the majority of RR opponents - even against really good guns, Dookious sometimes does better to just surf normally. (I do [[RollingAverage|roll]] all surf stats pretty quickly, though.) -- [[User:Voidious|Voidious]]
  
 
Voidious, thanks, great reading!  
 
Voidious, thanks, great reading!  
  
 
As you said, maybe WaveSuffering makes you a wiser man, but with the limited time on my hand this maybe is the help i needed to get my WaveSuffering bot Wolwa above the current 60% score against bot B of the WaveSurfingChallenge (it scores 87% against bot A). I will certainly look at this bot with new energy.  
 
As you said, maybe WaveSuffering makes you a wiser man, but with the limited time on my hand this maybe is the help i needed to get my WaveSuffering bot Wolwa above the current 60% score against bot B of the WaveSurfingChallenge (it scores 87% against bot A). I will certainly look at this bot with new energy.  
--[[Loki]]
+
--[[User:Loki|Loki]]
* yesterday evening i finished reading this tutorial and came up to the text "This bot, as presented above, will score about 90% vs WaveSurfingChallengeBotA and 60% vs WaveSurfingChallengeBotB". So i was a bit dissapointed as those numbers look very familiar. The possitive side is that my first wavesurfer isn't that bad (i always compared it to al those >95% scoring bots). Another possitive point is that i have found some details to improve and there a quite a number of suggestions in this tutorial to try out. Hopefully this will soon result in my first wavesurfing entry. to be continued. --[[Loki]]
+
* yesterday evening i finished reading this tutorial and came up to the text "This bot, as presented above, will score about 90% vs WaveSurfingChallengeBotA and 60% vs WaveSurfingChallengeBotB". So i was a bit dissapointed as those numbers look very familiar. The possitive side is that my first wavesurfer isn't that bad (i always compared it to al those >95% scoring bots). Another possitive point is that i have found some details to improve and there a quite a number of suggestions in this tutorial to try out. Hopefully this will soon result in my first wavesurfing entry. to be continued. --[[User:Loki|Loki]]
 
** The lack of any kind of distancing or dive protection is very relevant against BotA, and the lack of any segmentation is very relevent against BotB. [[Komarious]] uses a more polished form of this mini-surfing, and you can see her [[MovementChallenge2K6/Results|MC2K6 scores]] are much better than that.
 
** The lack of any kind of distancing or dive protection is very relevant against BotA, and the lack of any segmentation is very relevent against BotB. [[Komarious]] uses a more polished form of this mini-surfing, and you can see her [[MovementChallenge2K6/Results|MC2K6 scores]] are much better than that.
** Also, the prediction checks the danger of the point you would be at when the EnemyWave intercepts you, but it might help a lot to subtract another bot_half_width, and maybe another bullet_velocity, (from the left side) to be checking the last point you could get to right before even possibly being hit. ([[Dookious]] does that.) Maybe I should actually change the tutorial to use that as the calculation, but I wanted to keep it simple... -- [[Voidious]]
+
** Also, the prediction checks the danger of the point you would be at when the EnemyWave intercepts you, but it might help a lot to subtract another bot_half_width, and maybe another bullet_velocity, (from the left side) to be checking the last point you could get to right before even possibly being hit. ([[Dookious]] does that.) Maybe I should actually change the tutorial to use that as the calculation, but I wanted to keep it simple... -- [[User:Voidious|Voidious]]
* a question: i don't understand the factor "2" in the below code. Can anyone give some additional explanation? thanks --[[Loki]]
+
* a question: i don't understand the factor "2" in the below code. Can anyone give some additional explanation? thanks --[[User:Loki|Loki]]
 
<pre>
 
<pre>
 
             // this one is nice ;). if predictedVelocity and moveDir have
 
             // this one is nice ;). if predictedVelocity and moveDir have
Line 20: Line 20:
 
                 (predictedVelocity * moveDir < 0 ? 2*moveDir : moveDir);
 
                 (predictedVelocity * moveDir < 0 ? 2*moveDir : moveDir);
 
</pre>
 
</pre>
** acceleration: speed + 1, deceleration: speed - '''2'''  -- [[GrubbmGait]]
+
** acceleration: speed + 1, deceleration: speed - '''2'''  -- [[User:GrubbmGait|GrubbmGait]]
** thanks, i was convinced deceleration was at the same rate as acceleration. I must remember to regularly read the GamePhysics page to refresh my memory. --[[Loki]]
+
** thanks, i was convinced deceleration was at the same rate as acceleration. I must remember to regularly read the GamePhysics page to refresh my memory. --[[User:Loki|Loki]]
  
@[[Loki]]: Glad to hear it, best of luck! =) -- [[Voidious]]
+
@[[User:Loki|Loki]]: Glad to hear it, best of luck! =) -- [[User:Voidious|Voidious]]
 
----
 
----
 
All the calculations are done under onScannedRobot method. Is there any diffrence to put it under run().? --sso
 
All the calculations are done under onScannedRobot method. Is there any diffrence to put it under run().? --sso
  
It shouldn't make any difference - the order that things are executed is given precisely on the GamePhysics page, and the only thing that happens between onScannedRobot() and run() is that the battle field draws. It's just a matter of preference. -- [[Voidious]]
+
It shouldn't make any difference - the order that things are executed is given precisely on the GamePhysics page, and the only thing that happens between onScannedRobot() and run() is that the battle field draws. It's just a matter of preference. -- [[User:Voidious|Voidious]]
  
Why do you use the two arraylists, does it add to the front of the array when you add it, if not I don't see how that could work. (i'm gussing since you did it that way that it does, but couldn't you be more exact then just from two rounds ago?) -- [[Chase-san]]
+
Why do you use the two arraylists, does it add to the front of the array when you add it, if not I don't see how that could work. (i'm gussing since you did it that way that it does, but couldn't you be more exact then just from two rounds ago?) -- [[User:Chase-san|Chase-san]]
  
The two ArrayList's that start wtih _surf just store the direction and absolute bearings from every tick, because you need those from 2 ticks ago when you detect an EnergyDrop. Yes, it adds to the front of them - the first argument is the position in the ArrayList if you do it like that. What do you mean "two rounds ago"? Do you mean two frames ago? The data from two frames ago is the last data that the enemy saw before firing the shot, so that's why you use it. It's all about figuring where he's aiming based on what he is seeing. -- [[Voidious]]
+
The two ArrayList's that start wtih _surf just store the direction and absolute bearings from every tick, because you need those from 2 ticks ago when you detect an EnergyDrop. Yes, it adds to the front of them - the first argument is the position in the ArrayList if you do it like that. What do you mean "two rounds ago"? Do you mean two frames ago? The data from two frames ago is the last data that the enemy saw before firing the shot, so that's why you use it. It's all about figuring where he's aiming based on what he is seeing. -- [[User:Voidious|Voidious]]

Revision as of 08:47, 22 May 2009

From old wiki

Nice tutorial. I'm feeling inspired to go through Cyanide to make sure all of its small details (and potential bugs) match this. One thing though, I thought that the iterative wall smoothing came from Jam. At least I first saw it in one of the Raikos. Slightly OT and maybe not for this page, but what's your take on keeping track of enemy waves fired every tick, as opposed to just the actual bullets. -- Alcatraz

I'll look into the source of the iterative WallSmoothing, thanks for pointing that out. Dookious does keep track of EnemyWaves from every tick, but non-firing waves are tracked in separate stat buffers and only on visits (like with a gun) and never with onHitByBullets. Those stat arrays are used as a flattener when the enemy's hit % is high enough, and (in rare circumstances) he'll surf those waves if there are no others in the air. Frankly, though, I've found that doing any kind of flattening is really dangerous for the majority of RR opponents - even against really good guns, Dookious sometimes does better to just surf normally. (I do roll all surf stats pretty quickly, though.) -- Voidious

Voidious, thanks, great reading!

As you said, maybe WaveSuffering makes you a wiser man, but with the limited time on my hand this maybe is the help i needed to get my WaveSuffering bot Wolwa above the current 60% score against bot B of the WaveSurfingChallenge (it scores 87% against bot A). I will certainly look at this bot with new energy. --Loki

  • yesterday evening i finished reading this tutorial and came up to the text "This bot, as presented above, will score about 90% vs WaveSurfingChallengeBotA and 60% vs WaveSurfingChallengeBotB". So i was a bit dissapointed as those numbers look very familiar. The possitive side is that my first wavesurfer isn't that bad (i always compared it to al those >95% scoring bots). Another possitive point is that i have found some details to improve and there a quite a number of suggestions in this tutorial to try out. Hopefully this will soon result in my first wavesurfing entry. to be continued. --Loki
    • The lack of any kind of distancing or dive protection is very relevant against BotA, and the lack of any segmentation is very relevent against BotB. Komarious uses a more polished form of this mini-surfing, and you can see her MC2K6 scores are much better than that.
    • Also, the prediction checks the danger of the point you would be at when the EnemyWave intercepts you, but it might help a lot to subtract another bot_half_width, and maybe another bullet_velocity, (from the left side) to be checking the last point you could get to right before even possibly being hit. (Dookious does that.) Maybe I should actually change the tutorial to use that as the calculation, but I wanted to keep it simple... -- Voidious
  • a question: i don't understand the factor "2" in the below code. Can anyone give some additional explanation? thanks --Loki
            // this one is nice ;). if predictedVelocity and moveDir have
            // different signs you want to breack down
            // otherwise you want to accelerate (look at the factor "2")
            predictedVelocity += 
                (predictedVelocity * moveDir < 0 ? 2*moveDir : moveDir);
    • acceleration: speed + 1, deceleration: speed - 2 -- GrubbmGait
    • thanks, i was convinced deceleration was at the same rate as acceleration. I must remember to regularly read the GamePhysics page to refresh my memory. --Loki

@Loki: Glad to hear it, best of luck! =) -- Voidious


All the calculations are done under onScannedRobot method. Is there any diffrence to put it under run().? --sso

It shouldn't make any difference - the order that things are executed is given precisely on the GamePhysics page, and the only thing that happens between onScannedRobot() and run() is that the battle field draws. It's just a matter of preference. -- Voidious

Why do you use the two arraylists, does it add to the front of the array when you add it, if not I don't see how that could work. (i'm gussing since you did it that way that it does, but couldn't you be more exact then just from two rounds ago?) -- Chase-san

The two ArrayList's that start wtih _surf just store the direction and absolute bearings from every tick, because you need those from 2 ticks ago when you detect an EnergyDrop. Yes, it adds to the front of them - the first argument is the position in the ArrayList if you do it like that. What do you mean "two rounds ago"? Do you mean two frames ago? The data from two frames ago is the last data that the enemy saw before firing the shot, so that's why you use it. It's all about figuring where he's aiming based on what he is seeing. -- Voidious