DangerPrediction

Jump to navigation Jump to search

DangerPrediction

Edited by author.
Last edit: 20:51, 28 November 2013
Tmservo (talk)01:24, 27 November 2013

From the sounds of it his "DangerPrediction" is very similar to MinimumRiskMovement, except he evaluates the danger along every point in a route. Which is very similar to WaveSurfing except without waves. He would have to have some other method for calculating the risk however.

Also, not sure how those images prove that the robot is open source. The source being in the Jar and a FLOSS License is usually sufficient.

Chase04:59, 27 November 2013
 

Please stop posting images, they are of no help. Also Robocode cannot `decompile` anything.

Open Source does not refer to the availability of the source code, but the rights given by the author on how that code can be used. In short, it doesn't matter if the source is included in the JAR or not. Since Wolfman has not designated a license (that I can find), this source is copyrighted (closed source) by default.

Chase06:22, 27 November 2013

Yup its closed source, I didn't realise that Robocode packed source with the robot by default - how do people stop this?

I'm not too bothered with people looking at the code, I did say I would write some more details on how I did the movement once I had it working better against more complicated guns, but I don't want people just copying my hard work directly line for line!

Once I've written it up people can re-implement it if they choose but Chase has it pretty much working correctly. I do use gun-waves to keep track of enemy bullet positions, not guess-factors. I'm not sure if it will ever be as effective as true wave surfing but it should work in melee without any alteration as long as I generate waves and bullet positions for all bots not just one target!

Wolfman (talk)09:10, 27 November 2013

There should be a checkbox for including the source when you go to package the robot. Gun-waves usually refer to the waves your gun creates for targeting purposes. I think the other is usually just referred to as enemy waves.

But it is possible to use waves without guess factors, but it makes the process more complicated.

Chase00:38, 28 November 2013
 

too late i secretly put up the open source version of Agent Smith on 2shared

Tmservo (talk)01:36, 28 November 2013

There's one rule at the wiki: "Pretty please be polite." Please do.

Voidious (talk)01:53, 28 November 2013
 

Yes, can you please take this down? Thanks!

Wolfman (talk)09:23, 28 November 2013
 

I also use waves to keep track of enemy bullet positions, but I use guess factors to guess bullet's headings. The wave works as a collection of incoming virtual bullets. They all share the same center, fire time and bullet power, but each virtual bullet has a different heading.

MN (talk)04:10, 28 November 2013

Yup thats pretty much how I am using waves. Each wave has a payload that currently is virtual gun data, but I can add Guess Factors in the future. What Agent Smith doesn't do is surf the waves in a traditional sense for movement. It uses predicted x,y positions of enemy bullets over the next 50 ticks to work out a safe path over the those 50 ticks.

It will eventually use guess factors to work out where the most likely enemy bullet positions are but that is something I will work on next. At the moment it simply predicts head on, linear and circular bullet positions simultaneously without knowing which one is being used.

Wolfman (talk)09:31, 28 November 2013

I tried something like that once, I found it wanted to drive away from the enemy along the path of the bullets far to often, rather then the much safer perpendicular movement. But that was well before I managed to get beyond about rank 50.

Chase19:30, 28 November 2013

I don't think mine has that problem as long as it can track predicted bullet positions accurately. I.e versus linear, head on and circular targeting its pretty damn effective. I've yet to implement guess factor targeting. Once that is in I can add it into the movement to try to predict bullet positions of more advanced targeting methods.

It'll be interesting to see if that helps things or not! :)

Wolfman (talk)19:47, 28 November 2013

If you make it dodge GF Targeting, it will be a Sandbox Flattener, and then it is only a small step to surfer. A good SBF should get you to into the top 100.

Once you get a SBF, it is only bullet hit detection away from being a surfer.

Chase00:21, 29 November 2013

> it is only bullet hit detection away from being a surfer

What do you mean by this please? I was going to be using bullet hit detection for Guess Factors in movement, so I'm not sure how doing this makes it a wave surfer?

Cheers!

Wolfman (talk)09:11, 29 November 2013

Wave surfers use onBulletHit and onBulletHitBullet events to learn how the opponent is targeting at you. It is a lot more versatile and adaptable than simply assuming the opponent is using head-on, linear or circular targeting.

MN (talk)03:49, 30 November 2013

Ahh right, sounds like there is a bit of miss-naming here. I would say that what you described was nothing to do with wave surfing, and is in fact a technique for predicting enemy bullet positions more accurately - which is what I intend to do next.

Wavesurfing I would say is taking that predicted bullet information and building up a "wave of danger" which you then use to move. This part is different in Agent Smith because it does not use one dimensional (along a line, guess factors) "waves of danger", instead it considers 3 dimensional data, predicted bullet x,y at time t and using that to choose its movement path.

Wolfman (talk)08:23, 30 November 2013

Considering you know the fire-time and bullet power, surely you can then eliminate all points not on the wave as possibly holding the bullet at that point in time. So it seems like wavesurfing to me.

Skilgannon (talk)10:38, 30 November 2013

Yes, I use waves to work out predicted bullet positions at time t. What I don't do is use that information to build up a 1 dimensional array of danger values and then surf those danger values left or right.

Instead I use the absolute bullet positions relative to my bots predicted position to work out a path in the future that maintains the minimum possible danger. It is more of a minimum risk movement that wave surfing.

I don't restrict the predicted positions to left or right, I try numerous possible paths within the movement sphere of my bot. Each of those paths I predict up to 50 ticks ahead into the future. This is the key point - because I predict precisely the paths for 50 ticks the path may move into what a wave-surfer would traditionally call a danger zone but my bot is not in danger because it knows that the path it is traveling on will take it out of the way by the time the bullet hits.

Because it does not use a 1d array of danger values it takes into account every single bullet in the air at the same time, which means it can be extended for melee very easily.

Once a path has been chosen it will follow that path (with no need for recalculation) until a new enemy bullet has been fired, at which point it recalculates again.

Yes I believe it shares some similar ideas to wave surfing but I think it is different enough to be called a different technique.

Wolfman (talk)11:10, 30 November 2013

I'll do a full write up once I've got it working against more advanced guns, if I have time! :)

Wolfman (talk)11:12, 30 November 2013
 

Sorry, but I'd call this wave surfing. It's a broad category of movement, tho, and that doesn't change how similar or different what you're doing is from everyone else. Curious to read more when you write it up.

Voidious (talk)17:00, 30 November 2013

no it's DangerPrediction

Tmservo (talk)17:50, 30 November 2013

Well, it fits my definition of "wave surfing", whether you give it a new name or not. ;)

Voidious (talk)18:05, 30 November 2013
 

Te-he-he! I didn't mean to cause a stir! :)

This all boils down to your definition of "Wave Surfing". I see Wave Surfing as quite a narrow category of movement. But I assume then that you lot think Wave Surfing is any movement that tries to dodge predicted bullet positions then? In which case, yes, its a variant of wave surfing.

I think it is more akin to http://robowiki.net/wiki/Minimum_Risk_Movement because it picks a series of points (but in my case its actually a series of 50 tick long paths) to move to, and evaluates the danger for each of those points (paths).

Wolfman (talk)19:29, 30 November 2013

:-) For what it's worth, I consider Wave Surfing a form of Minimum Risk Movement too. That's pretty close to how I'd define it, actually - Minimum Risk where the risk is based on enemy waves.

Voidious (talk)19:34, 30 November 2013

Haha! Talk like that and you will have everyone thinking that all movement in Robocode is Minimum Risk! ;)

Wolfman (talk)19:54, 30 November 2013

Nah, I don't think it's much of a stretch. I know it's come up before on the wiki. Minimum Risk = each tick, generate a bunch of destinations, evaluate the risk of moving towards each one, and choose the safest. Wave Surfing is pretty much exactly that. The destinations are most commonly orbit forward, orbit reverse, and full stop until the wave intersects, and the risk calculation is usually primarily based on estimated probability of the opponent firing at various angles. And as we've started to augment our danger calculations with other things like distancing factors, it's even more reminiscent of melee style risk calculations.

Voidious (talk)20:14, 30 November 2013
 
 
 
 

That sounds similar to what I did in Neuromancer, although there I predict until all waves have passed. I generate movement options by calculating paths to reach all the points in a circle around the current location. It is definitely Minimum Risk, but the inclusion of wave-based dangers makes me call it a variation of goto wave surfing.

Skilgannon (talk)01:22, 1 December 2013
 

If it takes in account every single bullet in the air, then it is a form of [enemy] virtual bullets. Which does the same thing as waves, except in a more complicated way. It was the most used data structure, until someone had the insight of representing shots as circumferences growing in radius over time.

I use waves now, but also store a collection of headings inside the wave to cache k-NN search results. Combine a circumference and a heading and you have an exact x,y coordinate to use in danger estimation. Combine all circumferences with all headings and you have all x,y coordinates of enemy virtual bullets flying in the battlefield.

MN (talk)16:24, 2 December 2013

MN - thats pretty much exactly what I do. However, the interesting thing is what I do after I have the predicted x,y positions of bullets! :)

Wolfman (talk)17:30, 2 December 2013

In 1v1, I don't use x,y coordinates, I use "one-dimensional" headings alone to estimate danger at each GF.

In melee/team, I use x,y coordinates to generate anti-gravity points. I tried using minimum risk once and x,y coordinates to estimate risk (melee surfing), but it performed poorer than anti-gravity/shrapnel dodging and it was never uploaded to the rumble. Probably a tuning issue which I never fixed.

MN (talk)16:11, 3 December 2013