I still don't get it :) ...

Jump to navigation Jump to search

Hmm. I can't tell if there's anything you're misunderstanding or if you just disagree that average displacement per tick is a reasonable way to deconstruct a bot's movement. If it's the latter, I would argue that GuessFactors are the undisputed king of representing enemy movement in 1v1 and they scale across the exact same dimension, so I think it's at least a reasonable approach. I'll just outline an example so we can make sure we're on the same page, and to show how they are similar to GFs in 1v1.

Let's say the enemy is at a distance of 420, exactly perpendicular to you, traveling at full speed, and you're using bullet power 2. By the time your bullet or wave gets there, something like 35 ticks have passed, and let's say the enemy traveled straight at full speed the whole time. Here we can record a GuessFactor of 1 or a displacement vector of (0, 8). Later, the enemy is at a distance of 470 - close, but different - and you use this previous data point to fire. Both the GF=1 and the vector=(0, 8) would translate to the same firing angle, and if the enemy traveled at full speed directly ahead again, they would both hit. If the enemy had traveled at half speed, or traveled ahead for 2/3 of the time and reversed direction the last 1/3, you'd end up with something like GF=0.5 and vector=(0, 4). If the enemy is not perpendicular when you apply the GF and the DV, that's when they start to act differently. And in Melee, I think the DV acts differently in a good way - in 1v1, perpendicular is the default position for you to work relative to, but in Melee it certainly isn't, so the DV has an advantage in that it works relative to the enemy's initial heading.

Are we on the same page with that? And do either or both of those seem like reasonable ways to record and reconstruct the enemy firing angle?

To answer your questions about BrokenSword:

  • Yes, I do care that I haven't seen the enemy for a few ticks, and in Diamond I add those ticks to the amount that I project the displacement vectors. I tried doing this in BrokenSword and saw no improvement, so I left it out. His displacement vector stuff is rough enough that I wasn't surprised, and I can use all the code size I can save here.
  • Why is scaling the vector to whatever bullet time I want such a bad thing? Taking the 20-tick vector and applying it to a 30-tick situation, I just assume the enemy will move 50% farther, and in the same direction relative to his current heading as he did in the 20-tick case. Is this not a reasonable guess based on the enemy's behavior in the 20-tick situation?
  • Actually, I think Tron sounds like a perfect movement to confuse displacement vectors, because they are applied relative to his initial heading, which is wiggling all over the place. Also, BrokenSword's gun is currently pretty crap :-), despite having a pretty cool base with the DV and Shadow Melee Gun stuff. I'm hoping I could improve it when I stop to give it some love.

I still wonder if your view is more that Play It Forward is the only way to go? I actually think that's a pretty reasonable viewpoint. But I think with Displacement Vectors, and particularly with GuessFactors, you save so much CPU speed vs PIF that you can apply a lot more data for each time you aim, and this makes up for the noise added when you distill the movement into a scalar value.

Voidious03:34, 18 August 2012

I found I could speed up my PIF enormously through a combination of 2 things:

1) Using a Shadow-style 'projected' PIF that doesn't need trig except at the beginning/end to transform between fields

2) Doing the PIF over the sparse scans that I get from melee radar, and only interpolating at the end after I have determined between which two sparse scans the wave would hit.

The first technique knocks out all of the trig, and the second reduces the time of each PIF by ~4-8x. My gun now hardly even contributes to my runtime, which basically means that I could increase my kNN's 'K' by quite a bit if it improved the scores.

Skilgannon08:21, 19 August 2012
 

Speaking of, I've found it really odd that I don't gain anything by increasing the k in my Melee gun. I'm at like 100 total for all bots and increasing it doesn't seem to change anything. That's only 20 scans per bot in the average case. In 1v1 my gun scales up to hundreds of scans for a single bot!

Voidious08:44, 19 August 2012