Live data from Hacker News

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

github.com

11–20 of 64 posts

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

#11

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.

Yeah, I am not sure what is going on, I just played it 1000 times from rand and the results were.

500 plays - Player: 144, Computer: 179, Tie: 177

https://youtu.be/g9Zo771HYpM

1000 plays - Player: 325, computer: 359, tie: 316

https://youtu.be/7pB5TZ_xYzE

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

#12
post #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 famil…

But if it predicts you are playing random, is it not then random vs random?

I am under the impression that you can't game random -- unless you are aware of the random generator being used is broken..

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

#13
post #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 famil…

That sounds like the gambler’s fallacy. Less runs than what? Most truly random input haa far more runs than what people “think” is random, and in fact that’s one of the statistical tests for whether a data set was random.

You’re essentially saying that a good neural network can predict the next value of a good random number generator. Good luck with that one!

Maybe while you’re at it, have neural networks invert cryptographically secure hash functions :)

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

#14
post #13
post #10

Earlier quoted context omitted.

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 famil…

That sounds like the gambler’s fallacy. Less runs than what? Most truly random input haa far more runs than what people “think” is random, and in fact that’s one of the statistical tests for whether a data set was random. You’re essentially saying that a good neural network can predict the next value of a good random number generator. Good luck with that one! Maybe while you’re at it, have neural networks invert cryp…

Here’s what I’m thinking: The neural network doesn’t have to be correct about which one you pick, it has to be correct about which you don’t pick. Only one option they pick is a loss, so if the other party can be somewhat certain you won’t pick a specific option, it can at least tie. So if a randomizer has pretty even distribution, I think it can win more than half the time, because it can gather roughly how likely the same choice is to be played in a row.

I’m basically suggesting a predictable distribution can be exploited in RPS.

Honestly, the bot could always be winning against the RNG by dumb luck. More experimentation would be needed to be sure. I am just making guesses.

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

#15

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 e…

after the player makes a move the nn makes ones and add it to it's training data. the move the player does after that is added as a counter move to the nn move. this way I treat the data as time series.

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

#16
post #15

Earlier quoted context omitted.

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 e…

after the player makes a move the nn makes ones and add it to it's training data. the move the player does after that is added as a counter move to the nn move. this way I treat the data as time series.

I think it's fair, cause it's like the neural network is thinking "after I play rock the player plays paper" and train with that data

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

#17
post #14
post #13

Earlier quoted context omitted.

That sounds like the gambler’s fallacy. Less runs than what? Most truly random input haa far more runs than what people “think” is random, and in fact that’s one of the statistical tests for whether a data set was random. You’re essentially saying that a good neural network can predict the next value of a good random number generator. Good luck with that one! Maybe while you’re at it, have neural networks invert cryp…

Here’s what I’m thinking: The neural network doesn’t have to be correct about which one you pick, it has to be correct about which you don’t pick. Only one option they pick is a loss, so if the other party can be somewhat certain you won’t pick a specific option, it can at least tie. So if a randomizer has pretty even distribution, I think it can win more than half the time, because it can gather roughly how likely t…

> I think it can win more than half the time, because it can gather roughly how likely the same choice is to be played in a row.

With a random choice, the chance of playing the same choice in a row is 1/3. This does not give you any advantage over having no information (where each choice has a 1/3 chance.)

I think the misunderstanding is in > a randomizer has pretty even distribution

Having an even distribution over a long time does not make any specific choice less random. https://en.wikipedia.org/wiki/Gambler%27s_fallacy

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

#18
I wonder about an arms race between two advanced AI’s which play RPS.

I can’t fully put my head around this, but what would it be like if each AI could read the architecture of the other’s brain before each move. The AI’s would be permitted to reconfigure themselves as they play. An “obvious” strategy may be to simulate your opponent and ask what they are likely to play. Though, simulating their behavior is likely to involve you simulating someone else simulating your behavior, ad-infinium, until your computing resources bottom out. It is like fighting the man in the mirror who can choose to mirror you or not.

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

#19

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.

Yeah, I am not sure what is going on, I just played it 1000 times from rand and the results were. 500 plays - Player: 144, Computer: 179, Tie: 177 https://youtu.be/g9Zo771HYpM 1000 plays - Player: 325, computer: 359, tie: 316 https://youtu.be/7pB5TZ_xYzE

How are you emulating the clicking?

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

#20

Earlier quoted context omitted.

Yeah, I am not sure what is going on, I just played it 1000 times from rand and the results were. 500 plays - Player: 144, Computer: 179, Tie: 177 https://youtu.be/g9Zo771HYpM 1000 plays - Player: 325, computer: 359, tie: 316 https://youtu.be/7pB5TZ_xYzE

How are you emulating the clicking?

I normally write a c program or go linked to xlib to do this sort of work, but I just used xdotool in a bash script for this.

https://gist.github.com/mbrumlow/49f0a3fa311cc3002e4e1fae2e2...

Post reply on HN