Talk:Jump Attack: Difference between revisions

From the Super Mario Wiki, the Mario encyclopedia
Jump to navigationJump to search
m (add the forgotten signature)
Line 55: Line 55:


I daren't calculate the variance because my machine is slow. [[User:Another gossip-loving Toad|Another gossip-loving Toad]] ([[User talk:Another gossip-loving Toad|talk]]) 22:32, 20 October 2014 (EDT)
I daren't calculate the variance because my machine is slow. [[User:Another gossip-loving Toad|Another gossip-loving Toad]] ([[User talk:Another gossip-loving Toad|talk]]) 22:32, 20 October 2014 (EDT)
: Hi, I was curious about the expected reward as well, and when I saw the wiki page didn't list them, I accidentally ended up writing basically verbatim the same code as yours (only checking the "talk" page after writing it), finding the same approximate values.
: I also saw that you'd added this to the page at first, but later removed them again since you didn't trust your numbers...I suppose my independently written code arriving at the same numbers would fully corroborate it, assuming the game does not secretly alter the game rules in the player's favor or something.
: With that caveat, I'm adding it back into the article. --[[User:Rezuaq|Rezuaq]] ([[User talk:Rezuaq|talk]]) 05:15, December 23, 2021 (EST)

Revision as of 06:15, December 23, 2021

Mathematical expectation

I'm the one who wrote the "Mathematical expectation" section. I'm not really good at math so I want you to check the program I used to calculate the data. It's written in Python 2:

one=1
five=2
x5=3
bowser=4
import itertools
l=[one,one,one,one,five,five,five,x5,x5,bowser,bowser]
p=itertools.permutations(l,5)                              # change to 7, 9
def coins(l):
    l=list(l)
    s=0
    while len(l):
        a=l[0]
        del l[0]
        if a==one:
            s+=1
        elif a==five:
            s+=5
        elif a==x5:
            s*=5
        elif a==bowser:
            s=0
            break
        else:
            raise NameError('wtf?')
    return s
ans=[coins(l) for l in p]
s=sum(ans)
print s/len(ans)
print s
print len(ans)

The result is:

11
661200
55440
11
18385920
1663200
3
71245440
19958400

Since the 9-Block Option has a bonus, the real number of coins earned is 6.

I daren't calculate the variance because my machine is slow. Another gossip-loving Toad (talk) 22:32, 20 October 2014 (EDT)


Hi, I was curious about the expected reward as well, and when I saw the wiki page didn't list them, I accidentally ended up writing basically verbatim the same code as yours (only checking the "talk" page after writing it), finding the same approximate values.
I also saw that you'd added this to the page at first, but later removed them again since you didn't trust your numbers...I suppose my independently written code arriving at the same numbers would fully corroborate it, assuming the game does not secretly alter the game rules in the player's favor or something.
With that caveat, I'm adding it back into the article. --Rezuaq (talk) 05:15, December 23, 2021 (EST)