Thứ Sáu, 31 tháng 5, 2019

How to Solve a Rubik's Cube in 5 Seconds—or Less

Read more useful articles at: Tech Deeps

Even on my laptop's tinny speakers, the sound is unmis­takable: the click-clacking, slip-sliding sound of a Rubik's Cube whipping into shape. "It's my first solve of the day," says Australian speedcuber Feliks Zemdegs, somewhat sheepishly. It's early in Sydney, where he's speaking to me over video chat from his apartment. Over his shoulder, I can see his unmade bed. On it: a big, squishy, Rubik's Cube novelty pillow. He looks like he hasn't been awake for more than 20 minutes. No matter: It takes him less than seven seconds to transfigure the cube in his hands from scrambled to solved.

Zemdegs holds numerous cubing records, but he is best known as the most consistently swift solver of the 3 by 3: the canonical three-layered, Mondrian-colored cube. (The toy you’re probably picturing is just one of many mechanical riddles belonging to the genus of so-called twisty puzzles.) Last month, at a speedcubing competition in Brisbane, he set a new world record of 5.69 seconds in the Average of 5 event, wherein contestants each solve five cubes that have been scrambled according to computer-generated instructions. When they’re finished, competitors eliminate their fastest and slowest times and calculate the mean of the remaining three. Zemdegs' 5.69-second average was an 0.11-second improvement over his previous best, which was also a world record. "Since 2010, I've broken the Average-of-5 record probably 10 times," he says.

Short-lived records are common in speedcubing, a relatively young sport. (Sport? Sure, why not?) The first world tournament was held in 1982, eight years after the cube's invention by Hungarian architect Erno Rubik. There, competitors took up to a minute to solve the cube. But by 2009, the fastest speedsolvers (many of them too young to drive) were unscrambling cubes in a little over 10 seconds. And today, the hundred best speedcubers on earth all average below 7.7 seconds per solve, with the top 10 all coming in at under 6.5.

And yet, improvements are becoming more incremental; graph the progression of cubing records, and the resulting curves are unmistakably asymptotic. As speedcubers like Zemdegs approach the limits of their finger-flicking craft, an irresistible question arises: What might that limit be?

It's tempting to arithmetize the problem—to divide the most efficient solution to the cube (as measured in turns) by the solve rate of a world-class cuber (as measured in turns per second). The result would provide a theoretical limit to speedcubing.

Solve rates are pretty straightforward: In competition, elite cubers like Zemdegs average just shy of 10 turns per second. (It's mesmerizing to watch, and makes fidget spinners seem quaint.) As for the fewest number of turns required to solve the puzzle, that's trickier to pin down.

For one thing, it depends on the complexity of a cube's scramble. At one end of the spectrum are configurations that require almost no effort to solve. There exist 18 starting positions, for instance, that require a single turn of a single face to resolve. Such simple scrambles would probably never be permitted in a tournament. Then again, the odds of them ever cropping up at random during a competition are, shall we say, small.

"There are more than 43 quintillion ways to scramble a Rubik's cube," says computer scientist Tom Rokicki. "That's more positions than there are grains of sand on all of Earth's beaches."

Forty-three quintillion—43,252,003,274,489,856,000 to be exact—is the kind of number that defies analysis. Which is why, for many years, no one knew for certain how many moves were required to solve the cube’s most Gordian scrambles. But in 2010, Rokicki and a small team of computer scientists convinced Google to let them brute-force the problem by using the company's computers to find the most efficient solution to all 43 billion billion starting configurations. Their proof by exhaustion would have taken a normal computer decades to perform, but Google's machines cut the compute time to a few weeks. In the end, Rokicki's team proved that every Rubik's Cube scramble can be solved in 20 moves, and that the vast majority of them can be solved in even fewer.

But just because a computer can identify the most efficient solution to a scrambled cube doesn't mean a human can. "There’s nobody out there that can look at this cube and say, ah, I’m 18 moves from solved, and this one takes me to 17,'" Rokicki says. "That’s just not something humans can do."

Even if humans could identify the most efficient solution before executing a single turn, actually performing that solution might not be faster than speedcubers’ current methods, which depend on deeply ingrained muscle memory and hair-trigger reflexes.

This is perhaps the greatest misconception among people unversed in the ways of the cube: Anyone who solves the puzzle quickly does so not by sheer intuition, but with memorized sequences of moves, called algorithms, which they deploy to solve the cube section by section. Elite speedcubers will commit hundreds of algorithms to memory and practice performing them in their idle moments. Knowing which to use when boils down to pattern recognition: Each algorithm corresponds to a different arrangement of colored squares on the cube. When a speedcuber spots an arrangement they recognize, they perform the corresponding algorithm, bringing the cube one step closer to solved.

Stringing algorithms together is a skill unto itself. The very best speedcubers excel at something called "look-ahead"—the ability to spot the pattern that will snap into existence right as they finish the move they are currently performing. A kind of short-throw clairvoyance, look-ahead enables cubers to plan for future algorithms a fraction of a second in advance. This minimizes time-consuming pauses and can give observers the impression that a speedcuber is solving the cube in one uninterrupted string of maneuvers. Using algorithms and look-ahead, the most fleet-fingered cubers in the world average between 50 and 60 moves per solve, which they can execute almost without thinking. “In speedcubing, the second you pause to consider what you’re doing, it’s all over,” Rokicki says. “It’s like dancing in a way, and I know pauses are a big part of dancing, but if you’re dancing and you just stop, well, it’s not part of the dance.”

But there’s one variable we still haven’t accounted for: Luck. On rare occasion, by sheer chance, a cube will be scrambled in such a way that it requires fewer moves than usual to solve (think 40 to 50 moves, instead of 50 to 60). On rarer occasions still, a lucky scramble will find itself in the hands of a world-class cuber. And on the rarest occasions of all, that cuber will execute their algorithms not just swiftly but seamlessly, dancing through their solution with near-perfect fluidity. When all these things happen at once, an incredible time can materialize seemingly out of nowhere.

That’s precisely what happened last May, when Zemdegs performed a single solve in a then-unprecedented 4.22 seconds. And it’s what happened just six months later, when, at a competition in Wuhu, China, a relatively unknown speedcuber named Yusheng Du solved a cube in just 3.47 seconds.

“That was pretty unexpected, to be honest,” Zemdegs says. It’s not that he didn’t think somebody would break his record (“I’ve had enough of them broken over the years that I’m pretty numb to it by now,” he says), he just didn’t expect it to fall so quickly, or by so much. Not since 2008, when the single solve record jumped from 8.72 to 7.08, has the world of speedcubing witnessed such a sizable jump.

And yet, Zemdegs knows there are even faster solves on the horizon. “My best single solve, in practice, is 3.01 seconds,” he says, “and I know a couple of people who’ve managed sub-three solves at home, just one-offs.” He estimates that, under perfect conditions, someone at his skill level could solve a cube in 2.5 seconds. “The question is just: When will it happen?”

But future records won’t depend entirely on luck. Perhaps there are methods, yet to be discovered, that consistently require fewer than 50 moves—an advance that could drive the record for average solve into the mid-four-second range. Cubing hardware could also improve; today, specially designed speed cubes are easier to twist than the original and contain magnets that help the faces snap into position.

And to hear Zemdegs tell it, there will always be room for improvement when it comes to fluidity and finger speed. “You can always be more perfect,” he says.

A fallacy, I think to myself, from my side of our video chat. But an enticing one, to be sure.


Science Latest

Read more useful articles at: Tech Deeps

Không có nhận xét nào:

Đăng nhận xét