Forum
unknown5209378
|
no_moniker wrote
at 2:42 AM, Saturday December 9, 2006 EST
save the below with the extension '.csv' and open in a spreadsheet. sorry, i couldn't think of any other way to display!
,,# Attackers,,,,,, ,,2,3,4,5,6,7,8 # Defenders,1,83.849,97.245,99.749,99.987,100,100,100 ,2,44.521,77.816,94.062,98.8,99.803,99.978,99.995 ,3,15.153,45.152,74.114,91.019,97.499,99.498,99.903 ,4,3.558,19.187,46.01,71.767,88.325,96.184,98.952 ,5,0.587,6.073,22.01,46.615,69.679,86.36,94.817 ,6,0.086,1.467,8.497,24.168,46.832,68.474,84.468 ,7,0.009,0.299,2.56,10.367,25.838,47.172,67.363 ,8,0.003,0.044,0.66,3.633,12.186,27.419,46.879 |
|
joby.d wrote
at 3:49 AM, Saturday December 9, 2006 EST I tried it, cool! But how come 6vs6 and 8vs8 *both* have lower attacking percentage than 7vs7?
|
|
joby.d wrote
at 4:06 AM, Saturday December 9, 2006 EST Here's a link to a crude screenshot:
http://img245.imageshack.us/img245/9562/statsbk5.png |
|
zyrex wrote
at 4:12 AM, Saturday December 9, 2006 EST ...and (hopefully) here's a hyperlink to the above screenshot:
<a href="http://img245.imageshack.us/img245/9562/statsbk5.png "> http://img245.imageshack.us/img245/9562/statsbk5.png </a> |
|
no_moniker wrote
at 4:23 AM, Saturday December 9, 2006 EST to answer your question joby.d: it is because the %'s are from running the matchups 100,000 times. even though that is a large number there can still be some random variations about the mean. here is the code (python):
import random def rolldie(): return random.randrange(6)+1 iterations = 100000.0 # must be integer resultvector = [] for attacker in range(8): resultvector.append([]) for defender in range(8): numberwon = 0 for x in range(int(iterations)): asum = 0 dsum = 0 for a in range(attacker+1): asum += rolldie() for b in range(defender+1): dsum += rolldie() if asum>dsum: numberwon+=1 resultvector[len(resultvector)-1].append(numberwon/iterations) print resultvector outfile = file('result.csv', 'w') outfile.write('A/D #,1,2,3,4,5,6,7,8,') for x in range(len(resultvector)): outfile.write('\n'+str(x+1)+',') for y in range(len(resultvector[0])): outfile.write(str(resultvector[x][y]*100.0)+',') outfile.close() |
|
no_moniker wrote
at 4:24 AM, Saturday December 9, 2006 EST whoa, that looks ugly. it didn't keep the tabs.
|
|
no_moniker wrote
at 4:28 AM, Saturday December 9, 2006 EST nice screenshot, i should have thought of that.
|
|
joby.d wrote
at 7:01 AM, Saturday December 9, 2006 EST okay, i was assuming a classical approach
i don't suppose anyone wants to chart how many times you should attack for "reserves vs #of territories?" ;) |
|
unknown5132316 wrote
at 9:54 AM, Saturday December 9, 2006 EST I've noticed that when you attack one specific enemy territory with 8 dice territories and he is defending with 8 dice, the first two attacks always fail and the third attack always succeeds. Has anyone else noticed this?
|
|
Argmo wrote
at 11:13 AM, Saturday December 9, 2006 EST I calculated the odds using all possible permutations, rather than random matchups, so these are more precise, aside from rounding to the nearest tenth of a percent.
Attacking: 1 2 3 4 5 6 7 8 1 defending: 41.7 83.8 97.3 99.7 100 100 100 100 2 defending: 9.3 44.4 77.9 93.9 98.8 99.8 100 100 3 defending: 1.2 15.2 45.4 74.3 90.9 97.5 99.5 99.9 4 defending: 0.1 3.6 19.2 46 71.8 88.4 96.2 99 5 defending: 0 0.6 6.1 22 46.4 70 86.2 94.8 6 defending: 0 0.1 1.5 8.3 24.2 46.7 68.5 84.4 7 defending: 0 0 0.3 2.5 10.4 26 46.9 67.3 8 defending: 0 0 0 0.6 3.7 12.2 27.4 47.1 Code, in OpenOffice's basic: sub main dim possibledice(8,48) dim ratios(8,8) For i = 1 to 8 for j = 1 to 48 possibledice(i,j) = 0 next next For d1 = 1 to 6 possibledice(1,d1) = possibledice(1,d1) + 1 for d2 = 1 to 6 possibledice(2,d1+d2) = possibledice(2,d1+d2) + 1 for d3 = 1 to 6 possibledice(3,d1+d2+d3) = possibledice(3,d1+d2+d3) + 1 for d4 = 1 to 6 possibledice(4,d1+d2+d3+d4) = possibledice(4,d1+d2+d3+d4) + 1 for d5 = 1 to 6 possibledice(5,d1+d2+d3+d4+d5) = possibledice(5,d1+d2+d3+d4+d5) + 1 for d6 = 1 to 6 possibledice(6,d1+d2+d3+d4+d5+d6) = possibledice(6,d1+d2+d3+d4+d5+d6) + 1 for d7 = 1 to 6 possibledice(7,d1+d2+d3+d4+d5+d6+d7) = possibledice(7,d1+d2+d3+d4+d5+d6+d7) + 1 for d8 = 1 to 6 possibledice(8,d1+d2+d3+d4+d5+d6+d7+d8) = possibledice(8,d1+d2+d3+d4+d5+d6+d7+d8) + 1 Next Next Next Next Next Next next next Open "c:\kdice.out" For Output As #1 for player1dice = 1 to 8 for player2dice = 1 to 8 waystolose=0 waystowin=0 for player1 = 1 to 48 for player2 = 1 to 48 if player1 >= player2 then waystolose = waystolose + possibledice(player1dice,player1) * possibledice(player2dice,player2) else waystowin = waystowin + possibledice(player1dice,player1) * possibledice(player2dice,player2) endif next next ratios(player2dice,player1dice) = cint(((waystowin*1000.0) / (waystolose+waystowin)))/10 next print #1,player1dice;" defending: ";ratios(1,player1dice);" ";ratios(2,player1dice);" ";ratios(3,player1dice);" ";ratios(4,player1dice);" ";ratios(5,player1dice);" ";ratios(6,player1dice);" ";ratios(7,player1dice);" ";ratios(8,player1dice) next close #1 end sub |
|
TheYellowMole wrote
at 5:50 PM, Saturday December 9, 2006 EST 6v2 the attacker wins 99.803 percent of the time.
Woohoo! I got a role that only occurs .197 percent of the time and caused me to lose! |