# Jd Plays Rock Paper Scissors

USA

My 2 year-old granddaughter, who loves EZ-Robot JD, is just learning how to play the Rock Paper Scissors game (RoShamBo) and recently said I want to play it with JD! My 7 year-old grandson and I decided to take up the challenge

In searching through the EZ-Robot community forum I noticed that @user Steve G had developed that game using EZ scripts, but had not implemented it on a JD. The tutorial on speech recognition was also a great help.

I believe that implementing it on a JD would be a great learning exercise for STEM students in middle school through college. The algorithms they could develop could range from simple random numbers through Markov Chains and using JD to provide a humanoid opponent would provide great feedback.

The problems needed to be solved to implement the game on JD are listed below. Note that its desirable to not modify JD in any way, e.g. adding fingers

1. Develop a game start/stop mechanism a. Solution- Use JD’s voice recognition software to control the script
2. Develop the swinging arm (1,2,3) countdown motion on the JD needed for the human as a visual sync a. Solution- use AutoPosition control
3. Develop human recognizable hand signals for Rock, Paper & Scissors a. Solution- use AutoPosition control with these positions:

1. Develop a means to detect the winner of the game a. Solution- have the human verbally announce their move in sync with JD arm motion. JD can do voice recognition to determine winner i. Issue- Human could cheat by waiting until they see JD’s move. ACCEPTED b. Solution- have JD use object recognition to detect human’s move i. Issue- JD’s camera isn’t fast enough. Note, researchers have used a high-speed camera to predict human’s next move based muscle movement, i.e. cheating
2. Develop an algorithm for playing a. Solution- Use a random number generator to generate moves. ACCEPTED b. Solution- use game theory to predict human’s next move. Researchers have shown that humans don’t generate random moves, but tend to follow fixed patterns, e.g. Winners stay with last move, Losers use the move that opponent used to win. ACCEPTED

c. Solution- Use the logic in the winner’s triangle shown here and described in this video

d. Solution- Use advanced probability algorithms to generate JD’s next move i. Issue- beyond the scope of this project. As they love to say in textbooks This exercise is left to the student

Summary... it worked... here is the video using random picks

Frank

By — Last update

Your robot can be more than a simple automated machine with the power of ARC Pro!

#1

Have a look at my EZ Cloud app - Bob’s InMoov. I have a script in there for Rock, Paper, Sissors that my robot plays. It randomly picks what it’s going to do and when you tell it what you’ve played it will tell you who won that hand. It plays the best of 5 and keeps track and announces who won the game at the end.

Edit. Your video wasn’t up when I made my comments. That looks great, nice job. I’m sure it will be popular with JD owners

PRO
Synthiam
#2

haha - that's awesome! Thanks for sharing, Frank.

#3

thanks for the compliments... I'll upload the project

Frank

#4

Nicely done, thanks for sharing!

PRO
#5

Very cool. Now you need two of them and get them to play each other.

#6

@Nink, Funny, I'm working on that right now...JD playing with Six

I was having trouble getting the speech recognition to accurately hear one another as I described in another post but got some good feedback on that

synthiam.com/Community/Questions/10829

I was following Professor E's tutorial about have to make a scene using one computer for each robot, but due to voice recognition issues I decided to connect to both robots as once with a single computer also to remove the timing issues. Of course, in that case they really don't listen to one another, they just appear to do so.

My other issue that I discussed in another post is that I want to use an AutoPosition (with movement) control for the JD, but an AutoPosition control(no movement) for the Six to do things like wave and dance (no forward, reverse, etc)

synthiam.com/Community/Questions/10824

I've got some feedback from @jeremie I need to test

Everything is working except for that. I might post post it to stir up some interest and add the Six movements later

Thanks, Frank

#7

@Nink Here is the rough draft without any movements (yet) on the Six... I still need to resolve the second AutoPosition control issue

When that's done, I'll do the full write-up and post the project Frank

PRO