• Welcome to SpeedSolving.com — the world’s largest puzzle community!

    You’re currently browsing as a guest, which means you have limited access to discussions, resources, member profiles, and community features.

    Join 50,000+ cubers and puzzle enthusiasts from around the world to ask questions, share solves, improve faster, and be part of the community.

    Registration is free, fast, and easy — create your account today.

    Already a member? Log in here to hide this message and start participating.

Announcing: New 4x4x4 Brute Force Solver

Status
Not open for further replies.
Speedup is never guaranteed to be linear. I would be very surprised if you get linear scaling up to 16 cores on a dual socket machine.

This is true for most searching programs, such as chess, as there is a diminishing return on each additional core thrown at the problem.

However, the cube has 6 faces, each of which may be rotated 0 degrees, 90 degrees, 180, or 270. This gives a total of 24 possible orientations to start from as the cube is attempted to be solved. I can replicate all of my data structures in RAM with simply a different cube orientation, and I am essentially attacking the problem with a potential 24 times increase in speed. I can spawn up to this many threads in my move generation code.

I did test my move generator out on a Dual E5-2697v2 at the office (24 physical cores) and I got in some trouble :) I also shot up from 500 million nodes/second (old matrix code on a slower system) to 14,200,000,000 nodes/second (new bitboard move generator with optimized code, one line of code to generate slice moves!) That was a little more than a factor of 28.

But this incredible speed is worthless unless I figure out how to use a corner-pruning table (and other tricks) to reduce the size of the game tree. When I do finally get it, though, this thing will be awesome!

Information theory demands that, in order to accomplish this you had to make some sort of tradeoff.
Either that or you've found a significant pattern in positions-at-a-distance that has eluded us so far.
Would you care to share your trick?

I think you already know the answer. I created separate indexing functions for each "turn" of the cube.
One indexing function returns the numbers 1 to 36 when fed in any position that is 1 turn away from being solved.
So, all I have to write to disk (and read into memory) is the distance to the solution. One byte.

Next, I wrote an indexing function to convert every cube position that is 2 turns away from a solution into numbers from 1 to 1026.
Again, I write the distance to the solution that many bytes into the file, and read that far into the RAM buffer.

3 turns = 28,836 positions, 4 turns = 810,891 ... 7 turns = 18,032,462,352.

It is tricky and can return ambiguous data if not called in the proper hierarchy, otherwise I would not need a program to solve the cube, the indexing function would know the answer.
The current techniques also breakdown for > 7 turns. I just don't understand enough about the cube yet. This will come with time and experience.

Is your hash table exact (that is, given a position, I can get a definitive answer in constant time that
tells me the distance of the position if the distance is <= n, or tells me definitively that the distance is
> n), and works for all positions?

Every position that is hit in the database has been solved optimally through brute force using my huge, bloated game tree. I posted all 16 solutions for the 1-unsolved-center vs. 1-unsolved-center for U and F in an earlier post, and the consensus was that these were all optimal 8-ply solutions. So, when I encounter a leaf node that has a known distance-from-solved, I know from that point forward there is a solution in "depth + database solve length" or better. The "or better" depends on whether a faster solution exists outside of the pre-solved database, or if a quicker solution can be encountered in the database with additional searching.

Once there is 2 consecutive iterative depths of saturation, meaning all pre-computed solutions have been encountered and there has not been a decrease in the solution length, the position has been solved and no additional nominal depth will change that.

Would you care to share your trick?

Nobody really has seemed too interested to post examples of that which will help me, though I have offered just about everything I have. Remember my project is only a couple of weeks old, and clearly in the basement as far as solvers go. I have made progress though.

Would you be willing to take a look at the code we used to prove "20"? It's on

http://cube20.org/src/

Maybe you can come up with some good ideas on how to speed it up even further? I'm always
looking for new magic.

Also, you keep mentioning this "fast hardware" you have access to. Can you elaborate? What
processor, what motherboard, etc.? I'm always interested in getting the fastest hardware I can
for this sort of thing.

I finally had time to look around and I saw the search for the 3x3x3 positions of distance 20. Now that I find interesting :)

By the way, one of our 16-core servers is finishing up a calculation either on the 14th or the 15th. As far as I can tell, it's coming back into our office with "nothing to do."

If this is the case, I can set you up with a logon id if you want to run any calculations. I think it is 16 cores x 3.1 GHz with a turboboost @ 3.4 GHz. Let me know if you are interested.
 
Last edited by a moderator:
Wow, very quick work, Bruce! Thank you very much. If I can get a couple of
smaller things I'm working on done I hope to verify these numbers.

So the distance isn't as high as I was hoping. The tables are pretty small, and
the pruning table can be applied many times to a given position, but the distance
just isn't very high. Indeed, in the block turn metric it's almost depressing how
low it is. I guess that's just the high-ply factor at work.

If your code is general enough it might be illuminating to try it with some scattered
cubies (I expect the average distance to fall somewhat), and/or perhaps with
edges-only or centers-only up to some reasonable count of cubies. My earliest
explorations of computer cubing were just such explorations on the 3x3x3.

Yes, the distance distribution was rather disappointing. It's a little bit better than 2 opposite composite centers (8 pieces). I've also redone the opposite centers table so it's with respect to a corner piece. That distance distribution is still not quite as good as for the case of two corners and two edge pieces in between with one adjacent composite center.

Well, my code isn't quite general to do any case, but it shouldn't be too much work to adapt it to different cases. I am thinking of trying the 3x3x1 block case, but first I'll probably try a tripod of one corner (reference piece) and six edge pieces. Changing the specific choices among each piece type keeping the count of each piece type the same should be easier to do. But I probably won't be experimenting with scattered arrangements of pieces within the next week.

I am not totally confident in my results so an independent confirmation would be good. :)

EDIT (appending):
I've now completed the analysis for the tripod with 1 corner and 6 edge pieces. It's slightly better (for pruning) than the configuration of two corners, two edges, and four center pieces I analyzed earlier.
Code:
Single slice turn metric:
dist  0: count =          1 total          1
dist  1: count =         27 total         28
dist  2: count =        456 total        484
dist  3: count =       6186 total       6670   0.006 %
dist  4: count =      71460 total      78130   0.07 %
dist  5: count =     690093 total     768223   0.71 %
dist  6: count =    5215743 total    5983966   5.38 %
dist  7: count =   26355000 total   32338966  27.20 %
dist  8: count =   54426898 total   86765864  56.16 %
dist  9: count =   10142500 total   96908364  10.47 %
dist 10: count =        756 total   96909120

Block turn metric:
dist  0: count =          1 total          1
dist  1: count =         27 total         28
dist  2: count =        576 total        604
dist  3: count =       9462 total      10066   0.01 %
dist  4: count =     128744 total     138810   0.13 %
dist  5: count =    1426072 total    1564882   1.47 %
dist  6: count =   11002582 total   12567464  11.35 %
dist  7: count =   44731304 total   57298768  46.16 %
dist  8: count =   39121319 total   96420087  40.37 %
dist  9: count =     489031 total   96909118   0.50 %
dist 10: count =          2 total   96909120

For two opposite composite centers with respect to a corner that I did earlier, the distance distribution is:

Code:
Single slice turn metric:
dist  0: count =          1 total          1
dist  1: count =         17 total         18
dist  2: count =        236 total        254
dist  3: count =       4586 total       4840   0.009 %
dist  4: count =      71802 total      76642   0.14 %
dist  5: count =     860860 total     937502   1.67 %
dist  6: count =    7255348 total    8192850  14.09 %
dist  7: count =   27562586 total   35755436  53.54 %
dist  8: count =   15669580 total   51425016  30.44 %
dist  9: count =      57954 total   51482970   0.11 %

Block turn metric:
Performing misc. initializations...
dist  0: count =          1 total          1
dist  1: count =         17 total         18
dist  2: count =        332 total        350
dist  3: count =       7818 total       8168   0.02 %
dist  4: count =     152698 total     160866   0.30 %
dist  5: count =    2321546 total    2482412   4.51 %
dist  6: count =   19341255 total   21823667  37.57 %
dist  7: count =   29031796 total   50855463  56.39 %
dist  8: count =     627507 total   51482970   1.22 %
dist  9: count =          0 total   51482970
 
Last edited:
I am not totally confident in my results so an independent confirmation would be good. :)

Speaking of independent confirmation... I am giving the corner pruning test a try.

The first step was to modify the move generator and turn it in to a 3x3x3 move generator avoiding slice turns. Easy enough.
The second step was to see if I am capturing all of the 8! corner permutations properly, which is where I am at now.

corner_prune_test.jpg


I am not sure if I am doing this correctly, so if anyone could advise, I would appreciate it.

It looks like 6 turns is all that are needed to place the 8 corners at every possible position, if you disregard the orientations.

Does this data match what you corner-pruner-dudes have done already?

If so, I am going to try and implement the corner orientation indexer, then combine the two and hopefully come up with 88,179,840 corner positions with turns-from-solved info for each.

Code:
  Node 0 has corner permutation # 0 @ depth 0 after --- 1 found, 40319 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 1 has corner permutation # 79 @ depth 1 after  U. 2 found, 40318 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |XXXX|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|&&&&|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |^^^^|^^^^|^^^^|^^^^|   |OOOO|OOOO|OOOO|OOOO|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 2 has corner permutation # 58 @ depth 1 after  U'. 3 found, 40317 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |^^^^|^^^^|^^^^|^^^^|   |OOOO|OOOO|OOOO|OOOO|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |XXXX|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|&&&&|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 3 has corner permutation # 107 @ depth 1 after  U2. 4 found, 40316 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------

...

  Node 5,344,095 has corner permutation # 17569 @ depth 6 after  F R D2 F' R' B2. 40317 found, 3 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|XXXX|XXXX|&&&&|   |XXXX|~~~~|~~~~|OOOO|   |####|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|^^^^|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|^^^^|
---------------------   ---------------------   ---------------------
|####|XXXX|XXXX|^^^^|   |OOOO|OOOO|OOOO|^^^^|   |~~~~|~~~~|~~~~|^^^^|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |~~~~|OOOO|OOOO|XXXX|   |&&&&|^^^^|^^^^|OOOO|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|&&&&|   |&&&&|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|&&&&|   |&&&&|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|OOOO|####|####|####|   |&&&&|&&&&|&&&&|XXXX|   |~~~~|XXXX|XXXX|^^^^|
---------------------   ---------------------   ---------------------



  Node 5,357,010 has corner permutation # 22427 @ depth 6 after  F R F2 U' B' L2. 40318 found, 2 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|OOOO|^^^^|^^^^|^^^^|   |####|^^^^|^^^^|XXXX|   |~~~~|OOOO|OOOO|OOOO|
---------------------   ---------------------   ---------------------
|~~~~|####|####|XXXX|   |&&&&|OOOO|OOOO|OOOO|   |~~~~|XXXX|XXXX|OOOO|
---------------------   ---------------------   ---------------------
|~~~~|####|####|XXXX|   |&&&&|OOOO|OOOO|OOOO|   |~~~~|XXXX|XXXX|OOOO|
---------------------   ---------------------   ---------------------
|XXXX|####|####|&&&&|   |&&&&|OOOO|OOOO|OOOO|   |~~~~|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|^^^^|^^^^|^^^^|^^^^|   |####|&&&&|&&&&|XXXX|   |####|^^^^|^^^^|&&&&|
---------------------   ---------------------   ---------------------
|####|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|~~~~|   |XXXX|^^^^|^^^^|~~~~|
---------------------   ---------------------   ---------------------
|####|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|~~~~|   |XXXX|^^^^|^^^^|~~~~|
---------------------   ---------------------   ---------------------
|####|XXXX|XXXX|OOOO|   |~~~~|####|####|^^^^|   |&&&&|&&&&|&&&&|~~~~|
---------------------   ---------------------   ---------------------



  Node 5,403,664 has corner permutation # 17999 @ depth 6 after  F R2 U B2 R' D'. 40319 found, 1 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|^^^^|~~~~|~~~~|~~~~|   |XXXX|XXXX|XXXX|~~~~|   |^^^^|^^^^|^^^^|OOOO|
---------------------   ---------------------   ---------------------
|^^^^|####|####|&&&&|   |OOOO|OOOO|OOOO|####|   |&&&&|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|^^^^|####|####|&&&&|   |OOOO|OOOO|OOOO|####|   |&&&&|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |OOOO|XXXX|XXXX|XXXX|   |####|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|####|&&&&|&&&&|&&&&|   |^^^^|&&&&|&&&&|OOOO|   |####|OOOO|OOOO|&&&&|
---------------------   ---------------------   ---------------------
|XXXX|~~~~|~~~~|####|   |####|&&&&|&&&&|OOOO|   |####|^^^^|^^^^|~~~~|
---------------------   ---------------------   ---------------------
|XXXX|~~~~|~~~~|####|   |####|&&&&|&&&&|OOOO|   |####|^^^^|^^^^|~~~~|
---------------------   ---------------------   ---------------------
|XXXX|~~~~|~~~~|####|   |&&&&|^^^^|^^^^|~~~~|   |OOOO|OOOO|OOOO|XXXX|
---------------------   ---------------------   ---------------------



  Node 5,506,295 has corner permutation # 17892 @ depth 6 after  F L2 D B2 L' D. 40320 found, 0 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|~~~~|   |^^^^|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|&&&&|
---------------------   ---------------------   ---------------------
|&&&&|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|~~~~|
---------------------   ---------------------   ---------------------
|&&&&|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|~~~~|
---------------------   ---------------------   ---------------------
|~~~~|^^^^|^^^^|^^^^|   |OOOO|XXXX|XXXX|XXXX|   |####|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|####|&&&&|&&&&|&&&&|   |XXXX|XXXX|XXXX|~~~~|   |^^^^|^^^^|^^^^|OOOO|
---------------------   ---------------------   ---------------------
|####|~~~~|~~~~|####|   |OOOO|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|&&&&|
---------------------   ---------------------   ---------------------
|####|~~~~|~~~~|####|   |OOOO|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|&&&&|
---------------------   ---------------------   ---------------------
|XXXX|XXXX|XXXX|####|   |&&&&|OOOO|OOOO|~~~~|   |OOOO|&&&&|&&&&|XXXX|
---------------------   ---------------------   ---------------------
 
I don't have the actual numbers handy at the moment but they look correct. Once you get the
orientations in, those numbers are all over so it will be easier to verify them. Looks like good
progress!
 
I am not sure if I am doing this correctly, so if anyone could advise, I would appreciate it.

It looks like 6 turns is all that are needed to place the 8 corners at every possible position, if you disregard the orientations.

Does this data match what you corner-pruner-dudes have done already?

Using GAP, I get 7 moves needed.

Code:
[noparse]
gap> BFS := function (G, Lgoal, Lmovs)
>   local Lrem, Lcur, Lprev, d, g, Gx, Lout;
>   Lout := [Size (Lgoal)];
>   #Lg := AsSet (Lgoal);
>   Gx := Group (Lmovs);
>   if not (Gx = G) then
>     return [];
>   fi;
>   for g in Lgoal do
>     if not g in G then
>       return [];
>     fi;
>   od;
>   Lrem := ShallowCopy (AsList (G));
>   Lprev := ShallowCopy (Lgoal);
>   Lcur := [];
>   SubtractSet (Lrem, Lgoal);
>   d := 1;
>   while Size (Lrem) > 0 do
>     Lcur := BFSgen (d, Lprev, Lrem, Lmovs);
>     Add (Lout, Size (Lcur));
>     d := d + 1;
>     SubtractSet (Lrem, Lcur);
>     Lprev := Lcur;
>     Lcur := [];
>   od;
>   return Lout;
> end;
function( G, Lgoal, Lmovs ) ... end
gap> 
gap> U := (1,4,3,2);
(1,4,3,2)
gap> D := (5,6,7,8);
(5,6,7,8)
gap> L := (1,5,8,4);
(1,5,8,4)
gap> R := (2,3,7,6);
(2,3,7,6)
gap> F := (1,2,6,5);
(1,2,6,5)
gap> B := (3,4,8,7);
(3,4,8,7)
gap> Gcp := Group (U, D, L, R, F, B);
Group([ (1,4,3,2), (5,6,7,8), (1,5,8,4), (2,3,7,6), (1,2,6,5), (3,4,8,7) ])
gap> Size (Gcp); 
40320
gap> U2 := U^2;
(1,3)(2,4)
gap> U3 := U^3;
(1,2,3,4)
gap> D2 := D^2;
(5,7)(6,8)
gap> D3 := D^3;
(5,8,7,6)
gap> L2 := L^2;
(1,8)(4,5)
gap> L3 := L^3;
(1,4,8,5)
gap> R2 := R^2;
(2,7)(3,6)
gap> R3 := R^3;
(2,6,7,3)
gap> F2 := F^2;
(1,6)(2,5)
gap> F3 := F^3;
(1,5,6,2)
gap> B2 := B^2;
(3,8)(4,7)
gap> B3 := B^3;
(3,7,8,4)
gap> Lm := [ U,U2,U3,D,D2,D3,L,L2,L3,R,R2,R3,F,F2,F3,B,B2,B3 ];
[ (1,4,3,2), (1,3)(2,4), (1,2,3,4), (5,6,7,8), (5,7)(6,8), (5,8,7,6), 
  (1,5,8,4), (1,8)(4,5), (1,4,8,5), (2,3,7,6), (2,7)(3,6), (2,6,7,3), 
  (1,2,6,5), (1,6)(2,5), (1,5,6,2), (3,4,8,7), (3,8)(4,7), (3,7,8,4) ]
gap> BFS (Gcp, [ () ], Lm );
[ 1, 18, 243, 2646, 12516, 17624, 7080, 192 ]
[/noparse]
 
Using GAP, I get 7 moves needed.

Hmmm. One of us must be incorrect.

I modified the verbose output to toss out only the indexing function value returned.

Code:
0
79
58
107
10344
7224
21744
25349
1603
8079
3680
6248
12512
284
507
647
8046
15294
27630

....


22941
17396
17462
34452
22638
17826
17695
17920
22750
22723
22446
22624
17378
29396
17569
22427
17999
17892

Next, I imported it into Excel and sorted the data. All of the indices are accounted for, 0...40319, and there are no duplicates according to the "Remove Duplicates" item on the Data Ribbon of Excel.

I can double check my code again. But I somehow think 6 is the answer.

Here are the 1st three and last three indices in my program.

Code:
Node 1 has corner permutation # 0 @ depth 0 after  --- 1 found, 40319 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------


************************************************************************************************
************************************************************************************************


Node 16,169 has corner permutation # 1 @ depth 4 after  R F B L. 11195 found, 29125 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|&&&&|XXXX|XXXX|XXXX|   |XXXX|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|&&&&|
---------------------   ---------------------   ---------------------
|&&&&|####|####|OOOO|   |####|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|~~~~|
---------------------   ---------------------   ---------------------
|&&&&|####|####|OOOO|   |####|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|~~~~|
---------------------   ---------------------   ---------------------
|####|^^^^|^^^^|^^^^|   |^^^^|~~~~|~~~~|~~~~|   |OOOO|XXXX|XXXX|~~~~|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|OOOO|XXXX|XXXX|XXXX|   |####|####|####|^^^^|   |####|####|####|OOOO|
---------------------   ---------------------   ---------------------
|OOOO|~~~~|~~~~|&&&&|   |&&&&|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|OOOO|~~~~|~~~~|&&&&|   |&&&&|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|^^^^|^^^^|^^^^|   |&&&&|&&&&|&&&&|XXXX|   |&&&&|~~~~|~~~~|~~~~|
---------------------   ---------------------   ---------------------


************************************************************************************************
************************************************************************************************


Node 467,027 has corner permutation # 2 @ depth 5 after  F2 D F' R' F'. 38200 found, 2120 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|^^^^|   |####|####|####|OOOO|   |XXXX|XXXX|XXXX|OOOO|
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|OOOO|
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|OOOO|
---------------------   ---------------------   ---------------------
|XXXX|XXXX|XXXX|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|~~~~|~~~~|~~~~|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|&&&&|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|^^^^|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|^^^^|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|^^^^|   |&&&&|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|^^^^|
---------------------   ---------------------   ---------------------


************************************************************************************************
************************************************************************************************


Node 1,335,579 has corner permutation # 40317 @ depth 6 after  U2 B' U2 B2 D' L2. 40079 found, 241 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|~~~~|XXXX|XXXX|XXXX|   |^^^^|&&&&|&&&&|&&&&|   |~~~~|XXXX|XXXX|~~~~|
---------------------   ---------------------   ---------------------
|~~~~|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|~~~~|
---------------------   ---------------------   ---------------------
|~~~~|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|~~~~|
---------------------   ---------------------   ---------------------
|~~~~|^^^^|^^^^|^^^^|   |OOOO|XXXX|XXXX|^^^^|   |&&&&|&&&&|&&&&|&&&&|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|^^^^|~~~~|~~~~|####|   |&&&&|&&&&|&&&&|XXXX|   |OOOO|OOOO|OOOO|OOOO|
---------------------   ---------------------   ---------------------
|####|~~~~|~~~~|####|   |&&&&|&&&&|&&&&|OOOO|   |^^^^|^^^^|^^^^|####|
---------------------   ---------------------   ---------------------
|####|~~~~|~~~~|####|   |&&&&|&&&&|&&&&|OOOO|   |^^^^|^^^^|^^^^|####|
---------------------   ---------------------   ---------------------
|XXXX|~~~~|~~~~|####|   |XXXX|^^^^|^^^^|OOOO|   |####|^^^^|^^^^|####|
---------------------   ---------------------   ---------------------


************************************************************************************************
************************************************************************************************


Node 90,284 has corner permutation # 40318 @ depth 5 after  U2 L2 D B2 R'. 30341 found, 9979 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |&&&&|&&&&|&&&&|~~~~|   |&&&&|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|####|####|OOOO|   |&&&&|OOOO|OOOO|####|   |^^^^|XXXX|XXXX|OOOO|
---------------------   ---------------------   ---------------------
|~~~~|####|####|OOOO|   |&&&&|OOOO|OOOO|####|   |^^^^|XXXX|XXXX|OOOO|
---------------------   ---------------------   ---------------------
|~~~~|####|####|XXXX|   |XXXX|XXXX|XXXX|####|   |^^^^|XXXX|XXXX|OOOO|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |~~~~|XXXX|XXXX|XXXX|   |OOOO|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |XXXX|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |XXXX|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|####|####|####|XXXX|   |####|OOOO|OOOO|OOOO|   |^^^^|&&&&|&&&&|&&&&|


************************************************************************************************
************************************************************************************************


Node 78,234 has corner permutation # 40319 @ depth 5 after  U2 R L' U2 F2. 29412 found, 10908 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|OOOO|####|####|OOOO|   |~~~~|OOOO|OOOO|~~~~|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|OOOO|####|####|OOOO|   |~~~~|OOOO|OOOO|~~~~|   |^^^^|XXXX|XXXX|^^^^|
---------------------   ---------------------   ---------------------
|OOOO|####|####|OOOO|   |~~~~|OOOO|OOOO|~~~~|   |^^^^|XXXX|XXXX|^^^^|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|&&&&|   |####|OOOO|OOOO|####|   |^^^^|XXXX|XXXX|^^^^|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|&&&&|####|####|&&&&|   |~~~~|&&&&|&&&&|~~~~|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|####|   |XXXX|^^^^|^^^^|XXXX|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|####|   |XXXX|^^^^|^^^^|XXXX|
---------------------   ---------------------   ---------------------
|OOOO|~~~~|~~~~|OOOO|   |####|&&&&|&&&&|####|   |XXXX|^^^^|^^^^|XXXX|
---------------------   ---------------------   ---------------------

A link to all of the indices in a text file. Kinda big. About 60 MB.
lightningcloudcomputing.com/40320_corners.txt
 
Last edited:
Ahh, don't question Bruce. I don't think he's ever been wrong.

This is what I get. Bruce is correct.

0 1
1 18
2 243
3 2646
4 12516
5 17624
6 7080
7 192
 
It's normally not too hard to debug this sort of thing. Just do random moves, and
ensure that the distance doesn't change by more than one on each move. If that
doesn't find the problem, write a quick IDA* for corners using your table and try
it for random positions, and then separately, go random sequence -> position ->
solution and the solution had better be the same length or shorter.

See my phase1prune.pdf or phase2prune.pdf for sample code that I used to
generate and test my Kociemba-solver pruning tables if this isn't clear enough.
 
Ahh, don't question Bruce. I don't think he's ever been wrong.

I just said one of us must be incorrect. And I was right :)

Don't know how I messed up and got all of the 8! permutations in fewer moves, but it's good that we compared data. Switched over to my array move generator from the bitboard move generator, and I got identical results (to my bitboard code, still different than the both of you, ugh!)

Code:
#define CONSTANT_TOP 1
#define CONSTANT_FRONT 3
#define CONSTANT_RIGHT 5
#define CONSTANT_BOTTOM 7
#define CONSTANT_BACK 11
#define CONSTANT_LEFT 13

#define TFR_NATIVE_CORNER ((CONSTANT_TOP) * (CONSTANT_FRONT) * (CONSTANT_RIGHT))    // 15
#define TFL_NATIVE_CORNER ((CONSTANT_TOP) * (CONSTANT_FRONT) * (CONSTANT_LEFT))     // 39
#define TKR_NATIVE_CORNER ((CONSTANT_TOP) * (CONSTANT_BACK)  * (CONSTANT_RIGHT))    // 55
#define TKL_NATIVE_CORNER ((CONSTANT_TOP) * (CONSTANT_BACK)  * (CONSTANT_LEFT))     // 143

#define BFR_NATIVE_CORNER ((CONSTANT_BOTTOM) * (CONSTANT_FRONT) * (CONSTANT_RIGHT)) // 105
#define BFL_NATIVE_CORNER ((CONSTANT_BOTTOM) * (CONSTANT_FRONT) * (CONSTANT_LEFT))  // 273
#define BKR_NATIVE_CORNER ((CONSTANT_BOTTOM) * (CONSTANT_BACK)  * (CONSTANT_RIGHT)) // 385
#define BKL_NATIVE_CORNER ((CONSTANT_BOTTOM) * (CONSTANT_BACK)  * (CONSTANT_LEFT))  // 1001

unsigned short GLOBAL_FACTORIAL[8] = {1, 1, 2, 6, 24, 120, 720, 5040};

unsigned long get_corner_permutation(CUBE_4x4_ARRANGEMENT your_cube)
{
	unsigned short tfr[3], tfl[3], tkr[3], tkl[3], bfr[3], bfl[3], bkr[3], bkl[3];
	unsigned short corner_place_value[8], i, j, count;
	unsigned long corner_permutation_index;

	tkl[0] = your_cube.cube_top[1-1];
	tkr[0] = your_cube.cube_top[4-1];
	tfl[0] = your_cube.cube_top[13-1];
	tfr[0] = your_cube.cube_top[16-1];

	tkl[1] = your_cube.cube_back[4-1];
	tkr[1] = your_cube.cube_back[1-1];
	tfl[1] = your_cube.cube_front[1-1];
	tfr[1] = your_cube.cube_front[4-1];

	tkl[2] = your_cube.cube_left[1-1];
	tkr[2] = your_cube.cube_right[4-1];
	tfl[2] = your_cube.cube_left[4-1];
	tfr[2] = your_cube.cube_right[1-1];

	bkl[0] = your_cube.cube_bottom[13-1];
	bkr[0] = your_cube.cube_bottom[16-1];
	bfl[0] = your_cube.cube_bottom[1-1];
	bfr[0] = your_cube.cube_bottom[4-1];

	bkl[1] = your_cube.cube_back[13-1];
	bkr[1] = your_cube.cube_back[16-1];
	bfl[1] = your_cube.cube_front[13-1];
	bfr[1] = your_cube.cube_front[16-1];

	bkl[2] = your_cube.cube_left[13-1];
	bkr[2] = your_cube.cube_right[16-1];
	bfl[2] = your_cube.cube_left[16-1];
	bfr[2] = your_cube.cube_right[13-1];

	corner_place_value[7] = tfr[0] * tfr[1] * tfr[2];
	corner_place_value[6] = tfl[0] * tfl[1] * tfl[2];
	corner_place_value[5] = tkr[0] * tkr[1] * tkr[2];
	corner_place_value[4] = bfr[0] * bfr[1] * bfr[2];
	corner_place_value[3] = tkl[0] * tkl[1] * tkl[2];
	corner_place_value[2] = bfl[0] * bfl[1] * bfl[2];
	corner_place_value[1] = bkr[0] * bkr[1] * bkr[2];
	corner_place_value[0] = bkl[0] * bkl[1] * bkl[2];

	/*************************************************/
	/*                                               */
	/* TFR   TFL   TKR   BFR   TKL   BFL   BKR   BKL */
	/*                                               */
	/*   0    1!    2!    3!    4!    5!    6!    7! */
	/*                                               */
	/*************************************************/

	corner_permutation_index = 0;
	for(i = 0; i <= 6; i++)
	{	
		count = 0;
		for(j = i+1; j <= 7; j++)
		{
			if(corner_place_value[j] > corner_place_value[i]) count++;
		}
		corner_permutation_index += (GLOBAL_FACTORIAL[7 - i] * count);
	}

	if(corner_permutation_index >= 40320)
	{
		printf("  ** Indexing Error. corner_permutation_index == %u and should be < 40320. **\n", corner_permutation_index);
		return 0;
	}
	return corner_permutation_index;
}



***** UPDATE *****

Bug found! And look how simple it was!

Code:
	bkl[1] = your_cube.cube_back[13-1];
	bkr[1] = your_cube.cube_back[16-1];

The above code references what you guys call DBL and DBR, bottom-back-left and bottom-back-right in my code, where I use k for back and b for bottom.

Well, I encoded those two entries improperly! The correct code is...

Code:
	bkl[1] = your_cube.cube_back[16-1];
	bkr[1] = your_cube.cube_back[13-1];

This has my cumulative numbers match your numbers.

corner_permutations.jpg


By the way, my "19 indices found" after depth 1 shows the cumulative number, since I suppress the output at depth == 0. Only 18 nodes are generated at depth == 1, so it might look odd to have found 19 indices.

Very important lesson == share data and compare!

And now, on to the orientations. I thought this was going to be simple, but somehow, I suspect these numbers are not right:

corner_orientations.jpg


How could there only be 15 total orientations found after depth == 1?

I would think every move would produce an "orientation" so something must be amiss, again!

[edit] Unless U, U' and U2 all have the same orientation. Hmmm. I may have answered my own question.
 
Last edited:
[edit] Unless U, U' and U2 all have the same orientation. Hmmm. I may have answered my own question.
A problem with orientation is that if a cubie is in a different location from its "home" position, its orientation is unclear without having some convention by which you clarify what you mean by orientation. Almost always, we use the convention of treating the U or D sticker of a corner cubie as a reference sticker. We consider the cubie oriented correctly if that sticker is on the U or D face of the puzzle. I hope that is the convention you are using.

With this convention, you should only find 4 new orientation configurations at one move away from solved. One comes from F or F'. Another from R or R'. Another from B or B'. And the last one from L or L'. Any U-layer or D-layer turn of the solved cube should not affect orientation (all cubies remain oriented), and the same is true for any half-turns of the other faces.
 
Last edited:
A problem with orientation is that if a cubie is in a different location from its "home" position, its orientation is unclear without having some convention by which you clarify what you mean by orientation. Almost always, we use the convention of treating the U or D sticker of a corner cubie as a reference sticker. We consider the cubie oriented correctly if that sticker is on the U or D face of the puzzle. I hope that is the convention you are using.

I puzzled over this very same thing. I tried to invent a convention that would be fast at runtime and easy to code.

I came up with something simple, but possibly incorrect:

Code:
	corner_place_value[6] += ((ufr[0] > ufr[1]) || (ufr[0] > ufr[2]));
	corner_place_value[6] += ((ufr[0] > ufr[1]) && (ufr[0] > ufr[2]));

I look at UFR for the "sticker" value, as you say. Dimension [0] is the first axis, dimension [1] is the second axis, and dimension [2] is the third axis.
ufr[0] would be the u sticker value. ufr[1] is the f sticker value. ufr[2] is the r sticker value.

I initialize the corner_place_value[n] values all to 0 for n = 0...6.

Ultimately, corner_place_value[n] will equal 0, 1, or 2 based on the "orientation."

My assignment of the value is based on "king of the hill" to see which dimension is the largest of the 3 stickers.

if U > F > R, the value will be 2.
if U > F but U < R, or U > R but U < F, the value will be 1.
if U < F and U < R, the value will be 0.

Then you apply a power of 3 series to each of the place value numbers.

Code:
	corner_place_value[6] += ((tfr[0] > tfr[1]) || (tfr[0] > tfr[2]));
	corner_place_value[6] += ((tfr[0] > tfr[1]) && (tfr[0] > tfr[2]));
	
	corner_place_value[5] += ((tfl[0] > tfl[1]) || (tfl[0] > tfl[2]));
	corner_place_value[5] += ((tfl[0] > tfl[1]) && (tfl[0] > tfl[2]));

	corner_place_value[4] += ((tkr[0] > tkr[1]) || (tkr[0] > tfr[2]));
	corner_place_value[4] += ((tkr[0] > tkr[1]) && (tkr[0] > tfr[2]));

	corner_place_value[3] += ((bfr[0] > bfr[1]) || (bfr[0] > bfr[2]));
	corner_place_value[3] += ((bfr[0] > bfr[1]) && (bfr[0] > bfr[2]));

	corner_place_value[2] += ((tkl[0] > tkl[1]) || (tkl[0] > tkl[2]));
	corner_place_value[2] += ((tkl[0] > tkl[1]) && (tkl[0] > tkl[2]));

	corner_place_value[1] += ((bfl[0] > bfl[1]) || (bfl[0] > bfl[2]));
	corner_place_value[1] += ((bfl[0] > bfl[1]) && (bfl[0] > bfl[2]));

	corner_place_value[0] += ((bkr[0] > bkr[1]) || (bkr[0] > bkr[2]));
	corner_place_value[0] += ((bkr[0] > bkr[1]) && (bkr[0] > bkr[2]));

	corner_orientation_index = 0;

	corner_orientation_index += (GLOBAL_POWER_OF_3[0] * corner_place_value[0]);
	corner_orientation_index += (GLOBAL_POWER_OF_3[1] * corner_place_value[1]);
	corner_orientation_index += (GLOBAL_POWER_OF_3[2] * corner_place_value[2]);
	corner_orientation_index += (GLOBAL_POWER_OF_3[3] * corner_place_value[3]);
	corner_orientation_index += (GLOBAL_POWER_OF_3[4] * corner_place_value[4]);
	corner_orientation_index += (GLOBAL_POWER_OF_3[5] * corner_place_value[5]);
	corner_orientation_index += (GLOBAL_POWER_OF_3[6] * corner_place_value[6]);

It's pretty straightforward, again, if my orientation assumption is correct. It does generate 2187 unique orientations, but based on what I saw with my last code also generating the correct permutation numbers but being an incorrect implementation, I am not sure if this is a correct way to proceed.

Here is my data for the unturned cube and the first depth. It does list D, D' and D2, only because in my "sticker" assignments, L == 6 so L will always be > D.

Code:
  Node 1 has corner orientation # 58 @ depth 0 after --- 1 found, 2186 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 4 has corner orientation # 33 @ depth 1 after  D'. 2 found, 2185 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |XXXX|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|&&&&|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |^^^^|^^^^|^^^^|^^^^|   |OOOO|OOOO|OOOO|OOOO|
---------------------   ---------------------   ---------------------



  Node 5 has corner orientation # 29 @ depth 1 after  D. 3 found, 2184 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |^^^^|^^^^|^^^^|^^^^|   |OOOO|OOOO|OOOO|OOOO|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |XXXX|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|&&&&|
---------------------   ---------------------   ---------------------



  Node 6 has corner orientation # 4 @ depth 1 after  D2. 4 found, 2183 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------



  Node 7 has corner orientation # 139 @ depth 1 after  R. 5 found, 2182 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|OOOO|   |OOOO|OOOO|OOOO|~~~~|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|OOOO|   |OOOO|OOOO|OOOO|~~~~|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|OOOO|   |OOOO|OOOO|OOOO|~~~~|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|OOOO|   |OOOO|OOOO|OOOO|~~~~|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 8 has corner orientation # 1650 @ depth 1 after  R'. 6 found, 2181 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |OOOO|OOOO|OOOO|####|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |OOOO|OOOO|OOOO|####|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |OOOO|OOOO|OOOO|####|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |OOOO|OOOO|OOOO|####|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 9 has corner orientation # 894 @ depth 1 after  R2. 7 found, 2180 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|~~~~|   |OOOO|OOOO|OOOO|&&&&|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|~~~~|   |OOOO|OOOO|OOOO|&&&&|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|~~~~|   |OOOO|OOOO|OOOO|&&&&|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|~~~~|   |OOOO|OOOO|OOOO|&&&&|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|####|   |OOOO|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|####|   |OOOO|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|####|   |OOOO|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|####|   |OOOO|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 10 has corner orientation # 68 @ depth 1 after  L'. 8 found, 2179 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|OOOO|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|OOOO|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|OOOO|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|OOOO|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|####|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|####|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|####|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|####|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 11 has corner orientation # 310 @ depth 1 after  L. 9 found, 2178 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|&&&&|####|####|####|   |####|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|&&&&|####|####|####|   |####|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|&&&&|####|####|####|   |####|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|&&&&|####|####|####|   |####|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|OOOO|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|OOOO|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|OOOO|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|OOOO|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 12 has corner orientation # 65 @ depth 1 after  L2. 10 found, 2177 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|~~~~|####|####|####|   |&&&&|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|~~~~|####|####|####|   |&&&&|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|~~~~|####|####|####|   |&&&&|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|~~~~|####|####|####|   |&&&&|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|####|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|OOOO|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|####|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|OOOO|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|####|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|OOOO|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|####|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|OOOO|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 13 has corner orientation # 2002 @ depth 1 after  F. 11 found, 2176 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|^^^^|^^^^|^^^^|^^^^|   |OOOO|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|XXXX|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|~~~~|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|~~~~|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|~~~~|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|~~~~|
---------------------   ---------------------   ---------------------



  Node 14 has corner orientation # 1276 @ depth 1 after  F'. 12 found, 2175 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |~~~~|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |~~~~|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |~~~~|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|XXXX|XXXX|XXXX|XXXX|   |OOOO|OOOO|OOOO|OOOO|   |~~~~|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|^^^^|^^^^|^^^^|^^^^|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|####|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|####|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|####|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|####|
---------------------   ---------------------   ---------------------



  Node 15 has corner orientation # 1216 @ depth 1 after  F2. 13 found, 2174 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |^^^^|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |^^^^|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |^^^^|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |OOOO|OOOO|OOOO|OOOO|   |^^^^|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|XXXX|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|XXXX|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|XXXX|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|XXXX|
---------------------   ---------------------   ---------------------



  Node 16 has corner orientation # 238 @ depth 1 after  B'. 14 found, 2173 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|^^^^|^^^^|^^^^|^^^^|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|####|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|####|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|####|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|####|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |~~~~|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |~~~~|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |~~~~|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|XXXX|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|&&&&|   |~~~~|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 18 has corner orientation # 147 @ depth 1 after  B2. 15 found, 2172 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|^^^^|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|^^^^|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|^^^^|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|^^^^|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |XXXX|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |XXXX|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |XXXX|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |&&&&|&&&&|&&&&|&&&&|   |XXXX|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
 
Last edited:
If you are going to build a table based upon orientation only, you absolutely need to use an orientation convention that is "consistent" for all 8 corner cubies. For instance, let's say you have a cubie that is correctly oriented at UFR. The move R will move it to BUR. That is the sticker that was on the U face goes to the B (back) face, the sticker on the F face moves to the U face, and the sticker on the R face remains on the R face. Using the convention I mentioned previously, the correctly oriented cubie at UFR becomes twisted clockwise when the move R moves it to BUR. No matter which cubie is at UFR, the move R should have the same effect on the orientation of that piece as it moves to BUR. If it doesn't, the results are basically going to be useless.

So just define orientation in the manner I described in my previous post, or your table will probably be useless.
 
Last edited:
If you are going to build a table based upon orientation only, you absolutely need to use an orientation convention that is "consistent" for all 8 corner cubies.

I have gone back to make the recommended changes. I came up with an even simpler formula which takes one line of code per corner arrangement

Code:
	corner_place_value[6] += ((ufl[0] > ufl[2]) + (ufl[0] > ufl[1]));
	corner_place_value[5] += ((ubr[2] > ubr[1]) + (ubr[0] > ubr[1]));
	corner_place_value[4] += ((dfr[1] > dfr[0]) + (dfr[1] > dfr[2]));
	corner_place_value[3] += ((ubl[0] > ubl[2]) + (ubl[0] > ubl[1]));
	corner_place_value[2] += ((dfl[0] > dfl[2]) + (dfl[1] > dfl[2]));
	corner_place_value[1] += ((dbr[2] > dbr[0]) + (dbr[2] > dbr[1]));
	corner_place_value[0] += ((dbl[0] > dbl[2]) + (dbl[0] > dbl[1]));

This works with the prime values I have for U = 1, F = 3, R = 5, D = 7, B = 11, L = 13.

Whenever both conditions are false, I have a "+= 0" which means the cubie is in its native orientation.
When I get a "+= 1" that means the cubie is rotated 90 degrees clockwise from its normal orientation.
The "+= 2" means it is rotated 90 degrees counterclockwise.

I'm taking the dangerous step of merging this with the permutation code now to generate the index over the entire range of 8! * 3^7 without testing the 3^7 part stand alone. I am too anxious to see what happens :)

Thanks for all of your good advice Bruce. I appreciate it!
 
I have gone back to make the recommended changes. I came up with an even simpler formula which takes one line of code per corner arrangement

Code:
	corner_place_value[6] += ((ufl[0] > ufl[2]) + (ufl[0] > ufl[1]));
	corner_place_value[5] += ((ubr[2] > ubr[1]) + (ubr[0] > ubr[1]));
	corner_place_value[4] += ((dfr[1] > dfr[0]) + (dfr[1] > dfr[2]));
	corner_place_value[3] += ((ubl[0] > ubl[2]) + (ubl[0] > ubl[1]));
	corner_place_value[2] += ((dfl[0] > dfl[2]) + (dfl[1] > dfl[2]));
	corner_place_value[1] += ((dbr[2] > dbr[0]) + (dbr[2] > dbr[1]));
	corner_place_value[0] += ((dbl[0] > dbl[2]) + (dbl[0] > dbl[1]));

This works with the prime values I have for U = 1, F = 3, R = 5, D = 7, B = 11, L = 13.

Whenever both conditions are false, I have a "+= 0" which means the cubie is in its native orientation.
When I get a "+= 1" that means the cubie is rotated 90 degrees clockwise from its normal orientation.
The "+= 2" means it is rotated 90 degrees counterclockwise.

I'm taking the dangerous step of merging this with the permutation code now to generate the index over the entire range of 8! * 3^7 without testing the 3^7 part stand alone. I am too anxious to see what happens :)

Thanks for all of your good advice Bruce. I appreciate it!

If I'm interpreting your code properly, I don't think this implements what I suggested.

Basically there are 8 positions on the puzzle where the corner piecescan be located. I call these positions "cubicles." (We can also talk about edge cubicles and center cubicles, but those aren't relevant to this discussion.) There are 8 corner pieces which can be identified through the colors of their stickers. I call these "cubies." We can refer to the sticker colors as the "U-color," "D=color", "R-color," etc. insteaad of actual colors if we want to label the colors in a general way without regard to the actual color scheme of the puzzle.

Now if we want to determine the orientation of a cubie at a given cubicle, we first look at the sticker that is on the reference facelet of that cubicle, which is the facelet which is either on the U face or the D face. If that sticker color is either the U-color or the D-color we say that cubicle is oriented or has an orientation value of 0. If it is a different color, we don't care what color it is! Instead we look at the next facelet of that cubicle in clockwise order. If that facelet's sticker is the U-color or D-color, we say that the cubicle has clockwise orientation, or an orientation value of 1. If neither of those two facelets had a sticker color of the U- or D-color, then the final facelet must be one of those two colors. (we technically shouldn't have to check it.) In this case we say the cubicle has an orientation value of 2 (rotated counterclockwise).

Again, we only care about U-color and D-color stickers when trying to determine orientation.
 
So after R+, the previous UFR cubie moves to BUR and has an orientation of +1 since the U sticker is 90 clockwise from the F sticker?
We don't care where the F-color sticker is. We don't even care whether or not the cubie at the URB cubicle has an F-color sticker. What we care about is where the U-color or D-color sticker is with respect to the U facelet of the URB cubicle. (The U facelet of the URB cubicle always refers to the sticker position on the U (top) face of the cube. Note cubicles never move, only cubies move.) We may care about the other sticker colors for determining permutation, but not for orientation.
 
We don't care where the F-color sticker is. We don't even care whether or not the cubie at the URB cubicle has an F-color sticker. What we care about is where the U-color or D-color sticker is with respect to the U facelet of the URB cubicle. (The U facelet of the URB cubicle always refers to the sticker position on the U (top) face of the cube. Note cubicles never move, only cubies move.) We may care about the other sticker colors for determining permutation, but not for orientation.

Wow, did I really type BFR? I must have been exhausted :) I swear, that cubicle designation made perfect sense at the time!

I am starting to get the feeling for what it must be like for an astronaut in outerspace. There are only relative motions, no absolutes, and I am having a hard time getting my brain in gear!

OK, so my current level of understand (or misunderstanding) is this:

  1. If there is a U sticker face up on U, we have a 0-orientation for that cubie at that cubicle
  2. If there is a U sticker face up on D (when viewed from D face up as if on top but still a D-cubicle), we have a 0-orientation for that cubie at that cubicle
  3. If there is a D sticker face up on U, we have a 0-orientation for that cubie at that cubicle
  4. If there is a U sticker face up on D (when viewed from D face up as if on top but still a D-cubicle), we have a 0-orientation for that cubie at that cubicle
  5. For any non-0 case, +1 indicates the U or D sticker is 90 degrees clockwise from the 0-orientation
  6. Any other case results in a +2 orientation

As I have no relative info attached to my cubies, I will need to do some recoding to make this work.

UPDATE: Trying this code now:

Code:
#define CONSTANT_TOP 1
#define CONSTANT_FRONT 3
#define CONSTANT_RIGHT 5
#define CONSTANT_BOTTOM 7
#define CONSTANT_BACK 11
#define CONSTANT_LEFT 13

#define UFR_NATIVE_CORNER ((CONSTANT_TOP) * (CONSTANT_FRONT) * (CONSTANT_RIGHT))    // 15
#define UFL_NATIVE_CORNER ((CONSTANT_TOP) * (CONSTANT_FRONT) * (CONSTANT_LEFT))     // 39
#define UBR_NATIVE_CORNER ((CONSTANT_TOP) * (CONSTANT_BACK)  * (CONSTANT_RIGHT))    // 55
#define UBL_NATIVE_CORNER ((CONSTANT_TOP) * (CONSTANT_BACK)  * (CONSTANT_LEFT))     // 143

#define DFR_NATIVE_CORNER ((CONSTANT_BOTTOM) * (CONSTANT_FRONT) * (CONSTANT_RIGHT)) // 105
#define DFL_NATIVE_CORNER ((CONSTANT_BOTTOM) * (CONSTANT_FRONT) * (CONSTANT_LEFT))  // 273
#define DBR_NATIVE_CORNER ((CONSTANT_BOTTOM) * (CONSTANT_BACK)  * (CONSTANT_RIGHT)) // 385
#define DBL_NATIVE_CORNER ((CONSTANT_BOTTOM) * (CONSTANT_BACK)  * (CONSTANT_LEFT))  // 1001

#define GLOBAL_CORNER_ORIENTATION_TOTAL 2187

unsigned short GLOBAL_POWER_OF_3[7] = {1, 3, 9, 27, 81, 243, 729};

unsigned short get_corner_orientation(CUBE_4x4_ARRANGEMENT your_cube)
{
	unsigned short ufr[3], ufl[3], ubr[3], ubl[3], dfr[3], dfl[3], dbr[3], dbl[3];
	unsigned short where_cubie_came_from[7] = {0,0,0,0,0,0,0};
	unsigned short corner_orientation_index = 0;
	unsigned short which_corner, which_U_or_D_cubie, which_orientation, i;

	/*****************************************/
	/* CUBICLE accessing code. Get the cubie */
 	/* at these hard-coded addresses.        */
	/*****************************************/
	ubl[0] = your_cube.cube_top[1-1];
	ubr[0] = your_cube.cube_top[4-1];
	ufl[0] = your_cube.cube_top[13-1];
	ufr[0] = your_cube.cube_top[16-1];

	ubl[1] = your_cube.cube_back[4-1];
	ubr[1] = your_cube.cube_back[1-1];
	ufl[1] = your_cube.cube_front[1-1];
	ufr[1] = your_cube.cube_front[4-1];

	ubl[2] = your_cube.cube_left[1-1];
	ubr[2] = your_cube.cube_right[4-1];
	ufl[2] = your_cube.cube_left[4-1];
	ufr[2] = your_cube.cube_right[1-1];

	dbl[0] = your_cube.cube_bottom[13-1];
	dbr[0] = your_cube.cube_bottom[16-1];
	dfl[0] = your_cube.cube_bottom[1-1];
	dfr[0] = your_cube.cube_bottom[4-1];

	dbl[1] = your_cube.cube_back[16-1];
	dbr[1] = your_cube.cube_back[13-1];
	dfl[1] = your_cube.cube_front[13-1];
	dfr[1] = your_cube.cube_front[16-1];

	dbl[2] = your_cube.cube_left[13-1];
	dbr[2] = your_cube.cube_right[16-1];
	dfl[2] = your_cube.cube_left[16-1];
	dfr[2] = your_cube.cube_right[13-1];

	/***************************************************/
        /* The 6 faces of the cube were given prime number */
	/* constants. Each triple product will be a number */
        /* that is unique, and therefore reveals where it  */
        /* was on the cube originally.                     */
	/***************************************************/
	where_cubie_came_from[7] = ufr[0] * ufr[1] * ufr[2];
	where_cubie_came_from[6] = ufl[0] * ufl[1] * ufl[2];
	where_cubie_came_from[5] = ubr[0] * ubr[1] * ubr[2];
	where_cubie_came_from[4] = dfr[0] * dfr[1] * dfr[2];
	where_cubie_came_from[3] = ubl[0] * ubl[1] * ubl[2];
	where_cubie_came_from[2] = dfl[0] * dfl[1] * dfl[2];
	where_cubie_came_from[1] = dbr[0] * dbr[1] * dbr[2];
	where_cubie_came_from[0] = dbl[0] * dbl[1] * dbl[2];

	corner_orientation_index = 0;

	for(i = 0; i<= 6; i++)
	{
		which_corner = where_cubie_came_from[i];
		which_orientation = 0;

			/*******************************************/
			/*                                         */
			/* Each CUBICLE array is of dimension [3]. */
			/*                                         */
			/* [0] is always from the 1st face of the  */
                        /*     3-letter variable designation.      */
			/*                                         */
			/*     dbr[0] = the cubie sticker on D     */
			/*                                         */
			/* [1] is always from the 2nd face of the  */
                        /*     3-letter variable designation.      */
			/*                                         */
			/*     dbr[1] = the cubie sticker on B     */
			/*                                         */
			/* [2] is always from the 3rd face of the  */
                        /*     3-letter variable designation.      */
			/*                                         */
			/*     dbr[2] = the cubie sticker on R     */
			/*                                         */
			/*******************************************/

			switch(i)
			{
				case 0: which_U_or_D_cubie = dbl[0]; break;
				case 1: which_U_or_D_cubie = dbr[0]; break;
				case 2: which_U_or_D_cubie = dfl[0]; break;
				case 3: which_U_or_D_cubie = ubl[0]; break;
				case 4: which_U_or_D_cubie = dfr[0]; break;
				case 5: which_U_or_D_cubie = ubr[0]; break;
				case 6: which_U_or_D_cubie = ufl[0]; break;
			}

			/*******************************************/
			/*                                         */
			/* If sticker is U or D, orientation = 0   */
                        /*                                         */
			/* If the dimension[1] sticker is face up, */
                        /*                       orientation = 1   */
                        /*                                         */
			/* If the dimension[2] sticker is face up, */
                        /*                       orientation = 2   */
			/*                                         */
			/*******************************************/

			switch(which_corner)
			{
				case UFR_NATIVE_CORNER: break;
				case UFL_NATIVE_CORNER: which_orientation += ((which_U_or_D_cubie == CONSTANT_FRONT) + (2*(which_U_or_D_cubie == CONSTANT_LEFT))); break;
				case UBR_NATIVE_CORNER: which_orientation += ((which_U_or_D_cubie == CONSTANT_BACK)  + (2*(which_U_or_D_cubie == CONSTANT_RIGHT))); break;
				case UBL_NATIVE_CORNER: which_orientation += ((which_U_or_D_cubie == CONSTANT_BACK)  + (2*(which_U_or_D_cubie == CONSTANT_LEFT))); break;
				case DFR_NATIVE_CORNER: which_orientation += ((which_U_or_D_cubie == CONSTANT_FRONT) + (2*(which_U_or_D_cubie == CONSTANT_RIGHT))); break;
				case DFL_NATIVE_CORNER: which_orientation += ((which_U_or_D_cubie == CONSTANT_FRONT) + (2*(which_U_or_D_cubie == CONSTANT_LEFT))); break;
				case DBR_NATIVE_CORNER: which_orientation += ((which_U_or_D_cubie == CONSTANT_BACK)  + (2*(which_U_or_D_cubie == CONSTANT_RIGHT))); break;
				case DBL_NATIVE_CORNER: which_orientation += ((which_U_or_D_cubie == CONSTANT_BACK)  + (2*(which_U_or_D_cubie == CONSTANT_LEFT))); break;
				default: printf("  ** WTF Error. which_corner == %d and doesn't FRIGGIN exist! **\n", which_corner);break;
			}

		corner_orientation_index += (GLOBAL_POWER_OF_3[i] * which_orientation);
	}
	
	if(corner_orientation_index > GLOBAL_CORNER_ORIENTATION_TOTAL)
	{
		printf("  ** Indexing Error. corner_orientation_index == %d and should be %d < . **\n", corner_orientation_index, GLOBAL_CORNER_ORIENTATION_TOTAL);
		return 0;
	}

	return corner_orientation_index;
}

I just started running this a few minutes ago, and here is what I get after about 18.5 trillion nodes have been explored, total (depth 9 + current depth 10 node count)

corner_permuted_orientations.jpg


Doesn't look good for the full indexing code. Are most of the permutations * orientations happening that late in the search?
 
Last edited:
Doesn't look good for the full indexing code. Are most of the permutations * orientations happening that late in the search?

So far, so good! Just depth 10 and depth 11 left.

I note that usually these analyses are done using a breadth first search. That is, at each depth, you just go out one more move from the positions found at the preceding depth. It seems to me that you are generating a full brute force tree of depth N for each new depth.
 
I note that usually these analyses are done using a breadth first search. That is, at each depth, you just go out one more move from the positions found at the preceding depth. It seems to me that you are generating a full brute force tree of depth N for each new depth.

Right, and that's nice if you're storing all the results (and have index and unindex routines) because
for each level you just scan your results so far for depth d, and use them to generate depth d+1.

There are ways to speed this up (do the early levels using depth-first search, as you are doing, and
do the late levels using backwards search) but for a table this small (88M entries) it won't matter much.

Most of the fun of pruning tables is generating fast but dense indexing and unindexing functions. For
corners, it's pretty easy because the permutation and orientation are fully separable.

-tom
 
So far, so good! Just depth 10 and depth 11 left.

I note that usually these analyses are done using a breadth first search. That is, at each depth, you just go out one more move from the positions found at the preceding depth. It seems to me that you are generating a full brute force tree of depth N for each new depth.

Something is awry though.

Code:
Node 3 has corner orientation # 243 @ depth 1 after  U2. 2 found, 2185 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



Node 4 has corner orientation # 22 @ depth 1 after  D'. 3 found, 2184 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |XXXX|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|&&&&|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |^^^^|^^^^|^^^^|^^^^|   |OOOO|OOOO|OOOO|OOOO|
---------------------   ---------------------   ---------------------



Node 5 has corner orientation # 172 @ depth 1 after  D. 4 found, 2183 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |^^^^|^^^^|^^^^|^^^^|   |OOOO|OOOO|OOOO|OOOO|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |XXXX|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|&&&&|
---------------------   ---------------------   ---------------------



Node 6 has corner orientation # 107 @ depth 1 after  D2. 5 found, 2182 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------

I should not be seeing any U or D moves at depth == 1. In this file I am only capturing the first instance of a new orientation, and not (permutation - 1)*(orientation) + (orientation - 1) written here as the 0-based master index with 1-based sub-indices for permutation and orientation.

My code for the orientation (prior post) looks correct though, doesn't it?

I don't increment the orientation index (0..2) when U or D are on the top or bottom face up, and it's +1 for +90 and +2 for -90 rotations of the cubie.

Grrrr.... more debugging with fprintf()....

UPDATE:

Ok, I think I solved the orientation bug...


http://lightningcloudcomputing.com/orientation_only.txt

If someone could check that out and let me know.

Looks like ply-1 is working...

Code:
  Node 1 has corner orientation # 0 @ depth 0 after --- 1 found, 2186 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 7 has corner orientation # 84 @ depth 1 after  R. 2 found, 2185 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|OOOO|   |OOOO|OOOO|OOOO|~~~~|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|OOOO|   |OOOO|OOOO|OOOO|~~~~|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|OOOO|   |OOOO|OOOO|OOOO|~~~~|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|OOOO|   |OOOO|OOOO|OOOO|~~~~|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 8 has corner orientation # 246 @ depth 1 after  R'. 3 found, 2184 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |OOOO|OOOO|OOOO|####|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |OOOO|OOOO|OOOO|####|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |OOOO|OOOO|OOOO|####|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |OOOO|OOOO|OOOO|####|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 10 has corner orientation # 766 @ depth 1 after  L'. 4 found, 2183 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|OOOO|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|OOOO|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|OOOO|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|OOOO|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|####|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|####|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|####|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|####|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 13 has corner orientation # 1476 @ depth 1 after  F. 5 found, 2182 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|^^^^|^^^^|^^^^|^^^^|   |OOOO|OOOO|OOOO|OOOO|   |####|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|XXXX|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|~~~~|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|~~~~|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|~~~~|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|~~~~|
---------------------   ---------------------   ---------------------



  Node 14 has corner orientation # 180 @ depth 1 after  F'. 6 found, 2181 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |~~~~|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |~~~~|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |~~~~|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|XXXX|XXXX|XXXX|XXXX|   |OOOO|OOOO|OOOO|OOOO|   |~~~~|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|^^^^|^^^^|^^^^|^^^^|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|####|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|####|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|####|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|####|
---------------------   ---------------------   ---------------------



  Node 16 has corner orientation # 548 @ depth 1 after  B'. 7 found, 2180 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|^^^^|^^^^|^^^^|^^^^|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|####|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|####|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|####|
---------------------   ---------------------   ---------------------
|####|####|####|####|   |OOOO|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|####|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |~~~~|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |~~~~|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|&&&&|   |~~~~|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|XXXX|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|&&&&|   |~~~~|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 4 has corner orientation # 573 @ depth 2 after  U R. 8 found, 2179 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|XXXX|   |XXXX|XXXX|XXXX|~~~~|   |XXXX|XXXX|XXXX|&&&&|
---------------------   ---------------------   ---------------------
|####|####|####|OOOO|   |OOOO|OOOO|OOOO|~~~~|   |XXXX|XXXX|XXXX|&&&&|
---------------------   ---------------------   ---------------------
|####|####|####|OOOO|   |OOOO|OOOO|OOOO|~~~~|   |XXXX|XXXX|XXXX|&&&&|
---------------------   ---------------------   ---------------------
|####|####|####|OOOO|   |OOOO|OOOO|OOOO|~~~~|   |XXXX|XXXX|XXXX|&&&&|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |####|^^^^|^^^^|^^^^|   |OOOO|OOOO|OOOO|OOOO|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|&&&&|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|^^^^|   |####|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 5 has corner orientation # 408 @ depth 2 after  U R'. 9 found, 2178 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |XXXX|XXXX|XXXX|####|   |&&&&|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |OOOO|OOOO|OOOO|####|   |&&&&|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|&&&&|   |OOOO|OOOO|OOOO|####|   |&&&&|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|####|####|####|^^^^|   |OOOO|OOOO|OOOO|####|   |&&&&|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|XXXX|   |~~~~|^^^^|^^^^|^^^^|   |OOOO|OOOO|OOOO|OOOO|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|~~~~|~~~~|~~~~|OOOO|   |~~~~|&&&&|&&&&|&&&&|   |^^^^|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 7 has corner orientation # 740 @ depth 2 after  U L'. 10 found, 2177 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|XXXX|####|####|####|   |~~~~|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|&&&&|
---------------------   ---------------------   ---------------------
|OOOO|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|OOOO|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|OOOO|####|####|####|   |~~~~|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|~~~~|   |^^^^|^^^^|^^^^|####|   |OOOO|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|####|   |OOOO|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|&&&&|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|####|   |OOOO|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------
|^^^^|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|####|   |OOOO|^^^^|^^^^|^^^^|
---------------------   ---------------------   ---------------------



  Node 8 has corner orientation # 1486 @ depth 2 after  U L. 11 found, 2176 remain.

TOP                     FRONT                   RIGHT
---------------------   ---------------------   ---------------------
|&&&&|####|####|####|   |####|XXXX|XXXX|XXXX|   |&&&&|&&&&|&&&&|&&&&|
---------------------   ---------------------   ---------------------
|&&&&|####|####|####|   |####|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|&&&&|####|####|####|   |####|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------
|^^^^|####|####|####|   |####|OOOO|OOOO|OOOO|   |XXXX|XXXX|XXXX|XXXX|
---------------------   ---------------------   ---------------------


BOTTOM                  BACK                    LEFT
---------------------   ---------------------   ---------------------
|XXXX|~~~~|~~~~|~~~~|   |^^^^|^^^^|^^^^|~~~~|   |^^^^|^^^^|^^^^|OOOO|
---------------------   ---------------------   ---------------------
|OOOO|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|OOOO|
---------------------   ---------------------   ---------------------
|OOOO|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|OOOO|
---------------------   ---------------------   ---------------------
|OOOO|~~~~|~~~~|~~~~|   |&&&&|&&&&|&&&&|~~~~|   |^^^^|^^^^|^^^^|OOOO|
---------------------   ---------------------   ---------------------

UPDATE #2

The array move generator was taking too long to complete ply 11 last night (over 2 hours), so, of course, I decided tor recode the permutations + orientation table as a bitboard and switch to the massively-parallel bitboard implementation and log in and run it on one of the blinding fast server racks at the office. And this is what I find today:

14.jpg


Nooooooooooooooooooooooo!
 
Last edited:
Status
Not open for further replies.
Back
Top