Who says the BB's happened to be tied up in that order? Who says that the order of the air strikes is exactly the same and not shuffled around allowing torpedo strikes to go where there was a ship previously?
OK, I'll lead you through the logic since you seem to have missed it. You've got, IIRC, 5 BB berths (sans the target ship Utah at a different berth). One of these has a minelayer inboard (iirc
Oglala) and no ship outboard. The PH scenario begins with the assumption that the BBs are "in Pearl Harbor" and docked when the attack arrives. There are, therefore, at least three BBs that are screened of torpedoes, unless in your alternate universe Pearl Harbor has subsantially MORE BB berths than the real Pearl Harbor had.
Now, for simplicity of code, rather than requiring an autocad drawing of PH and a Cray driven AI selecting targets from the autocad drawing (which seems to be the only way you can imagine handling the problem), assume that "It does not matter which BBs are stationed where because if they're all in port and docked then at least 3 of them are screened from torpedoes." So, all you have to do each time a torpedo launch is conducted is to randomly select a BB. After 4 BBs have been targeted by torpedoes, the rest become immune to torpedo attack. Or, alternatively, you can allow that BB to be targeted and if hit, apply the hit to one of the (ranomly selected) previousy torpedoed BBs. It's a bunch of if-then statements (maybe six) and a special array (perhaps) that gets used only if Pearl Harbor is attacked. It isn't complex at all.
Who says any torpedoes hit at all? Who says that instead of torpedoes, more 800 kg shells were available and only they were dropped due to fear of netting?
Torpedo hits are generated the same way they are the rest of the game. As to "more 800 kg shells" ... the PH attack begins with a set of "historical load outs." If you want something different, that's separate from how torpedoes are targeted in an attack on PH. The phenomena of whether torpedoes hit anything at all or whether more 800kg rather than torpedoes have no logical connection to the problem of how you apply a torpedo hit to a BB in the BB berths.
Someone else brought up moving ships. The game does not allow any function for BBs changing from "in port" to underway during the resolution of the attack subroutine. Moreover, this is not terribly important, since the only BBs at PH that were capable of moving were the ones that were outboard anyhow.
Show me a fellow who rejects statistical analysis a priori and I'll show you a fellow who has no knowledge of statistics.
Didn't we have this conversation already?