Precise rules for multi-player combat?

The most exact rules I can find for 3- or more way conflict is that the attackers lose ships “roughly evenly”.

I’m trying to write a combat calculator that can actually predict the outcome of a multi-way battle in the absence of formal alliances. Does “roughly evenly” mean the defender does dwt damage to each fleet at a time, with leftovers carrying forward? Does the defender intelligently hit the largest fleet first or the smallest first? Or does “evenly” mean one ship at a time?

Let me try to illustrate with an example: D defends with 6 ships, WS 5. A and B attack with 1 ships and 7 ships respectively, WS 6.

Scenario 1: D defends against a single fleet at a time, stupidly.
First, A’s fleet is eliminated because dwt = 6. Then B is reduced to 2 ships.
Then B’s fleet kills 6, leaving 0.
B survives and owns the planet w/2.

Scenario 2: D defends against a single fleet at a time, intelligently.
First, D kills 6 of B’s ships, leaving A w/1 and B w/6.
Then, D dies.
Then, A is assigned defender because they traveled shortest distance.
Then A deals 7 damage to B, eliminating him.
A survives and owns the planet w/1.

This is clearly better for D, since only 1 ship remains when the dust clears.

Scenario 3: Round robin - will still work out differently depending on the order of the round robin.

In many-way-battles it is even more complex because the defender should seek to leave a domino trail of defenders to be knocked down by the survivors, causing the final survivor to have as few ships as possible.

Keen for people’s input, or ideally for Jay’s confirmation of the actual algorithm.

Thanks
Osric

I see that I’ve made at least one major error - on re-reading the help, it says that the player with the most ships remaining is awarded the planet, not the player with the shortest distance traveled (which is the rule to determine the defender if nobody owned the star in advance.)

This means that scenario 2 is the bad scenario for D, because B gets assigned defender and kills A, leaving B owning the planet w/6. It’s actually an even bigger disparity than before, so knowing how the intermediate damage is dealt to A & B’s team is important.

So perhaps the algorithm is like this:

First, D kills 6 of A+B’s team leaving 2.
Then, D dies.
Then, 1/82 = 0.25 ships are assigned to A
7/8
2 = 1.75 ships are assigned to B.
Rounding determines that A is dead, and B owns the planet w/2. If not for rounding, B would defend vs a and win.

Osric

I don’t know exactly, but I can add some information to this. When multiple carriers are in the combat on a single side, the damage is dealt proportionally. That is, if carrier A has 17% of the defending ships, carrier B has 33% of the defending ships and carrier C has 50% of the defending ships, then carrier A will take 17% of the defence’s losses, carrier B 33%, and carrier C 50%.

Now this raises the question of what happens when a carrier is to lose a non-integer number of ships? In that case, the pre-determined losses for each carrier is rounded down. Then the carriers are ordered by ship count (largest to smallest), and each carrier loses one ship in turn until the remaining losses have been distributed.

How does the algorithm determine which carrier is first if there are multiple with the same number of ships? I don’t know, I would suspect it is effectively random to the user, but behind the scenes it depends on some arbitrary statistic (such as which carrier was built first).

Thanks! Possibly for my purposes based on what you’ve written, I can do the following:

1- sum up all the defending team’s ships into a single defense number; similarly for offense
2- when battle is over, take the remaining ships and divide them into equal proportions as before the battle, rounding.
3- repeat if the remaining fleets are still in conflict

At least that sounds implementable, though the rounding might introduce some problems.

Osric

  1. Yes, that’s how I’d start.
  2. For this bit, I’d think more in terms of ‘losses’ than I would ‘remaining ships’. For this step, I’d re-separate all ships into their initial carriers, then distribute losses proportionally to each carrier, rounding down. Finally, I’d distribute any remaining losses to the carriers with the most remaining ships.
  3. I’d agree with this last step.

Looks to me like it’ll come out approximately the same:

Starting ships Percentage Remaining Ships Remaining Ships Rounded Lost Ships Lost Ships truncated Remaining Ships
P1 100 10.01% 75.07507508 75 -24.92492492 -24 76
P2 200 20.02% 150.1501502 150 -49.84984985 -49 151
P3 300 30.03% 225.2252252 225 -74.77477477 -74 226
P4 399 39.94% 299.5495495 300 -99.45045045 -99 300
Total 999 100.00% 750 750 -249 -246 753

In this example, we start with 999 ships attacking and 249 ships lost. Whether we redistribute the losses or redistribute the remainder the numbers come out almost the same. While one example is hardly a proof, I think it’ll be difficult to construct a scenario where there is a significant difference…

In the “distribute the roundoff errors afterwards” approach, the smallest player gets an extra ship and the biggest player loses an extra ship.

Osric

PS In fact I think the only reason it is different is choosing to truncate rather than round and then distribute the losses, which you could do the other way too (truncate rather than round and then distribute the missing gains):

Starting ships Percentage Remaining Ships Remaining Ships Truncated Lost Ships Lost Ships Truncated Remaining Ships
P1 100 10.01% 75.07507508 75 -24.92492492 -24 76
P2 200 20.02% 150.1501502 150 -49.84984985 -49 151
P3 300 30.03% 225.2252252 225 -74.77477477 -74 226
P4 399 39.94% 299.5495495 299 -99.45045045 -99 300
Total 999 100.00% 750 749 -249 -246 753

In this case you give the missing ship to the smallest player and wind up in the same place.