Computer Science major designs robot that solves Rubik’s Cube

April 06, 2009

When Professor Pavel Naumov offered his senior Computer Science majors the opportunity to design and program a robot for their capstone projects, Shannon Jackson couldn’t resist the challenge.

The traditional project of inventing and programming a game would have been a challenge too, but the robot intrigued Jackson, who has a double major in Mathematics and Computer Science. She decided to use the Lego Mindstorm kit to build and program a robot to solve the Rubik’s Cube.

“I wanted to do something people would understand – something everyone could relate to,” Jackson said, explaining that math and computer science are generally perceived as abstract and complex. The commonly recognized puzzle would provide a connection.

Besides, she said, this was something she could build and see the concepts at work. Her first step was to write the program using the known algorithm, the set of steps that solves a problem – in this case, the Rubik’s Cube.

“My math major proved to be incredibly helpful since the construction of the robot relies on geometry, specifically angles",” said Jackson, who is also doing a Mathematics capstone on prime numbers – a number that is only divisible by one and itself – and an independent study in cryptography. “It’s interesting that 1867, the year our school was founded, is a prime number.”

Both Jackson and Naumov were surprised by what parts of the project have been the most difficult.

“When Shannon just started, I thought that the most difficult part of the project would be to implement the known algorithm that human beings use to assemble the cube,” said Naumov, an assistant professor of Mathematics and Computer Science. “However, now it appears that the even greater challenge is in solving the mechanical engineering problems of the robot’s operation.”

Jackson has programmed the robot, which she named Jasper, to flip the cube and rotate its six nine-square sides in a series that results in the jumbled puzzle’s six sides each having all of the same color squares. Jasper has a light sensor that distinguishes the cube’s colors and two rotation arms to manipulate the cube.

Jackson, who designed and built the robot from Lego pieces, is still working out Jasper’s mechanical bugs – sometimes the robot flips the cube too hard and it bounces off its rotation platform. She recently took the cube apart and sprayed it with Pam for smoother rotation.

Jasper has captured more than Jackson’s imagination.

“Other seniors and juniors like to observe her working and offer her help with the project,” said Naumov. “One of our 2008 graduates stopped at the department and I found him helping Shannon too.”

While a few mechanical glitches remain, there’s little doubt Jackson will work those out in the remaining weeks of the semester.

“It’s been fun,” said Jackson, who is considering a job offer from AAI, a defense contractor in Hunt Valley, Md., that will allow her to pursue her master’s in Computer Science. She has interned with the company for the past two summers.

The project involved learning something new and that made it even more interesting to Jackson, who followed through on her decision to tackle a new and different skill each of her college years. This year she added juggling to a list that includes knitting, photography and sewing. In fact, so many Math and Computer Science majors joined her in juggling, they now have a club and are often seen in the halls of Lewis or on Red Square tossing balls in the air.

“Juggling is fun too – and a great stress reliever,” she said.