Rubik’s Robot So Fast It Looks Like a Glitch in the Matrix

From Ferraris to F-16s, some things just look fast. This Rubik’s Cube solving robot not only looks fast, it is fast: it solved a standard cube in 380 milliseconds. Blink during the video below and you’ll miss it — even on the high-speed we had trouble keeping track of the number of moves this solution took. It looked like about 20.

Beating the previous robot record of 637 milliseconds is just the icing on the cake of a very cool build undertaken by [Ben Katz]. He and his collaborator [Jared] put together a robot with a decidedly industrial look — aluminum extrusion chassis, six pancake servo motors with high-precision optical encoders, and polycarbonate panels for explosion containment which proved handy during development. The motors had to be modified to allow the encoders to be attached to the rear, and custom motor controllers were fabricated. [Jared] came up with a unique board to synchronize the six motors and prevent collisions between faces. Machine vision is provided by just two PlayStation Eye cameras; mounted at opposite corners of the enclosure, each camera can see three faces at a time. They had a little trouble distinguishing the red from the orange, which was solved with a Sharpie.

[Ben] and [Jared] think they can shave a few milliseconds here and there with tweaks, but even as it is, this is a great lesson in optimization and integration. We’ve covered Rubik’s robots before, like this two-motor slow and steady design and this six-motor build that solves a cube in less than a second.

Continue reading “Rubik’s Robot So Fast It Looks Like a Glitch in the Matrix”

Solving a Rubik’s Cube with Just Two Motors

We’ve all seen videos of Rubik’s cube champions who can solve the puzzle in less than 5 seconds. And there are cube-twisting robots that can solve the cube even faster, often in under a second. This Rubik’s cube solver is not one of those robots, but it’s still pretty cool.

The reason we like Dexter Industries’ “BricKuber” is not for its lightning speed — it takes a minute or two to solve the puzzle. What we like is the simplicity of the approach to manipulating the cube. Built from LEGO parts, including Mindstorms motors and a BrickPi controller, the BricKuber uses only two motors to work the cube. One motor powers a square turntable upon which the cube sits, while the other powers an arm that does double duty — it either clamps the cube so the turntable can rotate a layer, or it rakes the cube to flip it 90° on the turntable. With a Pi Cam overhead, the rig images all six faces, calculates a solution to the cube, and then flips and twists the cube to solve it. It’s simultaneously mind-boggling and strangely relaxing to watch.

All the code is open source, and we strongly suspect a similar and possibly faster robot could be built without the LEGO parts. You might even be able to build one with popsicle sticks and an Arduino.

Continue reading “Solving a Rubik’s Cube with Just Two Motors”

Solving Mazes with Graphics Cards

What if we told you that you are likely to have more computers than you think? And we are not talking about things that are computers while not looking like one, like most modern cars or certain lightbulbs. We are talking about the powerful machines hiding in your desktop computer called ‘graphics card’. In the ordinary gaming rig graphics cards that are much more powerful than the machine they’re built into are a common occurrence. In his tutorial [Viktor Chlumský] demonstrates how to harness your GPU’s power to solve a maze.

Software that runs on a GPU is called a shader. In this example a shader is shown that finds the way through a maze. We also get to catch a glimpse at the limitations that make this field of software special: [Viktor]’s solution has to work with only four variables, because all information is stored in the red, green, blue and alpha channels of an image. The alpha channel represents the boundaries of the maze. Red and green channels are used to broadcast waves from the beginning and end points of the maze. Where these two waves meet is the shortest solution, a value which is captured through the blue channel.

Despite having tons of cores and large memory, programming shaders feels a lot like working on microcontrollers. See for yourself in the maze solving walk through below.

Continue reading “Solving Mazes with Graphics Cards”

OneSolver Does What Wolfram Can’t

Wolfram Alpha has been “helping” students get through higher math and science classes for years. It can do almost everything from solving Laplace transforms to various differential equations. It’s a little lacking when it comes to solving circuits, though, which is where [Grant] steps in. He’s come up with a tool called OneSolver which can help anyone work out a number of electrical circuits (and a few common physics problems, too).

[Grant] has been slowly building an online database of circuit designs that has gotten up to around a hundred unique solvers. The interesting thing is that the site implements a unique algorithm where all input fields of a circuits design can also become output fields. This is unique to most other online calculators because it lets you do things that circuit simulators and commercial math packages can’t. The framework defines one system of equations, and will solve all possible combinations, and lets one quickly home in on a desired design solution.

If you’re a student or someone who constantly builds regulators or other tiny circuits (probably most of us) then give this tool a shot. [Grant] is still adding to it, so it will only get better over time. This may be the first time we’ve seen something like this here, too, but there have been other more specific pieces of software to help out with your circuit design.

Winning Game-App Contests with Computer Vision

[Gadget Addict] found out about a contest being held by a shoe seller. Their mobile app has a game very much like Bejeweled. The high scorer each month gets £500. His choices were to be better at the game than everyone else, or to be smarter. He chose the latter by writing a computer vision program to play the game.

There are two distinct parts of a hack like this one. The first is just figuring out a way to programmatically detect the game board and correctly identify each icon on it. This is an iPad game. [Gadget Addict] is mirroring the screen on his laptop, which gives him easy access to the game board and also allows for simulated swipes for automatic play. Above you can see two examples where black pixels may be counted in order to identify the icon. A set of secondary checks differentiates similar entries after the first filtering. The other part of the hack involves writing the algorithms to solve for the best move.

If you liked this one, check out a super-fast Bejeweled solver from several years back. We should also mention that this was just a proof of concept and [GA] never actually entered the contest.

LEGO stylus solves Ruzzle tablet game


This grid of letters is a puzzle game for tablet devices called Ruzzle. The contraption attached is an automated solver which uses LEGO Mindstorm parts to input the solutions on the screen. [Alberto Sarullo] is the mastermind behind the project. As you can seen in his demo video after the break he has a flair for the cinematic. But he makes you work a little bit to discover the details of his project.

His post gives a general overview of how this works. A Linux box takes a screenshot of the Ruzzle board. After processing the graphics with Imagemagick he uses Tesseract — an Optical Character Recognition program — to figure out which letter is on each square of the playing area. From there NodeJS is used to discover all possible words with the help of a dictionary file. The final solutions are pushed to the LEGO parts to be traced out on the touch screen with a stylus. The nice thing is that he published all of his code, so you can drill much deeper into the project by pawing through his repository.

Continue reading “LEGO stylus solves Ruzzle tablet game”

How to write your own Minesweeper solver


We think we have found project that will take over our holiday free time. [Bai Li] just published an excellent article about writing a program that can automatically solve the game of Minesweeper. For those of you who are unfamiliar, Minesweeper gives you a grid in which land mines have been randomly placed. As you click on boxes to reveal what is underneath you are greeted with a number which represents how many mines surround that box. [Bai’s] project examines how the puzzle may be solved programmatically.

He chose to use Java to write the solver. This works well both reading from the screen as well as simulating mouse clicks on the game. The reading portion of the program uses color detection with a screenshot. There were two problems associated with this, the numeral one is almost the same color as an uncovered square, and the numerals seven and three use identical colors. The input portion was much simpler as he’s able to use the existing Robot class.

The logic behind writing an efficient solver is very interesting. One of the most fascinating examples is shown above. What should you do when there is no possible way to ensure a safe move? As with traditional chess games, [Bai] has the solver calculate all possible solutions and choose the move that has the best odds of success.

His source code is available, but won’t this one be fun to hack out from the concepts alone? For some reason this seems more accessible to us than something like the Bejeweled Blitz solver.

Continue reading “How to write your own Minesweeper solver”