Bots and Simulations > Tips and Tricks

Trajectory prediction and steering control

(1/3) > >>

MacadamiaNuts:
I'm not a maths guy, I always approach problems with a brute trial and error strategy.

I was wondering if anyone knew a simple algorithm to predict the trajectory of a target bot. Also we could discuss here about steering control strategies. The *.refxpos *.refypos angle aiming doesn't consider the lateral speed, that's why when a bot aims a static target it can enter a silly orbit and never reach it.

Currently what I'm doing is add '*.veldx add' into the 360ยบ nine eyes turning. That means that, when the bot is moving laterally, it will oversteer to compensate. It doesn't do much when the target bot is fast and isn't moving away, but it seems to break the orbits.

Probably I'd should add too the *.veldn speed somewhere, to avoid overtaking the target.

googlyeyesultra:
Obviously, the easiest way is to velocity match 'em.

Something like *.refveldx *.veldx sub .dx store tends to alleviate basic aiming problems, but it also prevents you from doing spiffy movement patterns.

Numsgil:
it would actually be *.refveldx .dx store, refvel always measures relative speed.  It's the method used in Animal Minimalis.

That should also handle issues of trying to shoot a shot to go where the bot will be instead of where it currently is.  The downside is that you have to actually match their vector.  Which means expending energy to alter your course.

If you get in to not wanting to modify your vector, but still fire a shot that will intersect another bot's project path, you get in to a huge mess of crap.  The problem is that you'd really need to know the distance to another bot, and the only way to determine that is to decode the values returned from the eyes.

MacadamiaNuts:
What about the 'dist' command? Like *.refxpos *.refypos dist. But it still would get complex including the body size. Too hardcore for me anyway. Meh, 'bio' sims should be run with thick fluid physics I think. I can't help but feel something wrong about turning DB bots into some sort of intelligent torpedoes or nasty mechanical Battlebots...

googlyeyesultra:
I fiddled around with something like this a while back, and I think Guardian does some of this too. Generally speaking, it only works if you face directly upwards all of the time so that you can just add refvelup times the number of expected cycles to *.refypos, and the same thing with refveldx. That gives you predicted coordinates, and after a few iterations of that, you should have a fairly accurate prediction of where to aim.

Navigation

[0] Message Index

[#] Next page

Go to full version