Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Python 

Humans Suck at Entropy (Man vs Machine)

People are bad at entropy (randomness). This code asks the user to try to input 1's and 0's as randomly as possible. The computer will make an educated guess on what you will enter next, based on numbers you've already input. You are predictable.

Anyway, the math behind this is not my own, I translated the code from BASIC from http://www.loper-os.org/bad-at-entropy/manmach.html

Here is the code:
http://pastebin.com/Rfk4YuNm for 2.x
OR
Spoiler (Click to View)

Later going to make a PyGame version of this similar to the site's version, so the user doesn't need to hit enter between numbers.👍

EDIT: clarity
That code looks extremely messy ._.
I like the concept though. Although it's simple, and there is a 50% chance of success.
I didn't fully understand the code when writing it, just trying to translate it to work, so it won't look the best it could :/ (Just imagine trying to translate a story from russian to english for example)

I don't get what you mean about a 50% chance of success. It's not guessing randomly on what you will type next. It's actually using the numbers you've already entered to make an educated guess at what you will type next. Pretty much always gets above 50%, if not 60 or 70%. If I had wanted something to just guess randomly I could have done it in under 10 lines of code. This is different
(Oct 25, 2013 05:36 PM)ImportUsername Wrote:  I didn't fully understand the code when writing it, just trying to translate it to work, so it won't look the best it could :/ (Just imagine trying to translate a story from russian to english for example)

I don't get what you mean about a 50% chance of success. It's not guessing randomly on what you will type next. It's actually using the numbers you've already entered to make an educated guess at what you will type next. Pretty much always gets above 50%, if not 60 or 70%. If I had wanted something to just guess randomly I could have done it in under 10 lines of code. This is different

I didn't really explain that well. Yes there is math involved and the percentage would be higher, but I guess the point I was trying to make is that once you get past all that there are only two options that it could guess, therefore making it a somewhat educated 50%

EDIT: Yeah I have no idea where I was going with that. Ignore me.
The point being made with the program though is that YOU are not random. It would be 50% if you were but you aren't. People are bad at that. Try it out, if not with this program then go to the website for 1 minute. Type in what seems like a random series of zeroes and ones, and you may be surprised just how often it guesses it - http://www.loper-os.org/bad-at-entropy/manmach.html
(Oct 25, 2013 05:56 PM)ImportUsername Wrote:  The point being made with the program though is that YOU are not random. It would be 50% if you were but you aren't. People are bad at that. Try it out, if not with this program then go to the website for 1 minute. Type in what seems like a random series of zeroes and ones, and you may be surprised just how often it guesses it - http://www.loper-os.org/bad-at-entropy/manmach.html

With two options it's very hard to be random without subliminally falling into a pattern yes, but that is in part due to the extreme limitation of only having two options. Just saying that it's relatively simple to guess after a bit of pattern analysis.
I agree this is not a good measure of a humans ability to be random.
I'm aware of the fact that it is based on math, but still looks pretty 50/50 to me. (60-34 score so far ^^)
(Oct 26, 2013 04:22 AM)BeerMonger Wrote:  I'm aware of the fact that it is based on math, but still looks pretty 50/50 to me. (60-34 score so far ^^)

It doesn't get 100%, it just can't be THAT accurate, but it normally sits around 66%. It will do better if you do it as quick as possible without thinking about it, because then you really set into a pattern. And 60-34 isn't that close to 50-50😝
Well.. since you have only 2 options to choose from its a bit hard to be unexpected..
You only have 4 options, a sequence of following 0s/1s or 1 followed by 0 and vice versa..
but yeah its nice any how P:
(Oct 27, 2013 01:16 AM)BeerMonger Wrote:  Well.. since you have only 2 options to choose from its a bit hard to be unexpected..
You only have 4 options, a sequence of following 0s/1s or 1 followed by 0 and vice versa..
but yeah its nice any how P:

The point of the the little game is to show that we're bad at being 'unexpected'. If we could be perfectly random, then even with only 2 options the computer in this game would only guess about 50%
Can someone explain to me what is actually happening here code wise?


Possibly Related Threads...
Thread / Author Replies Views Last Post
[.NET] by _UnderDogJul 30, 2018 06:13 PM 6 408 Jul 30, 2018 06:13 PM
Last Post: _UnderDog
[C] by hansbaldMay 9, 2018 11:02 AM 1 178 May 9, 2018 11:02 AM
Last Post: HFDone
[C] by GoodiesNov 14, 2015 05:25 PM 0 98 Nov 14, 2015 05:25 PM
Last Post: Goodies