How can AI learn to fly(or at least try to avoid getting tangled with other ships)

    How to teach AI to fly?

    • Don't let them fly around...

    • Maybe we humans dont get the concept of point-to-ponit movements in space...

    • Try to sort them out and give licence only to those who dont ram into stuff...

    • Work on THIS problem more!


    Results are only viewable after voting.
    Joined
    Nov 5, 2015
    Messages
    5
    Reaction score
    7
    "I have been at the edge of the galaxies, and I have seen exploding stars, and Titans colliding, and those same Titans shaking and twitching next to a few little buzzards trying to align themselves in a straight line .. XD"

    It is a really tricky question, and I can imagine how hard it is to answer this correctly.. not to mention the actual coding of the solution in java..

    I have been around for quite a long time, I remember building without wedges, and stuff.. ;)
    ...
    but IT just came to me a few days ago, hanging around and testing NPC factions and fleet maneuvers, realizing that this crazy straightforward approach might just help:

    SLOW DOWN the ship when approaching target / destination...
    If it is coming in from like systems away, start slowing down when entering neighboring sectors...
    If it is just fleet formation, don't even accelerate over 10% max speed, and when in < 100m radius, slow down to 1% or even less...

    Any ideas on why shouldn't we try this, or have this been tested and failed already?
    [doublepost=1482088579,1482087594][/doublepost]Also, if I am not mistaken, I think the AI ships cannot glide UP /DOWN or strafe LEFT / RIGHT.. They basically fly in a straight line forward, then turn around and go forward-facing till the next turn-point...

    And this behavior is getting very messy and chaotic for example when aligning to fleet formation...
    ...but i think, maneuvers like this with side movements (without turning) would be a breeze of cool wind and all ships would shift into place with no collision...
     
    Joined
    Jun 24, 2015
    Messages
    385
    Reaction score
    59
    Surprisingly, the biggest problem with AI and "ramming" into one another, is that the AI doesn't bother paying any attention to what anything other than it's chosen target is doing. (save, perhaps, for whether something else is a better/closer target)

    So, for example, an Isanth tracking a mining ship, will cheerfully ram anything and everything between it and maximum-weapons range to it's target. In as straight a line as possible. (assuming that everything else is either asteroids, or same-faction as the Isanth.)

    This is why they still ram into planets and stations. (planet ramming is much, much rarer now, I think the devs coded an exception?)


    As to how they maneuver? Yes and no. If you get "closer" to them than they'd like to be, they'll turn aside and run back to their chosen weapons range.

    If you just sit there though, they'll gladly (if slowly) circle-strafe you. (I'd rather they go back to the older maneuver code, where they'd circle strafe at high speed)

    Now, I didn't realize this at first, but if you blast off all of an AI's weapon computers, it will switch to "ramming" as it's chosen tactic.
    So, every so often, the ramming is intentional.


    Its just most of it that isn't.
     

    jayman38

    Precentor-Primus, pro-tempore
    Joined
    Jul 13, 2014
    Messages
    2,518
    Reaction score
    787
    • Purchased!
    • Thinking Positive
    • Legacy Citizen 4
    It sounds like flocking behavior needs to be introduced to the AI.

    Such behavior will cause AI entities to simply "fly away" if something gets too close. Naturally, this routine will need to be skipped during "docking" or other danger-close commands, but normally, it should work fine.
     
    Joined
    Aug 17, 2014
    Messages
    34
    Reaction score
    11
    • Purchased!
    • Legacy Citizen 3
    I think the AI just needs to be taught to maintain distance determined by its tactical state, which, in its turn, is determined by combat role, weapon set (and distribution of possible DPS, also considering accuracy and target's size), both shields and hp (and damage done (in blocks) in this particular battle by opponent), and also the estimated strenth of the opponent.