Talk:Flattener

From RoboWiki
Jump to: navigation, search

Contents

Thread titleRepliesLast modified
Flattener vs. Random802:09, 14 August 2019
Pure Flattening Movement Bot703:22, 31 January 2014
Curve Flattening Detection?817:50, 16 December 2013
Hitting Pure Flattened Movement?1213:20, 16 December 2013
First page
First page
Next page
Next page
Last page
Last page

Flattener vs. Random

In theory, it should be possible to hit a flattener more often than a random movement because you know the flattener will avoid where it last was.

In practice, against top tier RoboRumble guns, which would be harder to hit, a typical flattener that logs where it last was and avoids it, or a type of random movement that moves to a random guessfactor each wave?

Thanks!

Slugzilla (talk)02:57, 11 August 2019

I have never had much success with flatteners but exploiting it is unethical imo. The logic of flattener is that your opponents targeting is learning and you can simulate what your opponent does fairly well keeping your profile fairly flat. On the other hand, assuming that your opponent assumes that your targeting is learning is not that reliable as it might just be that your gun isn't strong. Random movement guarantees that your opponent's gun will be as good as random targeting while flatteners can actually keep an advanced gun's hit rate below random.

Dsekercioglu (talk)16:28, 11 August 2019

I don't understand, what's unethical about it?

Slugzilla (talk)21:21, 11 August 2019

Sorry, my wording wasn't clear: in order to have a better score against all flatteners, you have to exploit it like [LittleBlackBook] does(which I don't really approve btw) because otherwise your targeting will most likely be average against flatteners.

Dsekercioglu (talk)22:22, 11 August 2019

Ah, that makes sense. But against the guns in ScalarN or DrussGT, would a standard flattener or random movement work better?

Slugzilla (talk)22:31, 11 August 2019

I'm pretty sure a good flattener would outperform random movement after seeing ScalarBot with a PWIN of %100 percent only with a tick flattener but WhiteFang's flattener would most definitely do worse than standard random movement =)

Dsekercioglu (talk)22:49, 11 August 2019
 
 
 
 

Remember there is more than one wave in the air, typically. So even if your random movement is completely random, once you layer a few different waves on top of each other, the first wave constrains the second wave which causes a more predictable profile. What flattening does that random movement doesn't is put that extra effort in to reach the further angles, effectively lowering the peak hit probability. You also have access to bullet shadows, letting you reduce your accumulated hit probability even further.

The implementation differences cause the internal state to diverge so rapidly that I don't think this is really possible to exploit. Certainly I've tried, even looking at both sides of the state to see if I could make something that works, as have many others, in many weird and wonderful ways.

However even the best anti-surfer guns have lower hit rates against any surfer with flattening, than a relatively simple KNN gun gets against the best Random movements. So I would call this approach to guns impossible, and instead you just need to try to adapt as fast as possible for anti-surfing, and use different types of stats that they don't have, not try to simulate their dodging of their simulation of your gun. And for movement, use a flattener, and make your stats a little different from everyone else's flattener.

Skilgannon (talk)12:50, 12 August 2019
 

My posts are lost due to mysql error ;(

Thankfully I had screen shots

Flattener-vs-Random-Xor.png

Xor (talk)13:32, 12 August 2019
 

Cool! Your responses gave me the idea to try to stay at really close range so only one wave is in the air, but then I realized that then the enemy also will have only one wave in the air so it wouldn't help :/

I will definitely use a flattener in my megabot, thanks for the advice!

Slugzilla (talk)02:09, 14 August 2019
 

Pure Flattening Movement Bot

Could someone direct me to a strong bot which only flattens, without surfing, or instruct on me how to change a top bot( DrussGT, Diamond, etc) so that it only uses its flattener? Thanks in advance.

Straw (talk)00:22, 31 January 2014

Sure. In Diamond, it's all in voidious/move/MoveEnemy.java. Just comment out some of these:

    addView(simple);
    addView(normal);
    addView(recent);
    addView(recent2);
    addView(recent3);
    addView(recent4);
    addView(recent5);
    addView(recent6);
    addView(lightFlattener);
    addView(flattener);
    addView(flattener2);
Voidious (talk)00:29, 31 January 2014

Oops, sorry, you'll also want to remove the hit percentage thresholds, like:

        .setPaddedHitThreshold(FLATTENER_HIT_THRESHOLD)

Flattener is only enabled at a certain hit percentage, but you want it always on.

Voidious (talk)00:32, 31 January 2014

Just making sure, this will also disable normal hit logging, so it will only dodge places its been before, not where its been hit? Will I also have to add something to its move history so it has some at the beginning?

Straw (talk)01:01, 31 January 2014

I don't think that will be a problem. I just checked and it's hard-coded to dodge head-on targeting (GF=0) when it doesn't have any stats. It doesn't pre-load the trees or anything, it's just a special case in the code.

Voidious (talk)01:32, 31 January 2014

And yep, all the data sets are configured there, hits and visits are both "first-class citizens". ;)

Voidious (talk)01:33, 31 January 2014
 
 
 

Comment out "some"?

Straw (talk)02:54, 31 January 2014

I'd leave just flattener and flattener2. The lightFlattener is pretty new and enabled at a lower hit percentage threshold, so I dunno, up to you.

Voidious (talk)03:22, 31 January 2014
 
 
 

Curve Flattening Detection?

Has anyone figured out a statistical test which gives a good prediction of the state of an enemy surfer's flattener? It seems that it might be useful in targeting to figure out if they are using a flattener or not.

Straw (talk)06:20, 13 December 2013

Combat measures the peak in kernel density estimation. Low peaks are a sign of curve flattening. But it is used only for energy management. Low power bullets against flatteners, max power bullets against predictable movements.

And I'm using it in melee/team only. Doesn't work against surfers since they create peaks to screw up your data on purpose.

MN (talk)14:22, 13 December 2013
 

While you're at it, detecting if they're surfing at all might be good to have. One thought I've had on that is detecting if their attack angle is relative to you or the wave sources.

Voidious (talk)16:23, 13 December 2013

Current virtual gun systems seem to do a pretty good job deciding if they are surfing or not: until they start flattening.

Straw (talk)16:44, 13 December 2013
 

Combat heading is not perpendicular to either bots or waves. It's heading aims to maximize MEA instead.

MN (talk)16:44, 14 December 2013

How do you determine the best attack angle to maximize MEA?

Straw (talk)23:53, 14 December 2013

According to MEA formula, heading should be perpendicular to a bullet path targeted using head-on targeting. It IS perpendicular movement, but keep moving straight until the wave hits, instead of turning as in orbital movement.

When there are 2 or more waves flying in your direction it becomes more complex, but Combat assumes there is only 1 wave.

If close to walls, then heading should create the longest path which would hit the wall at the same time the wave hits. Combat calculates which point in the wall coincides with waves hitting it with PPMEA. It could also be calculated with precise MEA.

The side-effect is dynamic distancing becoming hard to perform.

MN (talk)13:52, 15 December 2013
 
 

"One thought I've had on that is detecting if their attack angle is relative to you or the wave sources."

That doesn't work with all robots, some surf relative to the enemy robot, rather then the wave source (such as Seraphim).

Chase05:31, 16 December 2013

So it's obviously not perfect, but I still think it's a useful signal. A reliable surf-detection system would probably need quite a few of them.

Voidious (talk)17:50, 16 December 2013
 
 
 

Hitting Pure Flattened Movement?

Has anyone made a targeting system capable of hitting a good sandboxFlattener (Perhaps a top bot with surfing disabled and flattener enabled by default) better than top bots hit strong random movement? This would be a good start for hitting combined surfing and flattening, which is driving hitrates of top guns into the ground ( Below 10, sometimes even 9%).

Straw (talk)16:48, 13 December 2013

What makes you think you could predict a curve flattening movement better than a "random" movement? A good curve flattening movement is a lot like random with a forced even distribution, like Java's Math.random(). It should always have a higher entropy than a naive random, I think.

Voidious (talk)17:03, 13 December 2013

It seems like its theoretically possible to get a higher hitrate (without simulating their movement) because you know that they will move away from where they have moved before, while in random movement there shouldn't be a correlation between where they have moved and where they do move.

Straw (talk)00:00, 14 December 2013

It's possible. A random with an even distribution is less predictable than a skewed random, but it's only a hunch that curve flattening resembles the former.

But while knowing where they won't be is something, and could increase your hit rate, it's really quite far from knowing where they will be. You could know where they won't be 100% of the time and never hit them. :-) And of course there is a correlation in random movement between where they have moved and where they will move, since they are determined by the same algorithm. Isn't it more useful to know where they will be vs where they won't be?

To know where a flattener will be, you'd have to figure out quite a lot about their stats to be able to shoot at the least visited reachable point with any accuracy. And that truly is the holy grail of Anti-Surfer guns, since you could also destroy a normal surfing system if you knew that much (ie, not just a flattener). When surfing first came along (~2005), a lot of folks thought this would happen almost immediately, but so far they are still wrong.

Voidious (talk)00:11, 14 December 2013

Knowing where they won't be increases your average hitrate over time, by limiting the places they could be. Imagine a targeting system which fires outside of their MEA vs one that always fires in the MEA.

Straw (talk)00:52, 14 December 2013

Oh for sure. My most sophisticated attempts at fancy Anti-Surfer guns were along these lines - assume they will go to the safest reachable point on all of the waves in the air at fire time, using precise prediction to figure out reachable points, then restrict my choice of firing angles to the range of remaining reachable points.

What I really want is a mask to apply to the whole range of firing angles, deduced from the probability of all possible enemy movements as they surf the waves in the air. I tried a very (very!) crude version of this once in Dookious.

Voidious (talk)00:57, 14 December 2013
 
 

Oh, and I don't mean to sound too discouraging! I actually think of improvements in Anti-Surfer targeting as one of the remaining frontiers in Robocode, and probably one of the nearer ones. I've spent quite a lot of time trying Anti-Surfer stuff myself, including stuff that precise predicts enemy movements or penalizes places they've been hit. But the best I've come up with in Diamond is still just a simple fast-decaying / well-tuned gun.

Voidious (talk)00:17, 14 December 2013

I think a major problem is that hitting flatteners and surfers is two different things (Despite them often being combined). When running top bots (Diamond vs DrussGT), I notice that once their flatteners are enabled, they often can't decide to use main or anti surfer targeting systems. To me, it seems like an optimized gun for hitting surfers (Fast data decay, fire where they have gone in the past) is not the same as an optimized gun for hitting flattened movement (??? perhaps data decay rate that is opposite of theirs? perhaps a gun that fires at the lowest point of their estimated movement curve in the instead of the highest?), and advanced bots now just have a main + anti surfer gun, with no effective method of dealing with flatteners, let alone flattening combined with surfing. I can imagine the problem would only get worse if bots started having a % rating for their flattener, instead of a simply on or off, allowing to vary how much flattening they do.

Straw (talk)00:49, 14 December 2013

YersiniaPestis has a non-binary flattener, like you describe. He is pretty tough, and I do like the idea. I have several thresholds in Diamond's surf stats, as well, not just 2 modes.

But I don't think some thrashing between guns is a big deal - I certainly don't read that much into it. You have fairly little data, two very strong guns, and an enemy that's constantly changing its movement profile, so a lot of fluctuation doesn't seem surprising. I don't see anything inherently bad about thrashing, either. I still think it's the right move to choose the highest rated gun at any given point, even if it changes every shot.

I don't know, I just don't see a strong distinction between targeting vs flatteners or surfers. It's all the same algorithms and using information that's available to both of you. But I'd love to see some innovation vs either or both. :-)

Voidious (talk)01:11, 14 December 2013
 
 
 
 
 
First page
First page
Next page
Next page
Last page
Last page
Personal tools