Lego Mindstorms robot learns to play Rock-Paper-Scissors
When Robots take over the world, will they play Rock-Paper-Scissors to pass the time? Well, one of their precursors does (featured at Robogames 2011 for the Lego Open challenge, where it won first place).
A canny inventor has constructed a Lego Mindstorms NXT-based device to play the game. That is to say, it learns how to play the game from past experiences. And it won’t just learn to take part (apparently simulating a simple neural network), it will “beat a person 100% of the time!” the creator boasts.
This robot does not play rock-paper-scissors in the way people play. It first asks the user to input a move (either rock – paper – or scissors). The robot then calculates the best move to play, and then will extend a retractable arm that shows its next move (a Lego rock, paper, or a Lego scissors). The player must then tell the robot if the robot won, lost, or tied, against the player.
While you may think that this robot is cheating, since it waits for the player to make a move, I did not program the robot to know the rules of the game! The robot does not know that rock beats scissors, paper beats rock, or scissors beats paper! Instead, the robot relies on the player to tell whether it won/lost/tied to learn from past success/failures and to use this information in the future!
The parts list is:
- 1x Lego Mindstorms NXT – the brain!
- 3x Lego Mindstorms Touch Sensors – User Inputs
- 3x Lego Mindstorms NXT Motors – Peripherals for the robot
- Tetrix Pieces for the Base (aluminium chassis)
The inventor, one prrgg14935, describes themselves as “a 17 year old who likes building robots and programming them! Currently work as a teacher’s assistant for robotics/java classes”. Obviously a young inventor to keep an eye out for in the future!Instructables.com]