elsehow / aaronson-oracle

Press the 'f' and 'd' keys randomly. It's easy. Just use your "free will."
http://people.ischool.berkeley.edu/~nick/aaronson-oracle/
816 stars 29 forks source link

Use probability to make predictions #6

Closed christianbundy closed 8 years ago

christianbundy commented 8 years ago

This PR makes two changes:

It's now very improbable for "malicious" patterns like dddddffffffdffffddfffdfdfffdddff to hit 0%. I ran the new algorithm against the above pattern, and these were my results:

n p
1 33%
2 29%
3 40%
4 37%
5 44%
6 40%
7 37%
8 44%
9 29%
10 40%
11 11%
12 40%
13 29%
14 37%
15 18%
16 33%
mean 34%

It definitely isn't perfect, but a mean of 34% is a step up from 0%. It seems to work well with npm test, but please let me know if you notice anything funky. Cheers!

willy-b commented 8 years ago

This is awesome. I was talking with someone about this early this AM on Twitter. Was going to do a PR but glad you beat me to it (I wasn't planning the nice table). Thanks for really improving the demo

christianbundy commented 8 years ago

@willy-b Hell yeah, glad you got something out of it.