
“Rock Paper Scissors” Trained in Browser AI/ML - GantMan
https://heartbeat.fritz.ai/using-tensorflow-js-to-train-a-rock-paper-scissors-model-b5f393b548eb
======
jedberg
FYI, the author trained a model to recognize what symbol your hand is making,
not a model for ideal play.

Identifying the hands is pretty slick, but I'd actually find a model of ideal
play to be even slicker, because there is no "optimal strategy" for RPS, but
there is an "optimal strategy" against each individual opponent. Making an AI
that can learn that strategy would be pretty impressive.

~~~
Izkata
Yeeaars ago I remember reading one optimal play against people you don't know,
that's supposed to give a slight advantage over multiple rounds: Repeat the
move your opponent used in the prior round.

IIRC, the idea was that people tend not to repeat the same move, and then of
the other two, it's slightly more likely they'd pick the one on their mind
already - the one they were hoping their opponent would've chosen in the prior
round.

~~~
whymauri
Humans suck at being random, basically.

------
graycat
Can approach RPS (Rock, Paper, Scissors) strategy as a relatively simple case
of classic von Neumann-Morgenstern two person game theory. That theory follows
from the classic duality result in linear programming.

The main result for players Red and Blue for RPS is: Red plays each of Rock,
Paper, Scissors with probability 1/3rd and independent of everything else in
the known universe. Can do this by using, say, an ordinary die with six sides.
Then just from the strong law of large numbers, in the long run Red and Blue
will both break even, no matter what Blue did, does, or will do.

To win, Red needs some means of predicting Blue's play -- no good predictions,
no winning. I.e., for Red to win, Blue has to be predictable in some sense.

