Glove for playing paper-scissors-stone using TensorFlowGlove for playing paper-scissors-stone using TensorFlowGlove for playing paper-scissors-stone using TensorFlowGlove for playing paper-scissors-stone using TensorFlow
  • Overview
      • For Industry
        Introduce self-optimizing and self-learning systems into the production process. Use the power of artificial intelligence (AI) to produce much faster and more efficiently.
      • For Ecommerce
        Automate your CRM data, emails, SMS, push messages with one unified omnichannel personalization workflow and response in real-time based on qualitative data.
      • For Business
        Optimize all business processes from accounting and HR, to contracts and customer relationship management. Connect online with offline and grow with ease.
  • Capabilites
  • Blog
  • Company
  • Login
Request 10-min call
✕
03/02/2018

Often, machine learning is used to solve complex problems, in particular, related to large data sets. Machine learning works well in finding patterns that combine a large number of inputs with a large number of outputs.

There is not probably more analogue game than paper-scissors-stone. However, one of Google’s employees decided to run an experiment using the TensorFlow program, which uses the open code created by Google for machine learning. He built a device for playing paper-scissors-stone. To find out the exact technical details, it’s worth reading the original post on Google Cloud Big Data and Machine Learning Blog. In this case, a true simple ML algorithm, which detects the hand position by the Arduino microcontroller connected to the glove, works.

  Zdjęcie 1. Rękawica do gry w papier-kamień-nożyce.Tensorflow rękawica do gry w papier-nożyce-kamień

Step by step construction of glove for playing paper-scissors-stone

Glove sensor

The device is built of LittleBits sets. These child-friendly kits contain a wide range of components, such as LEDs, motors, switches, sensors and controllers, all of which can be connected with magnets – without the need for soldering. Three bending sensors were used for this experiment, which we attach to a plastic (or nitrile) glove. When fingers are bent while wearing the glove, the sensors send an electric signal with variable voltage in the range from 0V to 5V

Picture 2. LittleBits bending sensor

Tensorflow czujnik LittleBits

Connecting the Arduino and Servo microcontroller

To read the signals from the bending sensors and control the knob of the machine, the Arduino and Servo modules were used. The Arduino module has a small microcontroller in the middle and also has many input and output ports. You can write a machining program (a language similar to C) on your laptop, compile it and load it into the module by connecting with a USB cable.

Picture 3. Arduino LittleBits module

Tensorflow Moduł Arduino littleBits

A program that reads data from bending sensors

Now that the equipment is ready, the code writing on the Arduino module begins. It will read data from the bending sensors. In the Arduino IDE, you can write a code to read data from the sensor every 0.1 seconds.

Data visualization using Cloud Datalab

How do you determine which combination of three numbers represents “stone”, “paper” or “scissors”? The simplest implementation would be to write IF instructions with arbitrary thresholds and conditions.

Creating a linear model

Then, the raw sensor data was corrected to get a shape that can be classified as one of three gestures. Linear algebra was used. Linear algebra is a category of mathematics that allows you to map one set of dimensions to another set.

Let TensorFlow find the parameters

In this phase, the “trainer” of the linear model training was defined.

Train the linear model

The next step is running Tensorflow to train the model using the optimizer. To start the actual training, a session was created and its launch method called to pass the glove sensor and label data to the optimizer.

Use the linear model on Arduino

When the classification method of the glove sensor data was already quite strong, the Arduino coding was terminated.

The game of paper, scissors and stone is probably not something that comes to mind when you think about Machine Learning. This project shows how machine learning can be useful for all programmers, regardless of the reduction in the number of tasks for coding people and accelerating calculations.

Pictures 4. The hardware elements of the paper-rock-scissors machine

Tensorflow Elementy sprzętowe maszyny do cięcia papieru

Share
22
Firecrux Crew
Firecrux Crew

Related posts

10/11/2021

What is E-A-T and what does it mean for Google?


Read more
09/14/2021

The future of natural language processing – NLP


Read more
08/13/2021

Google’s spam update


Read more
07/30/2021

What is Performance Marketing?


Read more

Comments are closed.

Firecrux Logo

Platform

  • Capabilites
    • For Industrial Production
    • For Ecommerce
    • For Business
    • Customer Account
    • Documentation
    • Request PoC

Company

  • Company
    • Brand Manual
    • Careers
    • Partner Program
    • Sitemap
    • Contact

Resources

  • Blog
    • Use Cases
    • AIRE – AI Response Engine
    • CDP – Customer Data Platform
    • Send Us Your Design

Legal

  • Terms of Use
    • Privacy Policy
    • Security Commitment
    • Data Protection Officer
    • Data Control Panel
    • Accessibility Statement
2016- © Firecrux.com
By using Firecrux.com you accept the terms of use.
Request 10-min call