AI improvements and priority list

    Joined
    Mar 2, 2014
    Messages
    1,293
    Reaction score
    230
    • Thinking Positive
    • Community Content - Bronze 1
    • Legacy Citizen 3
    Lots of suggestions about improvements for the Bobby AI were made over the years. I combined all I could remember into this one. Part one is a new interface as shown below, while part two are some under the hood improvements. If you think something is missing, feel free to post.

    AI.png
    • AI Active: AI switches into sleep mode when a player enters the entity and wakes up automatically after the player leaves.
    • Target neutral warheads: Essential for shooting down unfactioned torpedoes.
    • Target neutral astronauts: Useful for internal defense guns guarding sensitive areas, that shouldn't be accessible by visitors (= potential saboteurs).
    • Target neutral attackers: All non-allied entities and astronauts that do damage to the AIs entity are classified as hostile. If a docked entity does damage, then its mothership is also classified as hostile.
    • Concentrate fire: If activated, AI will try to attack the same target as other AIs, else it will try to attack a target, that isn't under attack by another AI, yet. The latter is especially useful for point defense.
    • Edit Nov.05.16: Shoot parallel /w mult. outputs: AI will shoot with right-click instead of left-click, if multiple weapon outputs are available.
    • Target distance: Several options are available via dropdown list. These are "closest", "furthest", "median" and "none". All viable targets are sorted by range and attacked in that or the opposite order if "closest" or "furthest" are selected. If "median" is selected, the target in the middle of that list is attacked, while "none" lets the AI ignore target distance.
    • Target size: Same as "Target distance", but sorted by block count instead of distance. If a carrier sends out 50 2-block distraction dummies and 100 drones, the option "median" will pick a drone.
    • Edit Nov.05.16: Target speed: Same as "Target distance", but sorted by current speed (not max speed). This is useful for slow turning turrets on the one hand and turrets with stop effect on the other hand. Should have a lower priority than the two previous options.
    • Missile approaching speed threshold: This refers to the relative speed between missile and anti-missile turret and is intended to prevent the latter from shooting at missiles, that already missed and are flying away. The moment a missile passes by a turret, the approaching speed becomes zero and then goes negative. Since at that point the turret already turned by 90°, it might be better to choose a number somewhat bigger than 0, so the turret will pick another target sooner. Setting the threshold above the speed of slow missiles allows for prioritizing fast missiles. If there are no valid targets, then slower and missed missiles are also attacked. When there are no targets at all, the turret will retrun to its default orientation.
    • Target Priority: The individual entries in this list can be moved from the box "Available Target Options" to the "Target Priority" box via drag&drop. The position of each entry in the list can be changed via drag&drop as well. An AI with the above shown settings would first fire at missiles, then warheads, then astronauts, and if none of these were present, it would shoot at other available targets without further priorization; if "Any" wasn't in the list, the AI would stop firing and return to default orientation instead.
    • Edit Oct.23.16: Keep distance at weapon range: Available options are "highest" (AI tries to keep at a distance from the target so that it can use the weapon with the highest range) and "lowest" (AI gets close enough to have the target within range of all available weapons).

    Further improvements:
    • There's no setting for "Ship/Turret/Torpedo". If the entity is undocked or docked to a rail the AI acts as ship, if it's docked to a turret axis it acts as a turret, and if it's undocked, doesn't have any weapon computers, but warhead blocks are present, the AI tries to ram the target.
    • If a turret AI is set to attack the selected target, it should also attack the same target as the mothership, if that is AI controlled as well. (Not sure if that's already the case, but I think not)
    • Also, AIs should never fire at selected firendly targets.
    • AIs should ignore targets to which no line of sight exists, unless no other targets are available.
    • If several targets with the same priority are present, the visibly closest target should be picked. That is the target that requires the least rotation to aim at.
    • Replace intentional mis-aiming by randomized aiming or at least a pattern where some shots are more precise than others. Seriously, targets below a certain size being unhittable - even with beams - isn't fun.
    Edit Oct.23.16:
    • Target priority should be re-checked immediately after the current target is destroyed or becomes invalid. Otherwise re-checks should only occur every 10-20s, maybe even more, to avoid wasting too much time with switching between targets.
    • Power/shield supply and astrotech beams should be used automatically on friendly targets. Power supply should fire at the target with the lowest power, shield supply should prioritize low system HP, then low shields, and astrotech beams should go for low system HP, then low armor HP (always percentage-wise). Power/shield supply should start when a target drops below ~75% to prevent unnecessary activation. Once started, supply should charge target up to ~95% (or the next re-check) to avoid constantly switching between targets, which are fluctuating around the 75% mark.
    • AI should also be able to use salvage beams on turrets.
    • When a mix of systems is present, first look for a weapon target, then a support target, then a salvage target.
    Edit Oct.25.16: 100% ion weapons should never shoot at unshielded targets, and 100% pierce weapons should likewise never shoot at shielded targets. Weapons with 1-99% ion(pierce) should prefer shielded(unshielded) targets, but also shoot at unshielded(shielded) targets, if no other targets are available.

    Edit Nov.05.16: I suggest the following order of target priorities (from highest to lowest):
    1. Target Priority box
    2. Concentrate fire
    3. Missile approaching speed threshold (if applicable)
    4. Target size
    5. Target distance
    6. Target speed
     
    Last edited:

    Lukwan

    Human
    Joined
    Oct 30, 2015
    Messages
    691
    Reaction score
    254
    Yup...a pretty comprehensive wish list for AI. Every feature or control related to AI I have ever dreamed of is covered in this list. Good job Malacodor

    An AI that functioned this way would provide tremendous tactical control of ship-assets. This would really help make combat , security and fleet-actions less haphazard and wonky. We already have the power...now we need the control.
     
    Joined
    Sep 11, 2015
    Messages
    59
    Reaction score
    19
    • Purchased!
    I hope that support beams can also be used by AI. If that will be the case then there should also be alternatives to choose friendly target for shield and energy supply beams and astrotech beam... and "asteroid" -target alternative for mining beams.
     
    Joined
    Mar 2, 2014
    Messages
    1,293
    Reaction score
    230
    • Thinking Positive
    • Community Content - Bronze 1
    • Legacy Citizen 3
    I hope that support beams can also be used by AI. If that will be the case then there should also be alternatives to choose friendly target for shield and energy supply beams and astrotech beam... and "asteroid" -target alternative for mining beams.
    Good point. But AI should be able to use support beams on friendly targets automatically, without need for specific settings. Same for salvagers. I'll add that to the OP.
     
    Joined
    Sep 11, 2015
    Messages
    59
    Reaction score
    19
    • Purchased!
    Good point. But AI should be able to use support beams on friendly targets automatically, without need for specific settings. Same for salvagers. I'll add that to the OP.
    I've thought about the salvager turrets and they would be awesome!
    Also they could use some options for the targetting: You might want to salvage overheating ships for example, but there might be instances where you wouldn't want to do that (your own ship overheating and you want to rather go fix the ship)... Also you could want to target stations with them and maybe planets (although I think that massive planet mining should be discouraged by game mechanics).
     
    Joined
    Mar 2, 2014
    Messages
    1,293
    Reaction score
    230
    • Thinking Positive
    • Community Content - Bronze 1
    • Legacy Citizen 3
    Added a few things:
    • Option "Keep distance at weapon range"
    • Target re-check interval
    • Support beams
    • Salvage turrets
    • Mixed system priority
    You might want to salvage overheating ships for example, but there might be instances where you wouldn't want to do that (your own ship overheating and you want to rather go fix the ship)... Also you could want to target stations with them and maybe planets (although I think that massive planet mining should be discouraged by game mechanics).
    I don't think an extra option for this is needed. It isn't hard to avoid overheating ships being salvaged.
     
    • Like
    Reactions: Tomssuli
    Joined
    Oct 12, 2015
    Messages
    321
    Reaction score
    257
    • Legacy Citizen 4
    • Community Content - Bronze 2
    • Purchased!
    This would take care of just about everything for AI. Having a toggle between the approach and fire behavior that larger ships currently do and the orbit at speed behavior exhibited by smaller ships would be nice. Ultimately some more advanced approach parameters could be added (Flank, follow, standoff etc.) as well as perhaps retreat conditions (example: if shields drop by X percent, then the AI would retreat from the area).
     

    Raisinbat

    Raging Troll
    Joined
    Dec 29, 2014
    Messages
    459
    Reaction score
    269
    Bump, only change i'd like to see is priority based on target speed.
     

    Raisinbat

    Raging Troll
    Joined
    Dec 29, 2014
    Messages
    459
    Reaction score
    269
    Current or maximum speed? What would this be good for?
    Max, fast ships can dodge slow weapons like mis/pul, mis/can or can/pul weapons before they manage to hit them, turrets using these weapons would end up wasting their shots.
     
    Joined
    Feb 1, 2015
    Messages
    214
    Reaction score
    558
    Lots of suggestions about improvements for the Bobby AI were made over the years. I combined all I could remember into this one. Part one is a new interface as shown below, while part two are some under the hood improvements. If you think something is missing, feel free to post.

    View attachment 33786
    • AI Active: AI switches into sleep mode when a player enters the entity and wakes up automatically after the player leaves.
    • Target neutral warheads: Essential for shooting down unfactioned torpedoes.
    • Target neutral astronauts: Useful for internal defense guns guarding sensitive areas, that shouldn't be accessible by visitors (= potential saboteurs).
    • Target neutral attackers: All non-allied entities and astronauts that do damage to the AIs entity are classified as hostile. If a docked entity does damage, then its mothership is also classified as hostile.
    • Focus fire: If activated, AI will try to attack the same target as other AIs, else it will try to attack a target, that isn't under attack by another AI, yet. The latter is especially useful for point defense.
    • Target distance: Several options are available via dropdown list. These are "closest", "furthest", "median" and "none". All viable targets are sorted by range and attacked in that or the opposite order if "closest" or "furthest" are selected. If "median" is selected, the target in the middle of that list is attacked, while "none" lets the AI ignore target distance.
    • Target size: Same as "Target distance", but sorted by block count instead of distance. If a carrier sends out 50 2-block distraction dummies and 100 drones, the option "median" will pick a drone.
    • Missile approaching speed threshold: This refers to the relative speed between missile and anti-missile turret and is intended to prevent the latter from shooting at missiles, that already missed and are flying away. The moment a missile passes by a turret, the approaching speed becomes zero and then goes negative. Since at that point the turret already turned by 90°, it might be better to choose a number somewhat bigger than 0, so the turret will pick another target sooner. Setting the threshold above the speed of slow missiles allows for prioritizing fast missiles. If there are no valid targets, then slower and missed missiles are also attacked. When there are no targets at all, the turret will retrun to its default orientation.
    • Target Priority: The individual entries in this list can be moved from the box "Available Target Options" to the "Target Priority" box via drag&drop. The position of each entry in the list can be changed via drag&drop as well. An AI with the above shown settings would first fire at missiles, then warheads, then astronauts, and if none of these were present, it would shoot at other available targets without further priorization; if "Any" wasn't in the list, the AI would stop firing and return to default orientation instead.
    • Edit Oct.23.16: Keep distance at weapon range: Available options are "highest" (AI tries to keep at a distance from the target so that it can use the weapon with the highest range) and "lowest" (AI gets close enough to have the target within range of all available weapons).

    Further improvements:
    • There's no setting for "Ship/Turret/Torpedo". If the entity is undocked or docked to a rail the AI acts as ship, if it's docked to a turret axis it acts as a turret, and if it's undocked, doesn't have any weapon computers, but warhead blocks are present, the AI tries to ram the target.
    • If a turret AI is set to attack the selected target, it should also attack the same target as the mothership, if that is AI controlled as well. (Not sure if that's already the case, but I think not)
    • Also, AIs should never fire at selected firendly targets.
    • AIs should ignore targets to which no line of sight exists, unless no other targets are available.
    • If several targets with the same priority are present, the visibly closest target should be picked. That is the target that requires the least rotation to aim at.
    • Replace intentional mis-aiming by randomized aiming or at least a pattern where some shots are more precise than others. Seriously, targets below a certain size being unhittable - even with beams - isn't fun.
    Edit Oct.23.16:
    • Target priority should be re-checked immediately after the current target is destroyed or becomes invalid. Otherwise re-checks should only occur every 10-20s, maybe even more, to avoid wasting too much time with switching between targets.
    • Power/shield supply and astrotech beams should be used automatically on friendly targets. Power supply should fire at the target with the lowest power, shield supply should prioritize low system HP, then low shields, and astrotech beams should go for low system HP, then low armor HP (always percentage-wise). Power/shield supply should start when a target drops below ~75% to prevent unnecessary activation. Once started, supply should charge target up to ~95% (or the next re-check) to avoid constantly switching between targets, which are fluctuating around the 75% mark.
    • AI should also be able to use salvage beams on turrets.
    • When a mix of systems is present, first look for a weapon target, then a support target, then a salvage target.
    Yes!! Great job, EXACTLY how I want it too, I support you 100%!
     
    Joined
    Mar 2, 2014
    Messages
    1,293
    Reaction score
    230
    • Thinking Positive
    • Community Content - Bronze 1
    • Legacy Citizen 3
    Max, fast ships can dodge slow weapons like mis/pul, mis/can or can/pul weapons before they manage to hit them, turrets using these weapons would end up wasting their shots.
    Dodging ability is closely related to size, I'm not sure if a seperate speed setting would be much of an improvement. Also, maximum speed of a ship would realistically be a secret. I guess many players wouldn't like if AIs would magically know their max speed.
     

    Raisinbat

    Raging Troll
    Joined
    Dec 29, 2014
    Messages
    459
    Reaction score
    269
    Dodging ability is closely related to size, I'm not sure if a seperate speed setting would be much of an improvement. Also, maximum speed of a ship would realistically be a secret. I guess many players wouldn't like if AIs would magically know their max speed.
    Related, yes, but there's a lot of variance. a 120k mass ship can still reach 1.7TWR, at least last i tried fiddling with one, and still have decent weapons and shields, but very few people go that far. They're outliers but if outliers consistently win they become the norm, just like docked reactors did.
     
    Joined
    Mar 2, 2014
    Messages
    1,293
    Reaction score
    230
    • Thinking Positive
    • Community Content - Bronze 1
    • Legacy Citizen 3
    Made another edit to factor in ion/pierce effects in target selection.
     

    StormWing0

    Leads the Storm
    Joined
    Jun 26, 2015
    Messages
    2,126
    Reaction score
    316
    • Community Content - Bronze 1
    Yep this could be added onto so much. :P AI needs a functionality upgrade badly.
     
    Joined
    Mar 2, 2014
    Messages
    1,293
    Reaction score
    230
    • Thinking Positive
    • Community Content - Bronze 1
    • Legacy Citizen 3
    • Renamed "Focus fire" to "Concentrate fire" to avoid misunderstandings regarding focusing multiple weapon outputs.
    • Added option "Shoot parallel /w mult. outputs" for focused (left-click) or unfocused (right-click) firing of multiple weapon outputs.
    • Added "Target speed" option suggested by Raisinbat, but I think current speed makes more sense than max speed.
    • Added order for handling the different priorities.
     

    Lukwan

    Human
    Joined
    Oct 30, 2015
    Messages
    691
    Reaction score
    254
    Another thought. If the effort is made to incorporate this I would like like to be able to save the settings and then switch between my saved settings.

    This would make it easier to toggle between 'modes' like Battle-stations or Area Defense, fine tuning each appropriately.
     
    • Like
    Reactions: Malacodor
    Joined
    Mar 2, 2014
    Messages
    1,293
    Reaction score
    230
    • Thinking Positive
    • Community Content - Bronze 1
    • Legacy Citizen 3
    Another thought. If the effort is made to incorporate this I would like like to be able to save the settings and then switch between my saved settings.

    This would make it easier to toggle between 'modes' like Battle-stations or Area Defense, fine tuning each appropriately.
    We need a practical interface where we can group turrets and modify the AIs of an entire group at once and save/load these configurations.