If I download a Python interpreter, will I be able to generate that move list with just the code you show?
For Python 2 it should work, for Python 3 use this instead:
http://ideone.com/haMUAm
(I should have done Python 3 right away, slightly shorter)
If so, Python has to be the most compact language since APL.
Python helps, but it really is the approach that makes it short. qq could probably rewrite it to J or K and make it a third of the size. And I'd love to see that, even though it would look just like gibberish to me
PS: Is there any way to generate these multiple quotes other than cutting and pasting the markup?
I don't think so.
Cynthia: Only the FIRST letter in a corner matters - the other two can be in either order. You can write either URF or UFR.
That's a possible convention, but I prefer to use all-same-direction because then readers don't need to know about that convention.
Stefan: That's a cool little program, but how does it actually do the moves? I assume the magic is in lines 9 and 10 but I don't really get what you're doing there. More specifically, what's the function of the maketrans and translate functions? I assume those are Python specific?
They're like Perl's tr/.../.../, maybe you know that? Translates for example "ABC" to "xyz", meaning it replaces every "A" in the target string by "x", every "B" by "y", etc. Very similar to saying "UFR moved to RFD" actually, where the U moved to R, the F to F, and the R to D.
In variable "state", I store the current positions of cubies "UF UR ... DBR". So if at some point the first letter pair in state is "LB", that means that the "UF" cubie is at position "LB". Now let's say I want to simulate a U turn. That affects all cubies currently in the U layer, i.e., those cubies with a "U" in their current position string. And for all of these, every "F" becomes "L", every "L" becomes "B", etc. So lines 7 to 9 prepare the translation "FLBR"-to-"LBRF", and in line 10 it gets applied to all cubie positions containing "U". For example, position "FUR" becomes "LUF" while "DLF" isn't changed. I really love this way to represent and simulate the cube. Easily generalizes to for example Megaminx as well.
Looks like you added spaces where you shouldn't have. If this doesn't help, please post the URL.
Edit: Geez, I'm a noob. Improved the last part of the program and changed variable names while I was at it (only the Python 3 version).