Let's start with the white face. Try to form a plus sign on the top of the cube, matching the colors of the side stickers to the colors of the lateral centers. This step shouldn't be too hard, try to do this without reading the examples below.
Turn your cube upside down because we don't need to work with the white face anymore. We can insert an edge piece from the top-front position to the middle layer using a trick. Do the left or right algorithm depending on which side you have to insert the piece:
1. Hold the cube in your hand having an unsolved yellow corner in the highlighted top-right-front position.
2. Repeat the algorithm until this piece is solved.
3. Turn the top layer to bring another unsolved piece in the highlighted position.
4. Repeat R' D' R D until that one is also solved.
5. Do 3 and 4 for any other unsolved yellow corner.
Possible Problem:
The corner you are looking for is in the top layer, but in the wrong position or turned the wrong way around. Turn the cube so that the corner is in the front right top corner then move the corner to the bottom layer by following the following steps.
STEP 5 - COMPLETE THE THIRD LAYER CORNERS
(1) First we will put the corners in the correct position (A).
You will now have either 0, 1 or ALL the corners pieces will be in their correct positions, either the right way up or reversed.
If one corner piece is in the correct corner turn the cube to that this correct corner is in the front top right position. The piece is in the correct position, BUT may not be turned the correct way around.
At speedcube we know you love your speed cubes, and that you want them delivered fast - that's why 99.9% of our customers rate us a 5 star shopping experience. Please do try our fantastic service, or come visit us at our store - we are here to help.
I am a student without any coding experience at all. I need to run this code on github, -cube-cracker.git but I have no idea what I'm doing and I'm really just looking for any way to get this program running. I'm pretty sure the code is in c++, and the original device was a Linux. I'm trying to run it on a windows laptop, so please let me know of programs that I could use that are compatible. If anyone has any tips or just an in depth tutorial on how to get this running you would be a life saver. And please let me know if you need anymore details.
It uses OpenCV for the image processing part (cube detection, colour recognition using a multi-class SVM, etc.) and SceneKit for the 3D visualisation of the solving process. Most of the UI is done using UIKit in interface builder.
For each layer you implement a couple of algorithms that turn pattern X into pattern X'.Each step in a phase should bring the cube close to solving. You can do this by adding a value to each pattern (where higher values are given to more unsolved cubes). You can also add a difficulty (for example the number of turns) so you can select an algorithm based on the best value gain per difficulty (or reach the best result with the least turns).
I'm not sure I understand your problem and what you mean by shortcuts.If you are using some dynamic programming method for solving the rubik's cube you need to make sure you are looking at enough steps ahead in order to reach a solution.I believe that if you only support 2 types of moves (rotate right, rotate up) you need to look 12 steps (not sure) ahead before deciding on each move in order to ensure a solution.
Rubik's cube has state space size in the order of 265. A backtracking algorithm that searches the state space blindly may need to examine a large portion of the state space before it finds the solution, so clearly a simple backtracking algorithm is not going to work very well. But then, this problem is already solved many times. See e.g.
Meanwhile Kas references another solution which will work flawless but still requires the solving algorythm on another device. I wanted the solving engine being build into the App itself. The smartphone has more than enough calculation power and the App needed to be written anyway. So with this App there is no other server required to obtain the cube solution.
I glued pieces of anti-slipping-matt to the grippers with double sided adhesive tape. The matt itself ha a checkboard pattern and when you put one piece over the other you can create an almost closed surface. Please see the pictures. The grippers worked right from the beginning and hold the cube really well.
Hi RICH
Great Post.. I had been following Kas in his implementation of the rubik solver, and have built the grippers.. I was about to put in on the proverbial shelf because of the issue about external server that had shut, but then found your post. This appears to make a great self contained solution.
I like the base that you produced for it, really quirky. You seem to have a couple of buttons built into the base (or at least holes for them). I can seee there i a couple of holes for the servo wires but was wondering about the others. I guess there is a slider on/off but there also appears to be an allowance for a pushbutton..whats that for?
I can probably work out the connections that you have used from the code but was wondering if you put a wiring diagram together to help. I may not be using a nano as I have some other small boards kicking around. I probably will use an ESP32 board which I think has a built in Bluetooth so I may use that.
I havent inspected the code yet, but you also mentioned about writing some code to allow you to fine tune and set up the grippers. Is that part of the code that you posted or is it separate?
Using the phone and APP is a great way of scanning the cube, enabling me to make reuse of the myriad of phones piling up in my desk. Its a nice clear app to use as well. I also happen to have a samsung A5 that I can use, so will no changes to the mount is needed. In doing the scanning I understand that you manually touch the screen take a snapshop of the appropriate face, and the solver will move to the next face etc... Do you have any thought about taking out the manual touch of the screen, so you can just load up the cube and press go... or is that pushing the colour sensing a bit far. Ohh btw is that a light at the top of phone mount stick... in one picture it just looks like a USB socket..?
If the color sensing did sense a wrong color (and it did happen very often if light conditions were less than ideal) than you ended up with an invalid cube string and got no solution for it. You had to do it over and over again until you were lucky because there was no option to correct a wrongly recognized color. My app allows to manually correct the colors if wrongly sensed.
In the app by KAS you had to manually set a delay (in coarse steps, you could not just enter a certain time) until the next shot was taken. So the cube moving needed to be finished until that shot came. The first 3 moves were easy because the cube is just turned by one face. But move 4 and 5 take considerably longer. So I had to choose something like 8s delay to be sure my robot was ready. I powered mine with 4.8V but KAS powered his with 6.6V which makes the servos considerably faster.
At the end I wanted the App to be usefull for anyone interested regardless of the type of robot. The safest way was to switch manually to the next face when color sensing and correcting is finished.
Yeah, there is a small USB socket on top. The idea was to put an USB light there to enhance color recognition. But my colour sensing is not that bad and you can correct it if it got wrong, so its not needed anymore. The solid-colored cubes are easier sensed but also the sticker cubes do work but are a little bit trickier (more reflection).
The grippers work well but now need to be calibrated to not only hold and grip the cube but turn the cube exactly through the +/- 90degrees. So I need to now set up a little programme to get the exact figures to plugs into the main programme relating to the angular movement of the servos.
I am having a bit of a problem with the commands from the phone app, and need to check that I actually getting the clear commands over the bluetooth. I am able to establish a bluetooth connection with the Arduino but the system doesn't seem to respond to requests to move the cube..or start to solve.
Hi Richard
Complement was well deserved.. I used your base as a template and it all screw together perfect, including the self tapping M3 fixing point for the "cube" to the base... and it looks good as well. I just need to put some coloured squares on it... maybe
Thank you for your time in response to type of capacitor required. I have just finished installation and report that the HC-06 is now working fine. However, i am now faced with another issue, the sequence of rotations appears out of sync as shown in the attached video where I change from the 'front' to 'Right'. All that I have changed in the downloaded files are the servo parameters in Cubemover13 arduino file and the Sieze to 14 in the cube.cpp file.
I'm a mechanical engineering student currently building a rubik's cube solver. I'd like to code a VSCode program (meant to interface with an arduino mega) that uses the basic CFOP method (solves cross -> corners -> second layer edges -> OLL -> PLL).
The simplest way of going about it would be to pretty much hardcode in a sequence of moves for each piece of the cube. For the first 4 edges and corners, this would be an absolutely ridiculous amount of code. Take the white-orange-blue corner; there are 8 possible positions in 3 different orientations, leading to 24 completely unique sequences of moves I'd have to account for. All in all, I predict it would end up being a 3000+ line program.
"take a piece and mess around with" will not work with the Rubik's cube problem - when you "mess around" with arbitrary moves, you destroy the order of the pieces you already placed correctly beforehand. Building a full search tree won't work either, that tree would require 43,252,003,274,489,856,000 nodes due to exponential growth.
760c119bf3