Smart Rock-Paper-Scissors Game with HUSKYLENS 2

Rock-paper-scissors isn’t just a luck-based game of chance anymore—it’s a showdown built on behavior analysis and strategy prediction!
The system nails precise matches with two core modules working together: On one hand, image recognition tech snaps up and accurately identifies your hand gesture in a flash, making sure action data is captured in real time. On the other, AI crunches your past moves, spots patterns in how you play, and then guesses your next move.
This dual "gesture recognition + strategy prediction" setup makes the game both super responsive and logically sharp. You’ve gotta balance random picks with fake-outs to outsmart the AI, while the AI keeps refining its guesses with more data. At its core, this back-and-forth is all about your playing style meshing (or clashing!) with the AI’s algorithm—and it’s what gives rock-paper-scissors some solid tech cred.

Ā 

Project Highlights

1. AI Predicts First, Reads Your Playstyle

Ditch the random guesswork! Our AI uses big data smarts to dig into your past moves, spot patterns, and even figure out your sneaky fake-outs—turning guesswork into strategy.
Ā 

2. Blazing-Fast Gesture Recognition

Powered by HuskyLens 2, our upgraded vision model snaps your hand gestures in a flash. No lag, no mix-ups—even quick or tricky moves get caught instantly.


In this project, you’ll learn to:
- Train and deploy your own rock-paper-scissors on HuskyLens 2.
- Team it up with K10 and a large language model (LLM) to build your ultimate AI opponent.
Ā 

Prep Work

Hardware Needed

To follow this tutorial, you’ll need these hardware items:

HARDWARE LIST
1 HUSKYLENS 2 AI Vision Sensor
1 UNIHIKER K10
1 microSD 16GB (TF) Class10 Memory Card
1 TF card / MicroSD card reader

Software Needed

- Mind+ software :
To check HuskyLens 2’s firmware version: Go to System Settings → Device Info.


The version in the picture is 0.9.0. You need to update it to version 1.1.6 or higher. For firmware update, please refer to: https://wiki.dfrobot.com/_SKU_SEN0638_Gravity_HUSKYLENS_2_AI_Camera_Vision_Sensor#7.%20Firmware%20Update

Feature Implementation

HUSKYLENS 2 Model Deployment

icon dfrobot_rps_reco.d978.zip 5.53MB Download(0)

Connect your computer to HUSKYLENS 2 with a USB data cable. Once connected, a disk named Huskylens will show up on your computer. Copy the RPS detection model ZIP file to the \storage\installation_package folder of the Huskylens disk.

Ā 

Ā 

Tap the HUSKYLENS 2 screen, then tap to enter 'Model Installation'.

Ā 

Ā 

Pick Local Installation, and you’ll see the screen below once it’s installed successfully.
Ā 


Now check the HUSKYLENS 2 screen — if a new feature called "RPS Reco" pops up, that means you’ve successfully imported your self-trained model into HUSKYLENS 2!
Ā 


Tap into the RPS Reco feature and check out how well the model you deployed recognizes things.
Ā 


Hardware Connection & Setup

Connecting the Hardware

Use a 4-pin white rubber cable to link the K10 and HuskyLens 2. And make sure both the K10 and HuskyLens 2 are powered up.
Ā 


Mount and secure

You can use a fixing clip that fits HuskyLens 2. Here’s the link for this 3D-printed part:
https://makerworld.com.cn/zh/@user_739543819/upload
Ā 


K10 Playing Audio Files

Use a TF card reader to put the audio file(s) onto the TF card, then insert the TF card into K10’s TF card slot. The specified audio file on the TF card will play in the background. Right now, only WAV-format stereo audio is supported — otherwise, there might be static or the audio will play too fast.


Heads up: If you’re using a memory card larger than 32GB, you need to format it to FAT32 first.


Code blocks

Add HuskyLens 2 to the Mind+ user library.

Ā 

Once the model is deployed, find the self-trained model block for HuskyLens 2.
Ā 


Find the algorithm ID number for Smoking Detection in HuskyLens 2 — mine, for example, is 128.
Ā 

License
All Rights
Reserved
licensBg
0