3 ms·
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://you
by mbrumlow 7y ago
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 https://youtu.be/g9Zo771HYpM
1000 plays - Player: 325, computer: 359, tie: 316
https://youtu.be/7pB5TZ_xYzE https://youtu.be/7pB5TZ_xYzE
- albertshin 7y agoHow are you emulating the clicking?
- mbrumlow 7y agoI 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/49f0a3fa311cc3002e4e1fae2e290b3b https://gist.github.com/mbrumlow/49f0a3fa311cc3002e4e1fae2e2...
- albertshin 7y agothanks! didn't know about xdotool
- kojackst 7y agoThis runs it randomly 1000 times (well not reaaally randomly, but it gets close), just paste it into the browser console: const times = 1000; function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } async function run() { for (let i = 0; i < times; i++) { await sleep(10); play(Math.floor(Math.random()*3)); } } run();
- camjohnson26 7y agoI just did the same thing, 500 plays - Player: 163, Computer: 179, Tie: 158 1000 plays - Player: 306, Computer: 365, Tie: 329 I've run it several times and the computer has won every time against random, it must have an unfair advantage.