[Home]Wave

Robo Home | Changes | Preferences | AllPages

Since I have now realized I have been doing Waves all the time for my bots I'll try to give an explanation. Think of Waves as something very like how the rings on the water extend from a stone you just dropped.

The followin graph shows what Wave's are. The green and red circles moves outwards from the bot firing the Wave: -- PEZ

A screenshot of Fractal drawing some waves using RobocodeGLV014. The green waves are its own bullets, and the red waves are the enemy bullets. When the green waves collide with the enemy, the angle difference between the center of the circle to the bullet and the center of the circle to the enemy is saved in the proper bin (see VirtualBullets), and the wave is removed. -- Vuen

For an implementation, using Robocode custom events, check VirtualBullets/VirtualBulletsBot. -- PEZ

See also EnemyWave. -- PEZ


Original question / discussion section

Cigaret obviously uses Wave aiming. Could someone with understanding about this explain what it is and how it is similar or different? -- PEZ

You note the point of origin, and speed of the (virtual) bullet you're firing. You keep track of the travelled distance of the bullet, and when that distance exceeds or equals the distance between your enemy and your bullet's origin, you can calculate back what angle your gun should have had to hit your enemy. This should give the same results as if you're firing an infinite number of (virtual) bullets in every direction.
I believe Iiley's bots are open source. Otherwise, HummingBird?'s Probe class should be similar (HummingBird? doesn't use it for patternmatching, though). --Dummy

Yes, the source is included in the jar. But I wanted it more in prose. Like your answer here. =) Marshmallow does this to feed one of it's guns. Though no pattern matching with it. What do you mean by that? -- PEZ

If I remember correctly, Cigaret and BlackSwans uses his Waves in combination with patternmatching.... so that's why I made that comment ;-). -- Dummy

Some of my pattern matchers do that but in the contrary way: first match a set of N patterns, then calculate the gun bearing that would hit in a similar way to the one explained by Dummy, then pick-up the most probable. -- Albert

Wave is similar to Dummy's Probe,it just contains some Pattern element(property) in it to do Pattern Analyse. -- iiley

What kind of principle does Wave work on? Would you be willing to explain it? -- Kawigi

I will explain it...hope i can explain it clearly with my poor English.;] -- iiley

If you have it explained on your webpage somewhere, or something, I may be able to get my friend or one of my brothers-in-law to try and translate it for you, too. Just post a link I guess. -- Kawigi

Does your friend can speak Chinese? however i'll have a try to explain it in English.;] -- iiley

My friend lived in Taiwan for two years, and his wife is Taiwanese. Three of my Brothers in law (2 of which are Chinese-American) also spent 1 1/2 to 2 years living in Taiwan. I have one sister-in-law who is Taiwanese, and my mother-in-law is from Hong-Kong, and my Father-in-law will be living there with her for a few years soon. In other words, I'd say I have a few close acquaintances who speak Chinese. It just never occured to me to ask them until recently... -- Kawigi

haha~~however,i wroted it in english,hope you can read it ;]

In A pattern matching gun,when you find the pattern in history witch is the most similar to current one,then you must calculate where it will go with the patterns in history(you can read some open source code with this pattern matching way,eg:cx.micro.Spark).but to shoot a enemy,i only need the shoot bearing,so why not record the shoot bearing in patterns,when i find the best pattern,i read the shoot bearing,then aim to this bearing to shoot.this is what wave does: assume a time(in fact every time if i can),I can fire a bullet,but I donot know which bearing will be right(be right to hit enemy),so I fire a wave,this wave's center position is my position when it be fired,the wave increase its radius V pixels tick by tick(V=the Bullet's velocity,can be 11 to 19.7),you can imagine that however the enemy move,one time in future the wave can hit him(because bot's velocity<=8 and bullet's velocity<=19.7,hitarea is 36,19.7+8=27.7<36).When it hit the enemy,i record the bearing from enemy to the wave's center,So i know at that time,if i need fire,i should fire this bearing. When i find a best pattern matched node,i will get the wave fired at that time to do my shoot. and... of course wave node include pattern element to do pattern analyse too. -- iiley

Thanks for the explanation, I have long wondered how it works. It sounds a bit like Orca's gun even though Orca uses a NeuralNetwork for the pattern analysis. What data do you use for pattern matching? -- PEZ

1 : enemy_velocity*Math.sin(enemy_heading-enemy_absBearing)

2 : enemy_distance_to_filedcenter

3 : enemy_distance_to_me

 -- iiley


A screenshot of Fractal drawing some waves using RobocodeGLV014. The green waves are its own bullets, and the red waves are the enemy bullets. When the green waves collide with the enemy, the angle difference between the center of the circle to the bullet and the center of the circle to the enemy is saved in the proper bin (see VirtualBullets), and the wave is removed. -- Vuen

And here's Statistician. I depend heavily on RobocodeGLV014 output for debugging. It is very very useful when doing crazy trigonometry. I am currently using RobocodeGLV014 to debug Tax's movement:

-- nano

Is that like a blind man's stick Tax is holding out? I've been experimenting some with using something like that for close-to-a-wall movement. But since I have never got RobocodeGLV014 to run on my machine I've never been sure I have got it right. -- PEZ


GARR! This is really bugging me. I have a question about this type of gun. How do you 'decay' old bearing data? In other words, how do you make new VB hits / wave hits worth more than old hits? I've been working on and off the past week and all night now with several different decay types; i've tried linear decay, geometric decay, smoothed geometric, factored bin adding, and every possible way to teak all of the above and more... The problem is, I can't seem to find a single enemy where any kind of decay type is better than simply no decay. I've got a few more concepts using a round-based data decay algorithm factoring time spent at distances, but it seems complicated for nothing; microbots can pull this off better than I can. For anybody who uses this type of targeting, do you decay your bin data? If so how? -- Vuen

I just use RollingAverage, but lately I have not used any decay at all. As you have also noticed, it's not worth it against most enemies. Segmentation is much more important. -- PEZ

I'm curious, what significant bots out there use non-decaying stats? My own released bots don't have any kind of decay (including FloodMini, FloodHT 0.8, Fhqwhgads and FhqwhgadsMicro). It seems like the goal in using such stats is to counter robots that either adapt movement (like GlowBlowAPM or the recent DT) or use several movement modes (like SpareParts or PrairieWolf). If you're trying to decide how to do decay, those are the sorts of robots to test against. That's the justification for not using all the stats. I plan on eventually implementing an adaptive bot, but until I do, decaying stats is not what's going to tip you over the edge against my bots. -- Kawigi


My EnemyWaves line up perfectly, but my normal waves don't. If I sit still, they work fine, but as soon as I move, it throws everything off (SittingDuck gets spikes at GF1 and GF-1). Any ideas? -- Tango

Maybe you are assigning a reference to your robots location to the wave? Then it will move as you move and all bets are off. Make sure you store a copy of your location at the time of fire in the wave. -- PEZ

Bingo! It things like this that show my complete lack of java knowledge... Thanks. -- Tango


I'm doing some code refactoring and was hoping for some help in naming one of my classes. I'll have a VCSWave subclass of Wave, which stores a double array of VisitCountStats, but what should I call the one that store a list of exact GuessFactors (for log based targeting or surfing)? -- Simonton

How about RawDataWave?? -- Skilgannon


Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited October 27, 2007 19:27 EST by Skilgannon (diff)
Search: