I don't have matlab, so I'm gimping it with python.
PD tons per incoming missile to reliably kill 90% of each salvo 90% of the time.
This takes into account gear size savings for larger mounts.
Taking the 90th percentile from each group rather than averaging lets us count overkill properly.
#!/usr/bin/python3
import math, random
def turretsToKill(shotsPerTurret, cth, missiles):
shots = 0
missiles = math.ceil(missiles * 0.9) # a partial missile is as good as a whole one
while missiles:
shots += 1 # shoot
if random.random() < cth:
missiles -= 1 # hit
turrets = shots // shotsPerTurret # full turrets
if shots % shotsPerTurret:
turrets += 1 # partial turret
return turrets
# assuming 4x tracking speed
gearFactor = {
1:1.4,
2:1.36,
3:1.34,
4:1.32
}
print(', '.join(['baseCTH', 'guns/turret', 'gunSize', '2', '4', '6', '8', '10', '12', '14', '16', '18', '20']))
for baseCTH in [1.0, 0.75, 0.5, 0.25]:
for gunsPerTurret in range(1, 5):
gunRoF = 4
gunSizes = [0.6, 1, 3, 6]
shotsPerTurret = gunRoF * gunsPerTurret
for gunSize in gunSizes:
cth = baseCTH * gunSize / 6 # smaller gun accuracy penalty
print(', '.join(['%0.2f' % baseCTH, str(gunsPerTurret), str(gunSize)] + ['%0.3f' % (sorted(turretsToKill(shotsPerTurret, cth, salvoSize) for x in range(10000))[8999]*gunSize*gunsPerTurret*gearFactor[gunsPerTurret]/salvoSize) for salvoSize in range(2, 22, 2)]))
Looking over the data, the results vary all over the place.
turret.csv is the output of the above program .
best.csv is the best mount for each target set, grouped by base chance to hit.
The best overall was against 16 missile salvos at 100% base chance, with the quad/6 coming out on top at 1.98HS/missile.
The worst winner was against 2 missile salvos at 25% base chance, with the triple/0.6 coming out on top at 15.678HS/missile.
Single turrets were best 10 times and doubles 4 times with triples and quads tied at 13 times each.
Size 0.6 guns were best 9 times, size 1 guns 5 times, size 3 guns 7 times, and size 6 guns won 19 times.
Despite quad and size 6 both being leaders, quad/6 only won twice.
I think the mistake I made before was using too-large missile salvos, which masked the overkill problem that quad/6 turrets experience against very small salvos.