🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Best spaceship Chasing algorithm

Started by
23 comments, last by ZeroBit 22 years, 5 months ago
Anyone here knows what is the best chasing algorithm for spaceship / planes ? How to determine best turning angle, speed, acceleration to reach a certain point ?
Advertisement
I would suspect that it is a combination of calculating an intercept vector and then applying the vehicle''s maneuvering limits to an attempt to achieve that vector. Of course, by the time the intercept vector is reached, the intercept point will have changed so the algorithm needs to be constantly updated and the vehicle''s maneuvering constantly updated to reflect that.

Of course, I would like someone to help out with a good 3-D intercept plotting formula for me. I was planning on asking about that anyway. :-D

Dave Mark
Intrinsic Algorithm Development

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

based on the current direction and maybe acceleration and/or rotation speed (average of last few frames?) the AI could get a point where the plane/ship will soon be. it could then calculate how long it would take to get there, if it would take too long, it could try the next possible point. repeat until the points get to where it would take too long.
(http://www.ironfroggy.com/)(http://www.ironfroggy.com/pinch)
That''s what I said!

Dave Mark
Intrinsic Algorithm Development

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

Quite some time ago I wrote an AI to act as a predator for catching dumb prey. The prey maintained a constant velocity and bounced off walls, adding the requirement that the predator learned how to deal with sudden changes in the preys trajectory. The predator selected an action so as to minimise distance and/or angle to the target. The predator started with random rules and very quickly learned to catch the prey and deal with walls and corners.

Why am I telling you this? Because, as a steering behaviour, choosing a course correction that decreases angle and/or distance turns out to be very useful if you want to catch a moving target.

Hope this helps,

Timkin

quote: Original post by Timkin
Because, as a steering behaviour, choosing a course correction that decreases angle and/or distance turns out to be very useful if you want to catch a moving target.

By which, I assume you mean plotting intercept vectors so that you are not heading toward the target, but rather heading toward where the target is heading - so to speak. That''s what I was getting at.



Dave Mark
Intrinsic Algorithm Development

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

quote: Original post by InnocuousFox
By which, I assume you mean plotting intercept vectors so that you are not heading toward the target, but rather heading toward where the target is heading - so to speak. That''s what I was getting at.


No, that''s NOT what I was saying at all.

Timkin
Oh... thank you for clarifying... very helpful. Exactly how, then, does what you posted relate to the original question?

Dave Mark
Intrinsic Algorithm Development

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

Fox:
Timkin''s original post was fairly clear - minimising the angle and distance to the target itself, rather than predicting the movement.

That said, a knowledge based approach which identified very likely movement and anticipated that would surely perform better. Or a more persistant prediction: i.e. use the weighted average of the 4 previous velocities for the prediction.

Also, you may want to look for co-evolution of fleeing and pursuit behaviours in google... I found some nice stuff on this a while back (I don''t have the link handy).


Artificial Intelligence Depot - Maybe it''s not all about graphics...

Join us in Vienna for the nucl.ai Conference 2015, on July 20-22... Don't miss it!

quote: Original post by alexjc
Fox:
Timkin''s original post was fairly clear - minimising the angle and distance to the target itself, rather than predicting the movement.


How would you effectively minimize distance without calculating (not predicting) where the target is going to go based on its current movement? You have to at least use that as a starting point.

Dave Mark
Intrinsic Algorithm Development

Dave Mark - President and Lead Designer of Intrinsic Algorithm LLC
Professional consultant on game AI, mathematical modeling, simulation modeling
Co-founder and 10 year advisor of the GDC AI Summit
Author of the book, Behavioral Mathematics for Game AI
Blogs I write:
IA News - What's happening at IA | IA on AI - AI news and notes | Post-Play'em - Observations on AI of games I play

"Reducing the world to mathematical equations!"

This topic is closed to new replies.

Advertisement