Solving a Rubik's cube

Is it possible to solve a Rubik’s cube with a vex robot. If so can i get some input on how i might program it.
I haven’t ever used IQ before and idk if its the same form of programming as the V5 text coding software. But i know that there is something on that with IQ.

Someone did it with mindstorms, so I’d imagine that it is possible

3 Likes

You would need a vision sensor.
It is possible, just hard

2 Likes

I’ve seen a VEX IQ one. You should be able to find that pretty quick on YouTube.

8 Likes

I would imagine coding it would be very difficult using CFOP or any other human used method.

Most human-memorizable algorithms are pretty far from optimal in terms of number of moves. With sufficient compute power it’s possible to generate a move sequence to solve any scramble in 26 moves or less - more info in this wikipedia article and also on this page.

That’s why a lot of these cube-solving robots offload scanning and move computation to an Android phone - an IQ brain would likely not be able to compute such an optimal solution.

3 Likes
I built my own a while back

image

Not a great picture, but it shows the general movement mechanisms. Took forever to do anything.

18 Likes

We have 2 vision sensors, that’s the one thing we dont have to worry about

And yet the post above yours shows it in action?

Oh, It does CFOP? That’s nice. Sorry, I can’t tell anything from the thumbnail.
But wait a sec…It says “The cube is solved optimally(about 24 moves)” and average full CFOP takes 55 moves. So it must use a different method.

So it’s smarter than people? My point was it’s working.

But, in deference to you, I spent the last few mins poking. There appears to be a robot out of VEXIQ parts that manages the cube movements (which is pretty cool) but it’s using an android app that is using light pulses to send it to the robot. Which is some three layers of cool. (VEXIQ, light stuff as a communications and an Android application.

His site https://robotics.benedettelli.com/vex-iq-rubik-solver/ has some details.

1 Like

I mean, humans aren’t really smart at things like that.

4 Likes

i was gonna start with it learning the beginners method and have it learn off of that to make itself better

Actually the number of moves is 20.

yeah, but i dont know any other method and if i can get it to learn it can probably learn CFOP

Strictly speaking we’re both right - there are two different ways to count the number of “turns” required to solve a given scramble. From the first section fo the Wikipedia article I linked above:

The maximum number of turns required to optimally solve any scramble (known as “god’s number”) is 20 in the half-turn metric and 26 in the quarter-turn metric.

When I wrote my earlier post, I skimmed the wikipedia article looking for the number and missed that particular nuance.

1 Like

That is correct. The reasons I prefer 20, especially for a robot solve, are:

  1. A double move would not need to be realigned so that the side to be turned was facing the correct way, it is just one fluid movement.
  2. In standard notation, you won’t often see something like R R, but R2, presented as a single turn.
  3. 20 sounds better. :wink:
4 Likes

i see your point, the beginners method usually take around almost 100 moves to solve

I can see why you would want to use beginners, as there are a ton on F2L, and OLL cases.

You could get away without using any kind of colour detection if you told the program the starting colour patterns of the cube so the program first calculates first calculates the fastest sequence of moves to solve the cube then sends that to the motors to physically solve the cube.

If you really wanted to be able to set the cube in the robot and have it solve it without having to manually tell the controller the cube colour orientation, I would recommend to just use colour sensors/LDRs to detect the colours on the cube’s faces instead of a vision sensor because it might be difficult for it to tell apart individual squares on the cube face.

I personally think this is mostly a coding problem which is not necessarily confined to Vex so I personally think that you should do some research on the math behind this kind of thing and try first to write a cube solving simulator in python or something before you actually spend time trying to get a robot to work.

4 Likes