Performance Enhancing Bug

Jump to navigation Jump to search

For the sake of easy reference, below is all immediately relevant code. The weight is 4 if this is a wave fired the same tick that an actual bullet was fired, and 1 otherwise. Notice that the actual smoothing is done by raising the difference between the current GF and the visited GF to the power of 0.3. I tried factors of 0.1 and just 0 (effectively the same as not smoothing at all), with little success.

int gf = GF_ONE;
try
{
	do
	{
		waveGuessFactors[gf] *= 0.995;
		waveGuessFactors[gf] += (weight * Math.pow(0.3, Math.abs(gf - (int)(GF_ZERO + Math.round(Utils.normalRelativeAngle(Math.atan2(enemyLocation.x - firePosition.x, enemyLocation.y - firePosition.y) - absoluteBearing) / bearingDirection)))));
		gf--;
	}
	while (true);
}
catch (Exception ex)
{
}


I highly doubt your first hypothesis, because every other GF than the one that was actually visited would be increased by 0. Unless of course, the wave has a weighting of 4, but even before I added weighting, the int arrays performed better.

Your second hypothesis has the same problem. Any GF other than the visited GF would get rounded down to 0, under normal circumstances.

Sheldor (talk)23:24, 8 May 2013

Yeah, the first hypothesis was only applicable to greater-than-1 weight for most kinds of smoothing, which I had thought to be likely.

The second hypothesis still isn't ruled out by that however. "Any GF other than the visited GF would get rounded down to 0" is in fact the most extreme version of what I describe in the second hypothesis.

Now that I know you are using a weight of 1 however... and thinkning about your decay... I'm now quite certain that the real cause is not anything about the smoothing, but the decay. Specifically, applying the operation "foo *= 0.995" where "foo" is an integer in the range 1 to 199, is equilivant to a decrement-by-one operation. When your weight is 1 and your array is an integer one... this means that your decay might as well be "foo *= 0.0" because you're immediately completely erasing the last data point when the next arrives.

Rednaxela (talk)00:11, 9 May 2013

That makes a lot of sense. Thank you for your help. I guess I'll have to try out decay rates until I find one that matches the performance of the bug.

Has anyone ever made an AS gun that only took one wave into account at any given time?

Sheldor (talk)01:10, 9 May 2013
 

You do not have permission to edit this page, for the following reasons:

  • The action you have requested is limited to users in the group: Users.
  • You must confirm your email address before editing pages. Please set and validate your email address through your user preferences.

You can view and copy the source of this page.

Return to Thread:Talk:Anti-Surfer Targeting/Performance Enhancing Bug/reply (4).

Also, weighting real-bullet waves higher than tick waves helps too, right?

Do you think I would be able to fit a Virtual Guns system in 100-200 bytes? Or will I just have to sum the different buffers like Vyper?

Sheldor (talk)01:18, 9 May 2013

Against surfers, yes. Real waves are more meaningful since surfers react to waves.

Against flatteners, no. The more data you use, the harder it is to flatten all statistics.

MN (talk)03:06, 9 May 2013

I'm not sure I agree it won't help against flatteners. I think you're saying that because flatteners are specifically surfing your firing waves, it might help to use virtual waves so they can't surf as well. But it's kind of an arms race where the gun always has the advantage, so using firing waves may still help your gun more than it makes your gun more surfable.

Voidious (talk)17:28, 9 May 2013

I'm saying that because flatteners avoid GFs that were used before, and before being hit there. The gun doesn't have an advantage, at least in the beginning of a battle. After a while, classification kicks in and it becomes harder and harder to flatten the specific data subset the gun selected using k-NN search or VCS.

MN (talk)14:37, 11 May 2013
 

Along the same lines, Random Targeting is the most "unsurfable" targeting strategy, but my Anti-Surfer gun still outperforms that vs everyone.

Voidious (talk)17:32, 9 May 2013

I've wondered about a random targeting scheme that only shoots within precise MEA. Have you tested that vs. your anti-surfer?

Skilgannon (talk)17:44, 9 May 2013

No, but I've been curious about that too, only for one bot in particular... ;)

Voidious (talk)18:00, 9 May 2013
 

I've found myself wondering about the reverse recently... if a sufficiently advanced (I have some tricks in mind...) random-movement surfer (note, not active flattener) could outperform usual methods against some of the strongest anti-surfer targeting that a few bots have...

Rednaxela (talk)20:39, 9 May 2013

This I actually have spent a substantial amount of time working on. All sorts of extra randomization of surfing stats, fully random surf stats that get completely regenerated each time you get hit, or every so often, mixes of random and normal surf stats and flatteners, and so on. I thought a totally new movement profile every time you get hit would have a lot of potential, but I just didn't get it close to outperforming my existing stuff.

Voidious (talk)20:42, 9 May 2013
 
 

Pure random targeting is sound according to game theory, assuming there is only 1 wave flying at a given time.

With 2 or more waves, shooting at all GFs with the same probability may not be the optimal strategy. A weighted random targeting might be stronger.

MN (talk)14:47, 11 May 2013

True, although I'd hate to have to evaluate that function. It could probably be done with Monte-Carlo though, although it would be VERY VERY slow due to the precise predictions that would have to take place. Maybe some sort of high-speed precise prediction lookup table could work here.

Skilgannon (talk)20:46, 13 May 2013
 
 
 

If you already have the waves running a VG shouldn't be that much more codesize, just another thing to check when the wave breaks. Of course, it is important to have your VG only work on real waves otherwise it is pretty useless against surfers and bots that react to bullet fire.

Skilgannon (talk)10:36, 9 May 2013

Should I even bother using non-bullet waves against surfers?

Sheldor (talk)12:51, 9 May 2013

I ignore them in DrussGT with my anti-surfer DC/KNN gun, but it's really your call.

Skilgannon (talk)17:15, 9 May 2013
 

FWIW I use virtual waves against surfers, but with a lower weight than in my main gun.

Voidious (talk)17:23, 9 May 2013