Lego robot solves Sudoku puzzles

Swedish programmer Hans Andersson has created a Lego Mindstorms robot that can solve Sudoku puzzles.

Hans Andersson

Lego Mindstorms are futuristic toys for creative kids. But who knew these DIY robots can get creative themselves and solve puzzles?

Swedish programmer Hans Andersson bought a programmable Mindstorms NXT kit for his two daughters and then began tinkering with it himself. The result: a toy that can autonomously solve Sudoku puzzles in what looks like a matter of minutes.

The Sudoku Solver scans the entire puzzle with a light sensor before determining the missing digits in each square. Its computer performs image processing with a thresholding algorithm to make sense of the sensor data. Recognizing the existing numbers in the puzzle seems to be the most difficult part of the process.

Solving for missing numbers is easy with a backtracking algorithm, according to Andersson. "But since the Mindstorms processor is rather slow, and since it doesn't allow for recursive functions, it took some care to optimize it," he writes. The toy can still do Sudoku better than me.

Andersson has also created a Mindstorms robot called Tilted Twister that can autonomously solve a Rubik's Cube in about six minutes.

Gotta love robots. Now they're playing with our toys; next they'll be playing with us!

 

ARTICLE DISCUSSION

Conversation powered by Livefyre

Don't Miss
Hot Products
Trending on CNET

Hot on CNET

CNET's giving away a 3D printer

Enter for a chance to win* the Makerbot Replicator 3D Printer and all the supplies you need to get started.