Live data from Hacker News

Show HN: Play rock paper and scissors against a untrained neural network

github.com

1–10 of 64 posts

Re: Show HN: Play rock paper and scissors against a untrained neural network

#4
post #3

Hm in my limited testing of not looking at the screen and selecting as randomly as I could I was surprised to find it not end 50/50 Not enough trials or is there something else going on here?

2 things to consider...

1. Humans aren't good at random, try using a RNG or dice.

2. If you toss 10 coins, what is the probability of 5 heads and 5 tails? It isn't very likely, even though it's the most likely outcome.

Re: Show HN: Play rock paper and scissors against a untrained neural network

#8
post #3

Hm in my limited testing of not looking at the screen and selecting as randomly as I could I was surprised to find it not end 50/50 Not enough trials or is there something else going on here?

2 things to consider... 1. Humans aren't good at random, try using a RNG or dice. 2. If you toss 10 coins, what is the probability of 5 heads and 5 tails? It isn't very likely, even though it's the most likely outcome.

I let rand play it 500 times the results are as followed.

Player: 144, Computer: 179, Tie: 177,

Although I think I got more equal results when I did 1000 iterations, but failed to record that one.

https://youtu.be/g9Zo771HYpM

Re: Show HN: Play rock paper and scissors against a untrained neural network

#9

I hate to say it, but I’m not sure it’s playing fair. I used random.org to play truly randomly, and the “neural network” beat me to 10 pts 6 times in a row.

Looking at the source code, the move you are about to make is included in the training dataset. This can be confirmed by playing “scissors scissors scissors rock” and then looking at the variables x and y in the console, which will include the surprise rock.

The code updates x and y, then trains the model, and then makes a prediction. “Fair” code would make a prediction, then update x and y and train the model

This explains the behavior mentioned in the comments where the computer gets an impressive early lead due to the players next move being one of only a few datapoints it learns from, then backs off to a more plausible advantage as the leaked data is diluted by past data.

Re: Show HN: Play rock paper and scissors against a untrained neural network

#10

I hate to say it, but I’m not sure it’s playing fair. I used random.org to play truly randomly, and the “neural network” beat me to 10 pts 6 times in a row.

The thing is, if you are playing randomly, that makes it easier to predict what you’re (not) going to do next. A good random distribution would give fewer runs, which means your choice is less likely to be the last choice you picked and somewhat less likely to be other recent values. It can at least tie by choosing scissors if it thinks you will not pick rock.

This is kind of a shot in the dark because I am not familiar with RPS strategy, but I think it makes sense.

Post reply on HN