Hacker News new | past | comments | ask | show | jobs | submit login

since everyone is sharing code, why not? I feel this is a simpler way of sharing reasoning anyway. (in k; ! is iota, % is divide and +/ sums up a list)

    wa:!101 / world amplitudes given we picked red (i.e relative probability)
    wp:wa%+/wa / convert amplitude to probability
    np:(wa-1)%99 / probability of next pick being red for each world

    +/wp*np / sum the conditional probabilities
of course, if you wanted to golf this, you'd end up with {2%3}



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: