Using Machine Learning to Win at Rock-Paper-Scissors with TensorFlow
We often see machine learning being used to solve complicated problems, particular those involving large data sets. Machine learning excels…
We often see machine learning being used to solve complicated problems, particular those involving large data sets. Machine learning excels at finding the patterns that connect large numbers of inputs to large numbers of outputs. But, if you’re a kid interested in experimenting with machine learning, that’s probably pretty boring. Not many kids are interested in finding the correlations between Tweets and local temperatures, for example.
So when Googler Kaz Sato and his son were looking for a project to build using machine learning, they settled on something a little more familiar to children: rock-paper-scissors. Their creation uses a glove outfitted with flex sensors that is connected to an Arduino to detect the player’s finger positions. Because there are only three possible moves in the game, the easiest solution would be to just program those manually.
But, Sato and son were wanting to take advantage of machine learning. Instead of programming the moves, they fed the flex sensor data into Google’s TensorFlow. Eventually, TensorFlow was able to determine what hand gesture was most likely being given by the player, without them ever programming those instructions specifically. If the game were to be expanded to include more moves, TensorFlow could learn those too.
With TensorFlow able to determine what move the player is playing, it is a simple matter for it to know which response to give in order to win. When the machine decides which response to give, it then uses a littleBits-controlled indicator to display the choice. The whole project is a great demonstration of how machine learning actually works, and proves that it can be useful for a wide range of tasks.