As a follow-up to my previous post on Twilight Imperium (3rd edition) battles, I converted my code into Javascript. So now, you can calculate the exact probability of winning a battle right in your browser (straight up, with no fancy cards or anything). Have fun!
| Player A | Player B |
|---|---|
Probability that player A wins: —

Nice program, I wrote one in java, but it didn’t compute the actual probabilities like yours, it just simulates battles and tabulates the results. Your program seems like it takes a LONG time to calculate larger battles (eg 1 warsun, 6 fighters vs 2 carriers, 12 fighters), and doesn’t seem to take into account destroyer’s anti-fighter barrage, not that it mattered too much, since fighters just own everything else.
It also seems like TI combat follows Lanchester’s square law (http://en.wikipedia.org/wiki/Lanchester%27s_laws), which basically means the more powerful side will generally increase their lead over the weaker side (so if you lose the opening round of a closely matched combat, retreating immediately may not be such a bad idea)
I’ve linked my program below for anyone who’s interested.
http://cybergoon.com/games/ti/TICombat.java
http://cybergoon.com/games/ti/fight.xml