LEGO Mindstorms Sudoku Solver


Swedish hacker [Hans Andersson] is no stranger to puzzle-solving robots. His prior work, A Rubik’s cube-solving robot called Tilted Twister, made waves through the internet last year. [Hans’] latest project only has to work in two dimensions, but is no less clever. This new robot, built around the LEGO Mindstorms NXT system, “reads” a printed sudoku page, solves the puzzle, then fills out the solution right on the same page, confidently and in ink. It’s a well-rounded project that brings together an unexpected image scanner, image processing algorithms, and precise motor control, all using standard NXT elements.

The building instructions have not yet been posted, but if the video above and the directions for his prior ’bot are any indication, then we’re in for a treat; he simply has a knack for explaining things concisely and with visual clarity. The source code and the detailed PDF diagrams for Tilted Twister are as gorgeous as his new robot’s penmanship.

[thanks Eric]

15 thoughts on “LEGO Mindstorms Sudoku Solver

  1. So wait, a guy made a puzzle to waste time/exercise the brain (whichever view you take of puzzles like this) and some guy made a robot so people don’t have to do the puzzles? I’m in!

  2. wow great work..
    a year back i have done a similar robot.
    unfortunately there isn’t a lot of documentation around..
    just a really boring youtube video.
    maybe i’ll create a writeup once but basically it is a setup similar to a plotter which scans the blocks of the puzzle with the light sensor. the light sensor is modified so that its field of view is very narrow. (the sensor is isolated from ambient light, and then the beam of the led is narrowed down with a small tube so it enlightens only a small spot on the paper)
    the robot scans a 12×12-pixel image and processes it with some sharpening algorithm and then performs a very primitive ocr-algorithm on it. (comparing to reference-images)
    the solution is then calculated and the result is written with the attached pen.
    the whole thing is implemented with several threads so that the ocr can run in the background while the next image is scanned.

    the plotter approach has been chosen because all the other approaches were too loose.

    thats why i admire this guys work, since he managed to get it working with a setup which has a lot of inaccuracies.

  3. he’s got the source from the rubik’s cube robot posted now too. i followed his build instructions and made my own(rubik’s cube robot) over the break last christmas. it worked pretty well though you need a looser cube for ideal performance.

  4. Google “Flying Blade of Amputation” to see one of National Instruments’ keynote presentations. They designed labVIEW, the visual programming language that LEGO Mindstorms uses (simplified for kids, of course).

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.