5 ms·
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 roc
by QuadmasterXLII 7y ago
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.
- atum47 7y agoafter 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.
- atum47 7y agoI 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
- j-pb 7y agoBut that's not what you're coding. If you trained it with every possible next move and response then you would learn that kind of relationship (though you would also overfit on the existing moves), but this way you just give it a peek into the probability distribution of the players moves, one thats so accurate that it comes from the future...
- akovaski 7y agoThe problem is that that the player's move is actually being fed to the training data before the computer makes its prediction. Take a look at the variable 'y' after making your move and you'll see that it includes the player's last move. Because 'y' is updated before the computer makes its prediction, this shows that the computer uses the player's current move as part of the training set to decide its move.
- klenwell 7y agoIf true, this seems like it would be a huge scandal. Or at least an issue in Github.
- GrumpyNl 7y agoIsn't this just plain cheating?
- atum47 7y agoit's not taking a pick at the player move. read the code, even after the pull request that brought this up the nn performed the same. even if the nn was taking a pick at the player's move, which is not, the data is shuffled before the training
- camjohnson26 7y agoI took a stab at fixing this: https://github.com/victorqribeiro/jokenpo/pull/3 https://github.com/victorqribeiro/jokenpo/pull/3
- seventytwo 7y agoWell, it’s much easier with your code. I immediately opened up a 3x lead on the comp. I stopped at 17-6-17 (W-L-T). What I did was to play the hand that would have beaten the computer’s previous guess, and if the computer looks like it’s figuring it out, I play the hand that beats my strategy once or twice, and then resume.
- scottlocklin 7y agoHe should hook it up to the stock market.
- jerf 7y agoIf it were that easy to beat the stock market, it wouldn't be that easy to beat the stock market. (Not a joke or snark.)
- dTal 7y agoIn other words, the description is precisely inaccurate. Not only is it not untrained, it's trained against your exact plays through mysterious future-knowledge!