Toy Robot to Solve Sudoku (w/ Video)

September 3, 2009 by Lin Edwards Toy Robot to Solve Sudoku

Enlarge

(PhysOrg.com) -- A Swedish programmer, Hans Andersson, has used a Lego Mindstorms NXT kit to develop a robot to solve Sudoku puzzles.

Andersson first purchased the Lego Mindstorms kit for his daughters, but couldn't resist playing with it himself.

The first scans the puzzle and uses an to map out the puzzle's pre-set numbers and blank squares. The robot scans one line at a time, inching forward a little after each line is scanned.

The blurry scanned image is then converted to a black and white binary image to improve the sharpness of the picture. A threshold value calculated by Otsu's Method is used to determine whether each pixel in the image is white or black.

You need Flash installed to watch this ideo

The Otsu Method classes pixels as either foreground or background, and then determines the optimal threshold that minimizes the intra-class variance. Pixels below the threshold are set to black, and those above are set to white.

A thinning algorithm is then used to convert the resulting image of each digit to 1-pixel wide lines. The digits are then examined for features such as their width, and the number and direction of tips on the digit. The digit six, for example, has one tip, which points to the right. Following this procedure for each digit, the robot identifies all the pre-set numbers in the puzzle.

Once the puzzle is mapped, the robot solves it and fills in the blank squares. A recursive backtracking algorithm would normally be used to solve puzzles such as Sudoku, crosswords, or other puzzles in which the solution has several candidates. The method carries out a systematic examination of all possible solutions, and abandons and does not re-visit any that are eliminated.

The Lego Mindstorms processor is too slow to use a backtracking algorithm and it does not allow for recursive functions, so Andersson had to make sure the calculations were optimized. The result is a little robot that can solve Sudoku puzzles and get them right every time, and in only a few minutes.

More information: http://tiltedtwister.com/sudokusolver.html

© 2009 PhysOrg.com


   
Rate this story - 4.6 /5 (5 votes)

Rank Filter

Move the slider to adjust rank threshold, so that you can hide some of the comments.


Display comments: newest first


September 3, 2009 all stories

Comments: 1

4.6 /5 (5 votes)

  • hide
  • Related Stories




  • hide
  • Relevant PhysicsForums posts

  • how to welding thin SS foil (0.002")?
    created Feb 08, 2010
  • Civil Engineering is hazardous to your career prospects
    created Feb 06, 2010
  • hot water circulator, kitchen faucet, ? mixing
    created Feb 06, 2010
  • Static or dynamic pressures in duct
    created Feb 06, 2010
  • More from Physics Forums - General Engineering

Other News

Millimeter-scale, energy-harvesting sensor system developed

Millimeter-scale, energy-harvesting sensor system developed

Electronics / Hardware

created 21 hours ago | popularity 4.8 / 5 (11) | comments 5 | with audio podcast

(PhysOrg.com) -- A 9-cubic millimeter solar-powered sensor system developed at the University of Michigan is the smallest that can harvest energy from its surroundings to operate nearly perpetually.


US technology titans IBM and Intel have rolled out powerful new computer chips designed for business networks

Intel, IBM roll out new computer network chips

Electronics / Hardware

created 10 hours ago | popularity 5 / 5 (4) | comments 1

US technology titans IBM and Intel have rolled out powerful new computer chips designed for businesses continually demanding more from networks and data centers.


Intel Itanium 9300 Processor Raises Bar for Scalable, Resilient Mission-Critical Computing

Electronics / Hardware

created 20 hours ago | popularity not rated yet | comments 0

Intel Corporation today introduced the Itanium processor 9300 series, previously codenamed "Tukwila," which delivers more than double the performance of its predecessor, boosts scalability and adds reliability features to ...


Robonaut 2: NASA, GM Create Cutting Edge Robotic Technology

Robonaut 2: NASA, GM Create Cutting Edge Robotic Technology

Electronics / Robotics

created Feb 04, 2010 | popularity 4.5 / 5 (13) | comments 7 | with audio podcast

(PhysOrg.com) -- Robonaut is evolving. NASA and General Motors are working together to accelerate development of the next generation of robots and related technologies for use in the automotive and aerospace ...


JooJoo

Disputed Joojoo tablet to ship at end of February

Electronics / Consumer & Gadgets

created Feb 04, 2010 | popularity 4 / 5 (5) | comments 3

(AP) -- The Joojoo, a Web-browsing tablet device that's the subject of a high-profile Silicon Valley legal dispute, appears on track to reach early buyers at the end of February.