# What does this algorithm actually do?



## MagicVince (Jul 10, 2022)

Hello,

If you are wondering what this or that OLL actually does (in terms of permutations for instance), this website can help you:








Formula Analyzer


Rubik's cube Formula Analyzer with graphic output of the permutations and orientations effects on corner edge and center cubelets and an algorithm database.




cube.vgreco.fr





When I introduced myself two and half years ago I told you I was working on a website that would analyze the effects of an algorithm. For some unknown reasons, I did not post the URL of my website when it was in alpha stage, some months later (lucky you, you missed the ugly earlier versions). But I recently updated it and I consider that it is now in beta stage.
I am taking this opportunity to show it to you.

I could speak for hours about this website, but I will try to be brief. Basically you type (or copy and paste) any formula into the input section, say an OLL. An image is generated that shows the effect of the algorithm (more exactly it shows what situation it can solve) with colored arrows. In this way you can see the desired effects (on orientation) but also the side effects (on permutations). There is a summary window that gives you some extra informations (list of the permutations/orientations, how many times you should repeat the algorithm to cancel it, length in QTM etc.). Then, you can search the mini-database (less than 150 algorithms, but it has all the OLL and all the PLL) for a similar algorithm that would leave the corners unchanged, for instance. By clicking on its formula, you can now explore it and so on.
Does such a website already exist? Do you find it useful?
Any feedback is welcome.
Thanks,

MagicVince.


----------



## Filipe Teixeira (Jul 10, 2022)

this is amazing, thank you for your hard work!


Spoiler


----------



## GodCubing (Jul 10, 2022)

There is a CMLL visualizer that does similiar things for CMLLs instead of all algs


----------



## MagicVince (Jul 10, 2022)

To solve the cube, just follow the arrows' directions...

I am joking, but I confess I already tried to get closer to the solution only by looking at the permutation:

Both the image and the permutations show the complexity to reach the solution. If one could mesure this distance to the solution through this complexity, then God algorithm would be within reach...



GodCubing said:


> There is a CMLL visualizer that does similiar things for CMLLs instead of all algs


Interesting. Thank you for the information, I did not know this website.
For U2 R U2 R' U2 R' F R F', it gives this image.

Mine will output by default this one:

But you can disable arrows to show only edge permutations and/or flips, or at the contrary corner permutations and/or twists.

Of course if the edges go to the bottom layer, my result will be rather messy (it was not designed with Roux in mind).

Hello again

I am working on two small improvements:

In the input field, you can now select the part of the formula you want to be analyzed. I am not totally satisfied with the behavior (the selection disappear if you click outside the input field although still active, if you click again inside the input field, it still does not appear but is still active if you click inside the former selection whereas it is OK if you click out of the former selection)
You can now choose your color scheme (Western or Japanese) and your cube orientation. This one is working properly. I don't know if need to have a custom color scheme or if these two presets are enough.
For instance, if you look at this Y-Perm (FRU'R'U'RUR'F')(RUR'U')(R'FRF') you can select the first couple of parentheses, click on "Find Similar" and see an OLL 37, or the two last couples of parentheses, click on "Find Similar" and get an OLL 33.
These modifications are now officially published here: https://cube.vgreco.fr/
What do you think ?


----------



## Filipe Teixeira (Jul 12, 2022)

hi

firstly, good job!

secondly, can you make the visualization more standard?

for instance, this is yperm on your system



and this is the standard visualization



as you can see, swaps are symbolized by a single arrow, not two
it's just a detail and I can agree if you decide to leave as it is.


----------



## MagicVince (Jul 12, 2022)

Thanks Felipe.
Actually this visualization is closely linked to the permutation/orientation notation that appears in the Effect window.
This allows me to easily do this:

and go from this output to the previous one (if I decide to remove the orientations for instance). The single arrows would not be compatible with the edge flips and corner twists.
More precisely, the effect is noted like this: (urf, ulb-)(ufl+)(ul, ub+)(uf+)_(u+)_ meaning the URF corner takes the place of the ULB corner, the ULB corner is twisted anti-clockwise and then replaces the URF corner etc. The arrows are following the same logic and thus it is important for me that the curved blue arrow for the twist is linked to the longer arrow for the swap.
I hope this makes sense.
PS: you can right-click on an image of my website and copy it to paste it here (or elsewhere).


----------



## NONOGamer12 (Jul 12, 2022)

bruh i just realized y perm has been lying to us

@MagicVince @Abram Grimsley literally there is an f and f' at start and end when i was looking up how to solve blind it gave me the same alg exept without those f moves


----------



## Abram Grimsley (Jul 14, 2022)

NONOGamer12 said:


> @MagicVince @Abram Grimsley literally there is an f and f' at start and end when i was looking up how to solve blind it gave me the same alg exept without those f moves


I know. But your post about y perm lying to us is still funny to me. Because, it's true. The "y" perm has been lying to us


----------



## NONOGamer12 (Jul 14, 2022)

Abram Grimsley said:


> I know. But your post about y perm lying to us is still funny to me. Because, it's true. The "y" perm has been lying to us


oh lol


----------



## Abram Grimsley (Jul 14, 2022)

Hey, we should see if we can find a better alg for y perm. So that we don't have to worry about "f" or "f'" moves


----------



## cuberswoop (Jul 15, 2022)

Abram Grimsley said:


> Hey, we should see if we can find a better alg for y perm. So that we don't have to worry about "f" or "f'" moves


R2' D' R2 U R2' U' R2 D R2' U' R2 U R2' U R2
I don't know how good it is because my hands are too sweaty from geoguessr but it looks good.


----------



## Abram Grimsley (Jul 15, 2022)

cuberswoop said:


> R2' D' R2 U R2' U' R2 D R2' U' R2 U R2' U R2
> I don't know how good it is because my hands are too sweaty from geoguessr but it looks good.


This is great. Though, there are way to many R2 moves, but other than that, it looks like it could be a good one 

It's almost like a reverse v perm. Kinda


----------



## ruffleduck (Jul 15, 2022)

Abram Grimsley said:


> Hey, we should see if we can find a better alg for y perm. So that we don't have to worry about "f" or "f'" moves


F moves are necessary for good y perms, I'm afraid.


----------



## Abram Grimsley (Jul 15, 2022)

Not necessarily. There has to be a way to get a good y perm without f moves


----------



## ruffleduck (Jul 15, 2022)

Abram Grimsley said:


> Not necessarily. There has to be a way to get a good y perm without f moves


I assure you--There are none. Try generating the algs. The best you're going to get are long RUL abominations or sq1-like algs that have too many half turns.


----------



## Abram Grimsley (Jul 15, 2022)

Noooooooooooooooooooooooooooooo! Lol 
Your probably right. We'll, it's the thought that counts.


----------



## MagicVince (Jul 15, 2022)

What would be a good algorithm for you?
For sure, there is no 2-gen Y-Perm (unless you allow cube rotations).
The only thing you can do is perhaps minimize the use of the 3rd face.
What do you think of R2 U' R2 U' R2 U R' F' R U R2 U' R' F R?
Only 2 Fs compared to the initial algorithm I mentioned and less R2s than the one from cuberswoop...


----------



## bulkocuber (Jul 15, 2022)

I don't understand what's wrong with F moves.


----------



## NONOGamer12 (Jul 16, 2022)

Abram Grimsley said:


> Hey, we should see if we can find a better alg for y perm. So that we don't have to worry about "f" or "f'" moves


lol yea



zzoomer said:


> F moves are necessary for good y perms, I'm afraid.


No Never!!!



bulkocuber said:


> I don't understand what's wrong with F moves.


cuz it is like the lied 2 us cuz the f moves make a totally different alg


----------



## MagicVince (Jul 28, 2022)

I made some changes so that you can now have different kinds of images with a lot of parameters to fit your needs.
So now, for F(RUR'U')F'(U) you can get those images :
default:

Straight arrows (for permutations only):

No space between arrows:

No cubbies shown on border if not yellow:


You can also change sizes, thicknesses, colors, spacing etc.
I also fixed some minor issues and changed a bit the overall look and feel of the website.

@Filipe Teixeira, now Y-Perm can look like this (unset "curved arrows", set "hide grey on borders", set "spacing of arrows" to "none"):

which is more standard, I agree...

*Is there anything else you would like to control in the display of the result?*


----------



## Filipe Teixeira (Jul 28, 2022)

MagicVince said:


> I made some changes so that you can now have different kinds of images with a lot of parameters to fit your needs.
> So now, for F(RUR'U')F'(U) you can get those images :
> default:
> View attachment 20109
> ...


this looks marvelous! congratulations for the clever solution and amazing app!

this looks stunning I might say!


Spoiler







can I ask a way to persist the configuration and a bbcode plugin integration so we can use this easily here on the forum?


----------



## MagicVince (Jul 28, 2022)

Thanks a lot for the kind words.
All the parameters can easily be encoded into the URL, this is just some extra work to do: this is an easy way to get persistence.
Now, I have never done a bbcode plugin, so I don't know what it implies. But, as my code is javascript, the image is calculated on the client side: I am afraid this could be an issue (but once again, I have to study further the question).

I had a look to BBCode, and basically this is a way to re-write HTML. So this means that I have to generate an image, server-side, from a requested URL. But having the images generated server-side could overload my server (this is just a Raspberry I have at home)
What is the inconvenience to right-click on the image, copy it and then paste it in the forum?
You can go from here:

to here:

What do you think?


----------



## Filipe Teixeira (Jul 29, 2022)

MagicVince said:


> I had a look to BBCode, and basically this is a way to re-write HTML. So this means that I have to generate an image, server-side, from a requested URL. But having the images generated server-side could overload my server (this is just a Raspberry I have at home)
> What is the inconvenience to right-click on the image, copy it and then paste it in the forum?
> You can go from here:
> View attachment 20118
> ...


I think that's reasonable. 

And when you have a time will you take a look on a way for the user to save his configs?


----------



## MagicVince (Jul 29, 2022)

Filipe Teixeira said:


> And when you have a time will you take a look on a way for the user to save his configs?


I have worked on a quick and dirty implementation of a feature to save the options. Let me test it some more time. Hopefully I will release it tomorrow.


----------



## Filipe Teixeira (Jul 29, 2022)

MagicVince said:


> I have worked on a quick and dirty implementation of a feature to save the options. Let me test it some more time. Hopefully I will release it tomorrow.


perfect


----------



## MagicVince (Jul 30, 2022)

As per request, beta 1.3 of my Formula Analyzer is now available, with display options saved locally (until you clear your cache).








Formula Analyzer


Rubik's cube Formula Analyzer with graphic output of the permutations and orientations effects on corner edge and center cubelets and an algorithm database.




cube.vgreco.fr




As usual, feedback is welcome.
Enjoy! 
[EDIT June 31, 2022] In beta 1.4 the implementation of the saved options is now less "quick and dirty" : the "Display Options" section shows properly what are the selected options, whether they come from the default settings or they are your own saved choices.


----------



## MagicVince (Aug 11, 2022)

Hello again,

After some discussions on how to name ELL and CLL algorithms, I have added them into the database. There are now 138 families of algorithms (recognition of the cases to solve), with 273 formulas (examples of algorithms to solve the case).
The display options layout has been totally redesigned. I added new options, one of them being rounded corners for the facets of the cubies. This can give this kind of result:

I have improved the recognition of the cases (they can now appear on any face, not only the Up one).
As soon as you check the database for similar algorithms, the previous algorithm is recognized as "CLL E6", "EOLL bar shape", "OLL 45 T-shape" for instance.

I still have some issues with AUF and the initial and final cube rotations (it works, but sometimes it lacks cancellations).
But overall I achieved the goals I initially had: first being able to recognize and categorize any algorithm acting on the last layer, and second being able to find some algorithms that do more modifications or less modifications than a given last layer algorithm.

Next steps will be to fix the AUF and cancellation issues, add more presets and enhance the user interface, but this will not be before September.


----------



## MagicVince (Oct 16, 2022)

Hello,

After a long period without any updates, I am happy to release the version 1.6 of Formula Analyzer. I think I solved most of the issues I had with move cancellation when the alg to recognize is not seen from the same point of view as the one stored in the database.
There also now more options to display the last layer (pink means well positioned but not necessarily well oriented, and you can select what to display - nothing, orientation, position or all - independently for edges and corners: check the map on this post to see what can be achieved).

Example: the effect of M' U L2 B2 L U R' U2 L U' M R U' can be shown like this:

the pink meaning that the position of the edges are unchanged (even if in this case they are all flipped).

And I added two new buttons: one to clean the formula (mostly removes the parentheses) and one to invert the formula.
As a reminder, Formula Analyzer can recognize: OLL, PLL, CLL, ELL, EOLL, OCLL and COLL, wherever the last layer is positioned (Up, Down, Left, Right, Front or Back) and find same or similar algs from its own (limited) database.
Do not hesitate to give feedback.


----------



## Lucas Garron (Oct 17, 2022)

Looks like I missed this thread until now! (It looked like a question, not a brand-new tool?)

I love the automatic diagram adjustment based on how many faces are affected!
It's also nice to see a collection of tools for alg breakdown brought together like that.


----------



## MagicVince (Oct 24, 2022)

Thank you Lucas. The 3 cube representations are hardcoded, unfortunately, but perhaps one day, an alg acting only on Up and Front face will show only those faces (it only works for Up-Right currently).

Regarding the tools you mentioned, I will try in a near future to add more explanations on the content of the page itself rather than adding new features: how to input formulas (there is a "auto-simplify" so FFRRR becomes F2R' automatically), how you can select a piece of formula to see its effect, the meaning of the different lines in the "red" table (in particular the permutation notation), and perhaps even how I choose the position of the arrows in the cube representation.
Everything has been modified several times, and for instance "show yellow color" has become "show top color" and now it is "show orientation": so things that were obvious at the beginning are perhaps less obvious now.

PS: I have checked Twizzle today (great and huge work, indeed), and it is interesting to see how my latest modifications ("clean" and "invert") are the same as your "Simplify" and "Invert" (well, I did not know Twizzle, but I was a little bit more familiar with alg.cubing.net, so it is perhaps not a coincidence ).


----------



## MagicVince (Oct 30, 2022)

I've just released version 1.7 of Formula Analyzer.

As previously said, I wanted to add a help page to better explain what features are available. You will find its link on top of the main page (the website has only 3 pages, the link is actually on the 3 of them).
You will find there a lot of explanations on what you can do (all the conventions for entering an algorithm, all the options to display the cube and more) and also what you can obtain (more details on the different lines of the "red table", in particular).

I took advantage of this addition to deeply modify the formula parser. Not only the presentation is more user-friendly (with spaces separating each rotations), but it now accept negative exponents (or primes) for sequences of moves between parentheses.
The main difficulty, from a programming point of view, is that the same function is used to parse the input on-the-fly and to parse the copy-pasted formulas (but I guess very few people are interested into the implementation details ).

I am convinced there are a lot of typos or English mistakes in the new page. Do not hesitate to report them to me.
Thanks.


----------



## MagicVince (Dec 11, 2022)

A short message to let you now two new features of Formula Analyzer version 1.8. In addition to the "invert" button that allows you to revert an alg, you now have two buttons, "sym LR" and "sym FB", to transform an alg into a new one:

"sym LR" makes a Left-Righ symmetry. It can be useful to change a right-handed alg into a left-handed alg (and vice-versa).
"sym FB" makes a Front-Back symmetry. It is mainly aimed to RU algs (or RUL or RUD). For instance, it will find Gc perm from Ga perm or Gd perm from Gb perm.
The other changes are mainly cosmetic.


----------

