Christopher Mowla
Premium Member
A little over a year ago, I programmed a solver in Ti83p basic language which solves back the last layer wing edges on a 4x4x4 (or any NxNxN cube, if you solve one orbit of wings back at a time). Since then, I have significantly improved the code's efficiency as well as written pseudocode for those interested in understanding the code.
Although I have not programmed it to solve basic 2 2cycle cases like "PLL Parity" with an algorithm like r2 F2 U2 r2 U2 F2 r2, or other common cases (which are neither 3cycles nor 2cycles) between two opposite composite edges on Thom's ELL page, this program can be useful for people learning K4 to solve the last layer with the minimum number of 3cycles of wings (if they like to solve that way). If odd parity exists, then the solver will finish off with a 2cycle algorithm.
In addition, although it's trivial for a solver to know whether or not there is an odd permutation in the cube, I have made it say whether or not there is odd parity, before the algorithms are given to the user.
I have attached a file containing the following:
1) The programs (along with additional 3cycle and 2cycle algorithm table programs),
2) An application (for those who do not want 9 programs in his or her program list),
3) A group (for those who like to send the group to their calculator and then ungroup it into his or her RAM).
4) A separate program to create scrambles (explained in the readme file, but if anyone has questions about it, let me know).
Looking at the size of the group of all 10 programs (including the scramble program), the total program takes up 7887 bites of RAM (mostly due to the size of the algorithm table programs).
I was forced to attach the readme file separately (due to the forum attachment size limit for zip files).
The readme PDF contains all of the following:
1) Examples
2) Program Outline (It shows the relationship between all 9 programs): the scramble program is independent of the program and is not necessary at all (but I provided it as an extra tool for those who wish to use it).
3) A brief description of each of the programs
4) The code with comments (I think I over commented it, but I didn't want to leave out any details to fully understanding every line of code)
5) The code without comments.
Note that we conjugate each algorithm with U, U', and U2, as well as invert all moves and conjugate that with U, U', and U2, to achieve all necessary algorithms.
(Not that it is really important for this thread, but I did make all of these 3cycle and 2cycle algorithms by hand).
If you are experienced in programming these calculators and follow my algorithm program example, you can customize which algorithms the solver uses to solve a certain case (or cases, if you choose to just conjugate it, take the inverse, etc., to cover more cases).
Enjoy!
(If anyone has a question about ANYTHING related to this program or the algorithms, feel free to post your question).
Although I have not programmed it to solve basic 2 2cycle cases like "PLL Parity" with an algorithm like r2 F2 U2 r2 U2 F2 r2, or other common cases (which are neither 3cycles nor 2cycles) between two opposite composite edges on Thom's ELL page, this program can be useful for people learning K4 to solve the last layer with the minimum number of 3cycles of wings (if they like to solve that way). If odd parity exists, then the solver will finish off with a 2cycle algorithm.
In addition, although it's trivial for a solver to know whether or not there is an odd permutation in the cube, I have made it say whether or not there is odd parity, before the algorithms are given to the user.
I have attached a file containing the following:
1) The programs (along with additional 3cycle and 2cycle algorithm table programs),
2) An application (for those who do not want 9 programs in his or her program list),
3) A group (for those who like to send the group to their calculator and then ungroup it into his or her RAM).
4) A separate program to create scrambles (explained in the readme file, but if anyone has questions about it, let me know).
Looking at the size of the group of all 10 programs (including the scramble program), the total program takes up 7887 bites of RAM (mostly due to the size of the algorithm table programs).
I was forced to attach the readme file separately (due to the forum attachment size limit for zip files).
The readme PDF contains all of the following:
1) Examples
2) Program Outline (It shows the relationship between all 9 programs): the scramble program is independent of the program and is not necessary at all (but I provided it as an extra tool for those who wish to use it).
3) A brief description of each of the programs
4) The code with comments (I think I over commented it, but I didn't want to leave out any details to fully understanding every line of code)
5) The code without comments.
Example
To give everyone a quick peak of how the program input and output works, I have provided one of the examples in the readme file.
The 3cycle Algorithms
I have recently made 3cycle algorithms in <U, R, r, Rw> (no cube rotations). Some of the algorithms are a little longer than what is commonly practiced, but I thought this was a good choice for simplicity. Corresponding to how Thom lists the cases on his ELL page, here are the algorithms I decided to use for each group:
To give everyone a quick peak of how the program input and output works, I have provided one of the examples in the readme file.
When the wings are solved, they are numbered like so:
\( \begin{matrix}
{} & \left[ 6 \right] & \left[ 5 \right] & {} \\
\left[ 7 \right] & {} & {} & \left[ 4 \right] \\
\left[ 8 \right] & {} & {} & \left[ 3 \right] \\
{} & \left[ 1 \right] & \left[ 2 \right] & {} \\
\end{matrix} \)
Note that the "solved" list needs to be {1,2,3,4,5,6,7,8}.
Now, here is the example:
________________________
________________________
________________________
________________________
________________________
________________________
________________________
\( \begin{matrix}
{} & \left[ 6 \right] & \left[ 5 \right] & {} \\
\left[ 7 \right] & {} & {} & \left[ 4 \right] \\
\left[ 8 \right] & {} & {} & \left[ 3 \right] \\
{} & \left[ 1 \right] & \left[ 2 \right] & {} \\
\end{matrix} \)
Note that the "solved" list needs to be {1,2,3,4,5,6,7,8}.
Now, here is the example:
________________________
________________________
________________________
________________________
________________________
________________________
________________________
The 3cycle Algorithms
group 1
R U R' U' r U R U' Rw' (9)
group 2
Rw U' R' U' r U R U' r' U2 Rw' (11)
group 3
Rw' U r2 U R U' r2 U R' U2 Rw (11)
group 4
Rw U' R' U' r' U R U' r U2 Rw' (11)
group 5
Rw U' R U r' U R' U' r U R U2 R' U Rw' (15)
group 6
Rw' U' R U' r2 U R' U' r2 U2 Rw (11)
group 7
Rw U2 r' U R' U' r2 U R U' r' U2 Rw' (13)
R U R' U' r U R U' Rw' (9)
group 2
Rw U' R' U' r U R U' r' U2 Rw' (11)
group 3
Rw' U r2 U R U' r2 U R' U2 Rw (11)
group 4
Rw U' R' U' r' U R U' r U2 Rw' (11)
group 5
Rw U' R U r' U R' U' r U R U2 R' U Rw' (15)
group 6
Rw' U' R U' r2 U R' U' r2 U2 Rw (11)
group 7
Rw U2 r' U R' U' r2 U R U' r' U2 Rw' (13)
2cycle algorithms:
Here are the algorithms I chose to use as the primary algorithms (not solely in <U, R, r, Rw>).
Note that M = (l r') and M' = (l' r) on big cubes, in general. The indicated algorithm lengths take this into account).
adj
l'2 U Lw U2 r' U2 Rw' U2 x U' r' U x' U2 x U' M' l' (15)
diag
r U2 r' U2 r' U2 l U2 r' U2 r U2 M' U2 r2 U2 r' (18)
across (unoriented)
l'2 U' Lw U2 r' U2 Rw' U2 x U r' U' x' U2 x U M' l' (15)
across (oriented)
l' r' U Lw U2 r' U2 Rw' U2 x U' r' U x' U2 x U' M r' (16)
opp
r U2 r U2 M' U2 r U2 r' U2 l U2 r2 (14)
edge flip
x' Rw2 U2 Lw' U2 r U2 Rw U2 x' U r U' F2 U r' U Rw2 x (16)
I have also included a move table for 2cycle algorithms also in the move set <U, R, r, Rw> (in the subfolder "Other Move Tables"), but I didn't make them the primary algorithms used in the application because they were much longer than the algorithms above:
adj
R U2 Rw' R2 U2 Rw' U2 Rw' U' r2 U Rw U2 Rw U2 Rw' U2 Rw' U' r U Rw U2 r2 U2 R' (26)
diag
Rw' U' Rw U2 Rw U2 Rw' U2 Rw' U' r U Rw U2 Rw U2 Rw' U2 Rw' U' r2 U2 Rw (23)
across (unoriented)
Rw' R' U2 Rw' U2 Rw' U' r2 U Rw U2 Rw U2 Rw' U2 Rw' U' r U Rw U2 Rw2 R (23)
across (oriented)
Rw' U2 r' Rw' U2 Rw U r2 U' Rw' U2 Rw' U2 Rw U2 Rw U r' U' Rw' U2 Rw' U2 Rw2 r U2 Rw (27)
opp
Rw U' R U r U2 r' U' R' U' r U R U r U2 r' U' R' U' r2 U2 Rw' (23)
edge flip
Rw U2 Rw U2 r2 U Rw U2 Rw U2 Rw' U2 Rw' U' r U Rw U2 Rw U2 Rw' U2 Rw' U Rw' U2 Rw' (27)
Note: Here are two additional algorithms for two of the cases I DID NOT include in those algorithm tables:
opp
Rw' U' R U r' U R' U' r U R U2 R' U' r' U2 r' U2 r' U2 r2 Rw (22)
across (unoriented)
Rw2 R' U R' U' r U R U2 R' U' r' U2 r' U2 r' U2 r2 U' R U Rw R2 (23)
Note that M = (l r') and M' = (l' r) on big cubes, in general. The indicated algorithm lengths take this into account).
adj
l'2 U Lw U2 r' U2 Rw' U2 x U' r' U x' U2 x U' M' l' (15)
diag
r U2 r' U2 r' U2 l U2 r' U2 r U2 M' U2 r2 U2 r' (18)
across (unoriented)
l'2 U' Lw U2 r' U2 Rw' U2 x U r' U' x' U2 x U M' l' (15)
across (oriented)
l' r' U Lw U2 r' U2 Rw' U2 x U' r' U x' U2 x U' M r' (16)
opp
r U2 r U2 M' U2 r U2 r' U2 l U2 r2 (14)
edge flip
x' Rw2 U2 Lw' U2 r U2 Rw U2 x' U r U' F2 U r' U Rw2 x (16)
I have also included a move table for 2cycle algorithms also in the move set <U, R, r, Rw> (in the subfolder "Other Move Tables"), but I didn't make them the primary algorithms used in the application because they were much longer than the algorithms above:
adj
R U2 Rw' R2 U2 Rw' U2 Rw' U' r2 U Rw U2 Rw U2 Rw' U2 Rw' U' r U Rw U2 r2 U2 R' (26)
diag
Rw' U' Rw U2 Rw U2 Rw' U2 Rw' U' r U Rw U2 Rw U2 Rw' U2 Rw' U' r2 U2 Rw (23)
across (unoriented)
Rw' R' U2 Rw' U2 Rw' U' r2 U Rw U2 Rw U2 Rw' U2 Rw' U' r U Rw U2 Rw2 R (23)
across (oriented)
Rw' U2 r' Rw' U2 Rw U r2 U' Rw' U2 Rw' U2 Rw U2 Rw U r' U' Rw' U2 Rw' U2 Rw2 r U2 Rw (27)
opp
Rw U' R U r U2 r' U' R' U' r U R U r U2 r' U' R' U' r2 U2 Rw' (23)
edge flip
Rw U2 Rw U2 r2 U Rw U2 Rw U2 Rw' U2 Rw' U' r U Rw U2 Rw U2 Rw' U2 Rw' U Rw' U2 Rw' (27)
Note: Here are two additional algorithms for two of the cases I DID NOT include in those algorithm tables:
opp
Rw' U' R U r' U R' U' r U R U2 R' U' r' U2 r' U2 r' U2 r2 Rw (22)
across (unoriented)
Rw2 R' U R' U' r U R U2 R' U' r' U2 r' U2 r' U2 r2 U' R U Rw R2 (23)
If you are experienced in programming these calculators and follow my algorithm program example, you can customize which algorithms the solver uses to solve a certain case (or cases, if you choose to just conjugate it, take the inverse, etc., to cover more cases).
Enjoy!
(If anyone has a question about ANYTHING related to this program or the algorithms, feel free to post your question).
Attachments

16.3 KB Views: 18

128.7 KB Views: 29
Last edited: