Author Topic: Better Intelligence for Automated Anti-missile Defences  (Read 1284 times)

0 Members and 1 Guest are viewing this topic.

Offline SteveAlt (OP)

  • Global Moderator
  • Rear Admiral
  • *****
  • Posts: 820
  • Thanked: 8 times
Better Intelligence for Automated Anti-missile Defences
« on: December 23, 2008, 01:00:50 PM »
I recently found a bug in the code for missile launchers used in automated anti-missile mode. When a fire control system was given one of the various target modes, such as "Two anti-missiles per target missile", it wasn't taking in-flight missiles into account and was therefore launching too many anti-missiles. Obviously this is better than launching too few but it can still result in wasted missiles. I fixed the bug but decided to go a step further and improve the intelligence used by the automated anti-missile missile fire. In v3.2 (the released version) fire controls in normal (non-independent mode) fire on the closest missile salvo (or largest if two were equally close) and continue firing until the number of missiles in flight is equal to the specified amount. For example, if a salvo of twenty missiles is incoming and the mode is "Three anti-missiles per target missile" the ship will continue firing until sixty anti-missiles are in flight. As incoming missiles are destroyed and anti-missiles expended the ship will recalculate the amount of anti-missiles required and launch more as required. If there are multiple defending ships, each of the defending ships will take into account missiles launched by the others. So if there were twenty incoming missiles and two defending ships have the "Three anti-missiles per target missile" mode set, they will continue firing until a total of sixty anti-missiles are in flight. At least that is how it was supposed to work without the bug.

There are also five independent modes in v3.2, which means a ship will only engage missile salvos that are not being engaged by other ships of the same race. These modes were added because if there are multiple small incoming salvos any defending ships in normal mode will all concentrate on the closest salvo until it is destroyed and then work their way through the others, which may not be particularly efficient. In independent mode, a ship will engage the closest incoming salvo that is not already being engaged by another ship, overcoming that difficulty. Having different ships set to normal and independent mode allows a lot of flexibility.

However, even the current model above has its limitations. Imagine a scenario where there are three incoming salvos of twelve missiles grouped together and six defending ships each with twelve launchers. If they are set to "Two anti-missiles per target missile" in normal mode then all six ships would target the first salvo but only two would engage it, firing 24 missiles in total, and the other ships will remain silent because enough missiles were already in flight. Once the first salvo is destroyed, the first two ships will switch to the second, etc. but still the others would not fire. While two more ships could be brought into the fight by changing the mode to "Four anti-missiles per target missile" that might not be ideal if the anti-missiles are particularly accurate and launching so many would waste them. Conversely, if all the ships were set to a mode of "2v1 (Independent Target)", the first three ships would all engage one salvo each and the other three ships would remain silent throughout. That is probably better but still leaves three ships out of the engagement.

Therefore, for v3.3 I have added a little more intelligence to the normal mode. When deciding which salvo is closest, a fire control in normal mode will ignore any salvo where enough missiles are already in flight to suit its current mode. In the example above if all six defending ships are set to "Two anti-missiles per target missile" then as soon as the three incoming salvos are detected, the first two ships will launch missiles against the first salvo. Five seconds later when the other four ships check for targets, the first salvo will be ignored as enough missiles are already in flight to fulfil the 2v1 requirement so two ships will engage the second salvo (as it now appears to them as the closest). Five seconds later, the last two ships will engage the third salvo as the first two salvos are being ignored from their point of view.

I still need to play around with the details a little. Fire controls are going to be switching targets quite often and that will affect missiles that they already have in flight. One pitfall would be a fire control deciding a target can be safely ignored because enough missiles are attacking it when those missiles are actually under the control of the fire control making the decision :) I think missiles launched by the "deciding" fire control will have to be ignored when checking if a target has enough assigned missiles or perhaps a fire control can be "locked" to a particular hostile salvo while it still has missiles in flight. I'll need to experiment as to the best option.

Steve
 

Offline SteveAlt (OP)

  • Global Moderator
  • Rear Admiral
  • *****
  • Posts: 820
  • Thanked: 8 times
Re: Better Intelligence for Automated Anti-missile Defences
« Reply #1 on: December 23, 2008, 04:11:29 PM »
Quote from: "SteveAlt"
Fire controls are going to be switching targets quite often and that will affect missiles that they already have in flight. One pitfall would be a fire control deciding a target can be safely ignored because enough missiles are attacking it when those missiles are actually under the control of the fire control making the decision :) I think missiles launched by the "deciding" fire control will have to be ignored when checking if a target has enough assigned missiles
I have implemented the above and tested it in a battle in my current campaign. Although there is some switching of targets if several incoming salvos are in the same location, the overall effect is very good. Automated anti-missile combat is now functioning exactly as I wanted it to originally and defending ships work extremely well together. I don't think anyone will ever need to use the "independent" modes again but I'll leave them in there for the moment until I am sure.

Steve