• Welcome to the Speedsolving.com, home of the web's largest puzzle community!
    You are currently viewing our forum as a guest which gives you limited access to join discussions and access our other features.

    Registration is fast, simple and absolutely free so please, join our community of 40,000+ people from around the world today!

    If you are already a member, simply login to hide this message and begin participating in the community!

5x5x5, 6x6x6, 7x7x7 or NxNxN solvers

dwalton76

Member
Joined
Jan 2, 2017
Messages
71
YouTube
Visit Channel
I guess it depends whether there's any advantage to you in reducing slices or phases. If you look at each wing and pair it up with its midge you have a single phase to reduce to the last 2-3 tredges using outer block moves only. (Search AvG edge pairing.)

I found this post on AvG edge pairing
https://www.speedsolving.com/forum/threads/arnauds-5x5x5-edge-pairing-method-examples.1447/

and loaded up the 57 move scramble. I am able to pair the edges in 72 moves so what I am doing seems pretty comparable in terms of the move count (his 'expert' number was 73 moves). I do:
  • pair the outside wings via 4x4x4 edge pairing
  • attempt to pair 3 edges on a Uw slice and pair three more on the Uw' slice back...sometimes the stars align and I can pair 4 at once on either the slice forward or slice back.
  • pair all remaining edges via https://i.imgur.com/wsTqj.png No 1, 5, 6, 7, or 8
 

xyzzy

Member
Joined
Dec 24, 2015
Messages
2,876
AvG uses a few more moves than freeslice (as implemented on a human being, so no backtracking or deep lookahead), in exchange for having less stuff to keep track of.

Here's two different human solves of the same scramble: [1] [2]

First one is freeslice (67 moves), second one is freestyle chain pairing (57 moves).

Solving the wings then matching them to the midges is necessarily significantly less efficient than most other methods that don't do that (freeslice, chain pairing, 3-cycles), although it certainly is a much simpler algorithm if we have a 4×4×4 edge pairing black box to exploit.
 
Last edited:

dwalton76

Member
Joined
Jan 2, 2017
Messages
71
YouTube
Visit Channel
They are, the code that crunches the RGB values to figure out the colors got red and orange backwards on two squares. Red vs orange has been difficult I have some more work to do there. So not 100% solved but "solved" in terms of the solving algorithm and mechanics of the robot working.
 

xyzzy

Member
Joined
Dec 24, 2015
Messages
2,876
They are, the code that crunches the RGB values to figure out the colors got red and orange backwards on two squares. Red vs orange has been difficult I have some more work to do there. So not 100% solved but "solved" in terms of the solving algorithm and mechanics of the robot working.

Would it work better with, say, a stickerless cube? (Or worse, if the detection algorithm needs to have a border around each facelet?)
 

dwalton76

Member
Joined
Jan 2, 2017
Messages
71
YouTube
Visit Channel
Would it work better with, say, a stickerless cube? (Or worse, if the detection algorithm needs to have a border around each facelet?)

So there are two phases at play here
  1. Take photos of all six sides, find all of the facelets, get the mean (red, green, blue) values of each facelet. Having clear borders around the facelets def makes them easier to find here but I have it working even if there are white facelets separated by a white border. Sticker vs stickerless I don't think would matter much. Example of white on white:
    rubiks-110.png
  2. Take the RGB values for each facelet and ID each facelet as U,L,F,R,B, or D
Phase 2 is where the red vs. orange confusion is. The way this part works is
  • ID "anchor" facelets which will act as our color point of reference for each side. For odd cubes this is easy we just take the middle facelet of each side. For even cubes we take a corner to get the first three anchors then we find the other corner that has the greatest "color distance" from our first corner, that gives us the other three anchors.
  • "color distance" is calculated by https://en.wikipedia.org/wiki/Color_difference#CIEDE2000
  • Build a list of the color combos we need for corners
  • Build lists of the color combos we need for each orbit of edges
  • Build lists of the colors we need for the various types of center facelets
So for corners say we know we need a Green, White, Red corner, we look at all of the corner facelets and find the corner that matches the Green, White, Red anchor facelet colors with the smallest color distance. We do this same basic thing for all of the corners, then all of the edges, etc.
 

dwalton76

Member
Joined
Jan 2, 2017
Messages
71
YouTube
Visit Channel
Misc update
  • For 5x5x5 edge pairing I am no longer starting out by using 4x4x4 edge pairing to pair all of the outside edges. This dropped the average number of moves for pairing 5x5x5 edges by about 20 moves.
  • I had an IDA bug that led me to building my lookup tables much larger than they needed to be. With that IDA bug fixed all of my lookup tables are now small enough to include in the repo on github. The repo is about 700M though so the git clone takes a few minutes and takes a bit of RAM. This is big news because now anyone can just git clone the repo and use the solver, they no longer need to download massive tables from dropbox.
  • Lots of performance improvements
    • 4x4x4 takes ~200ms to solve
    • 5x5x5 about 5s
    • 6x6x6 about 7s
    • 7x7x7 about 7s
  • Move counts are down
    • 4x4x4 averages 65 moves
    • 5x5x5 averages 119 moves
    • 6x6x6 averages 214 moves
    • 7x7x7 averages 304 moves
  • I've started working on NxNxN even support by trying to solve a 14x14x14...not working yet
  • A few other people have started using the solver, filing bugs, etc
 

ruwix

Member
Joined
Jun 3, 2012
Messages
102
Location
Oxford, UK
YouTube
Visit Channel
Could you please provide a PHP or JavaScript function that takes the scrambled fields as input and returns the rotations? I will take care of the rest.
 

dwalton76

Member
Joined
Jan 2, 2017
Messages
71
YouTube
Visit Channel
I think the best thing to do would be to have php do a
shell_exec() call to run rubiks-cube-solver.py. You pass rubiks-cube-solver.py the state of the cube via a "--state" arg and it prints out the solution.
 

abunickabhi

Member
Joined
Jan 9, 2014
Messages
6,682
Location
Yo
WCA
2013GHOD01
YouTube
Visit Channel
So there are two phases at play here
  1. Take photos of all six sides, find all of the facelets, get the mean (red, green, blue) values of each facelet. Having clear borders around the facelets def makes them easier to find here but I have it working even if there are white facelets separated by a white border. Sticker vs stickerless I don't think would matter much. Example of white on white:
    rubiks-110.png
  2. Take the RGB values for each facelet and ID each facelet as U,L,F,R,B, or D
Phase 2 is where the red vs. orange confusion is. The way this part works is
  • ID "anchor" facelets which will act as our color point of reference for each side. For odd cubes this is easy we just take the middle facelet of each side. For even cubes we take a corner to get the first three anchors then we find the other corner that has the greatest "color distance" from our first corner, that gives us the other three anchors.
  • "color distance" is calculated by https://en.wikipedia.org/wiki/Color_difference#CIEDE2000
  • Build a list of the color combos we need for corners
  • Build lists of the color combos we need for each orbit of edges
  • Build lists of the colors we need for the various types of center facelets
So for corners say we know we need a Green, White, Red corner, we look at all of the corner facelets and find the corner that matches the Green, White, Red anchor facelet colors with the smallest color distance. We do this same basic thing for all of the corners, then all of the edges, etc.

Great work in tracking the colours of big cubes.
I have started out learning image processing in my coursework, and using color distance is great.
The natural approach would be image segmentation , but then building the list of color combos for the various types of pieces will be lengthy.
 

Horia

Member
Joined
Jun 19, 2018
Messages
3
Hi, I try to make a lego robot that solve the 4*4*4 cube, and for weeks I just tried to search on web but I couldn't find anything. But today I found your files on Git Hub and watch the video with the Crane Cuber. It's very amazing! I plan to use Raspberry Pi 3 to control the motors (I don't have the Mindstorms set so I use some stepper motors). I build with Lego a robot like you, but is not very efficient, I need to change the structure. I am on PC so I can't show you a picture. So I ask if you can publish some pictures around the Crane Cuber, to try improve my robot. I have the lego pieces that you used to build it, so if you want to help us (the people who want to create amazing things), I would be very pleased. Thanks again for your work, I know that it's not easy to do that and I will be very happy if you can help me. Hope you will reply to this. Thanks!
 
Top