A short "what if" about AI.

    Ithirahad

    Arana'Aethi
    Joined
    Nov 14, 2013
    Messages
    4,150
    Reaction score
    1,330
    • Purchased!
    • Top Forum Contributor
    • Legacy Citizen 8
    I've noticed that, while the new AI has a simple collision avoidance method that will usually make it go around something once it has nearly collided with it, the resulting behaviour is really silly-looking and often wastes time while the AI repeatedly retries its current path.

    What if, when ship AI identifies a target or a destination to move to - be that a docking area, a point within weapons range of an enemy ship, or an a random point in space where it's been ordered to go - it shoots a ray (an invisible 'beam') at that point in space, using the same tech that is currently used for damage beams, salvage beams, and so on.

    If the ray reaches the target (or, in the case of an empty point in space, if it doesn't hit anything), the AI ship flies to the target as normal. If not, it tries to plot a course that leaves a decent amount of space between itself and whatever object obstructed the beam, or alternatively, it simply circles around the target at its current distance and keeps on casting its ray until it can find a clear path, then flies to its target destination.

    Would this have performance costs that outweigh the benefit of the AI not looking stupid? Would there be some other unforeseen issue? Is there a better way to do this that wouldn't be more complicated and performance-heavy? Or is this a viable improvement to the AI?

    I'm not really sure if this even goes onto the Suggestions board, or if it goes into General, but I get the sense that I'd be the most likely to get a council/Schine response here.
     
    Last edited:

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    Yes, Ray Casting (in some cases, casting multiple rays in different directions from the AI agent) can really improve AI behavior, as long as there are logical rules for decision-making. It can even save on processing power if the decision from a raycast allows an AI agent to avoid collisions or other encounters that cost a lot of CPU. Unfortunately, this is a job specifically for Schema, so AI improvements are in direct competition with all the other programming tasks in the pipeline, unless one of the new programmers specialize in AI behavior. It will be all-too-easy to put off AI improvements at this Alpha stage of the game.