From: desj@ccr-p.ida.org (David desJardins)
Newsgroups: rec.games.pbm
Subject: Re: Galaxy help needed
Date: 9 Jan 93 22:18:58 GMT
Organization: IDA Center for Communications Research, Princeton


Alan Mead <amead@s.psych.uiuc.edu> writes:
> let's say that you have one cruiser, the enemy has 30
> escorts.  Your cruiser automatically kills any escort it hits.  The
> escorts have a 1% chance of killing your cruiser.  What is the chance
> that your cruiser survives?

The exact chance that your cruiser survives the first round can be
computed as follows.  Each escort fires either before or after you; it
doesn't matter in what order the escorts fire among themselves.  The
probability that the escort that you target in the first round has not
already fired is exactly 50%.  If that is the case, then the enemy only
gets 29 shots at you in the round; otherwise, the enemy gets 30 shots.

So the probability of surviving round 1 is exactly

   0.50 * (0.99)^30 + 0.50 * (0.99)^29  =  0.50 * 1.99 * (0.99)^29

In round K, assuming that you have survived that far, the enemy will
have 31-K ships, and the probability that you survive is exactly

   0.50 * (0.99)^(31-K) + 0.50 * (0.99)^(30-K) = 0.50 * 1.99 * (0.99)^(30-K)

The probability that you survive all 30 rounds is exactly

   (0.50 * 1.99)^30 (0.99)^(29+28+...+1+0) = (0.995)^30 (0.99)^435

which is approximately 0.0108643.

> That's really really hard to say.  A simulation is the best way to
> answer that question.  But consider that over an infinite repitition,
> you would expect the escorts to fire 30 times to the cruisers once.
> Then 29 times to the cruiser's once.  then 28 times to once.  etc.

This is right, except that the numbers should be approximately 29.5,
28.5, and so on, because you have a chance of firing before your target does.

> Of course THERE ARE NOT rounds like the above in actual combat, I was 
> speaking to the expected value of infinite repititions of the battle.

Wrong.  There are rounds exactly like the above.  You can see this by
reading the rules (which discuss combat rounds), or reading the source
code (any version), or by analyzing your battle reports.  If you do the
latter, you will see that any undestroyed ship always gets to fire once
before any other ship fires twice.  This wouldn't be true if each firing
opportunity were randomly selected.

> So the expected (the mean for an infinite sample) number of shots the
> escorts get is 15.5+15+14.5+14+... which is, I think, about 225.
> (.99)^225 = .104, so about 10.4% of the time, the cruiser is expected
> to survive the encounter.

Now you have gone astray.  Your first analysis was (roughly) correct;
this is just wrong.

> I have no idea how to calculate the expected
> number of casulties amongst the escorts.  (Except by simulation).

This is more complicated.  However you can get a good approximation by
noting that you expect to die after about 100 shots, which will take the
escorts three or four rounds, so you expect to kill only three or four
ships.

I don't think the exact calculation is interesting enough to give here,
but the result is 3.56648.

> Also, I don't know how to solve for the ratio of shield to attack that
> would produce a P(kill)=0.01, but an attack of 1.0 is pitifully small
> when you talk about cruisers of mass 30 or larger, so this particular
> example is a bit contrived.

It's certainly true that you are not very likely to have an attack which
has a 0.01 chance of killing its target.  The attack would have to be
very very slightly over 1/4 of the target shield strength.  It is much
more likely that it would fall under 1/4, and P(kill) would be zero.

However similar examples can be realistic.  For example, suppose that
there are 50 possible targets, and P(kill) is 1/2.  Then the probability
of killing the desired target is 0.01 with any particular shot is 0.01,
because you have to get lucky enough to fire at it, and then you have to
kill it.

                                        David desJardins
Newsgroups: rec.games.pbm