Nov. 9th, 2005

sobrique: (Default)
I have a bit of a puzzle that I'm trying to figure out.
It's EVE related, but a little more ... annoying.

The problem is this.
When building a starbase, one deploys sentry guns as defenses.
You have a choice of small, medium or large (in a mix if necessary).
A small gun does 1 point of damage, a medium 2, and a large 4.
Each gun uses a certain amount of power. A small uses 1, a medium 2, a large 4.

The problem is this. An attacking ship requires at least 5 points damage to destroy it. (It might be more, but a single large gun cannot do the job). (Otherwise it can run away and repair, come back and repeat).

Against a single ship, there's no difference at all in damage dealt. However, when one is faced by an attacking fleet of 10, 20, 30, 40 or 50, is having 40 small guns doing 1 point each, better than 10 large doing 4 each.

Each gun selects a target entirely at random.

Now, the first stage, is figuring out how many different 'sets' there are. Which is fairly easy, it's number of ships to the power of the number of guns. Easy enough really.

The thing I'm having trouble figuring out is how many 'sets' the same ship is picked multiple times.

I started on permutations (N!/(N!-K!)) in the hopes of excluding all the permutations where multiple aren't picked, however that doesn't really help when I'm trying to fit the cases where '3 or more the same' are picked.

To take the simple case, with 3 guns, and 3 ships, and 2 on the same target needed to destroy:
Read more... )

The purpose of the puzzle, is to figure out if a starbase populated entirely with 'small' guns is 'better' than a starbase populated with 'large' guns. (Intuitively I'm thinking yes, because 'efficiency' of distribution is better, but if more guns will probably lead to evening out of damage, and I need 'spikes' to destroy ships)
sobrique: (Default)
Well, that problem I mentioned.
I cracked and went perl hacker on it.
source code )

Result?
10 x 4 point guns vs. 50 '5 point soak' ships (worst possible situation for them).
Fleet is reduced to 0 in an average of 36 'rounds'. (869 ships destroyed first round, out of 1000)

40 1 point guns, vs 50 '5 point soak' gives us an average of 195 rounds. (61 ships destroyed first round).

I think that's pretty conclusive, if not quite what I had expected. (And yes, I was assuming that ships can fully repair, since the 'model' involved a gun firing on a target for 30 seconds, and then 'switching', meaning it can retreat, and return when fully healed up. (there's ways to prevent them retreating, but I'm ignoring them because they also randomly target, and are applicable to both)

However I shall return to pondering the ponderableness of this problem, because I'm sure there's got to be a formula for it ;)

Profile

sobrique: (Default)
sobrique

December 2015

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
2728 293031  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Mar. 12th, 2026 04:55 pm
Powered by Dreamwidth Studios