A random-state scramble is a move sequence that, a priori, is equally likely to be any valid state of the puzzle.
(There are some puzzles for which this you don't want an equal distribution over all states, or for which the distribution is not obvious. But it's obvious for all official puzzles except Square-1.)
One way to generate a random scramble that obviously works is:
- generate a random state of the puzzle, then
- generate a move sequence that scrambles the puzzle to that state.
This move sequence doesn't need to be optimal. For example, the
official scramble program (TNoodle) doesn't use optimal scrambles for any puzzle but clock.
It can actually generate optimal scrambles for 2x2x2, Pyraminx, and Skewb, too. But to mask the fact that some scrambles for these puzzles can be very short, TNoodle finds longer scrambles for the same positions instead.
Of course, you *could* use an optimal solver to find the scramble for this. Other in this thread have linked to Kociemba's page. I've also given a simplified explanation of how Kociemba works in
this post.
However, it doesn't really matter if we know which state we are going to generate "ahead of time", as long as it's random. A good example is clock: If you go through the full pin sequence and do a random turn each time, the entire clock will be in a random state. In fact, basically all clock scramblers do this.
The
first official random-state scrambler for Pyraminx also used such an approach. I proposed and described it
here in 2009, although it was replaced with an optimal scrambler in 2010 (and by TNoodle in 2013).
However, there is a caveat.
the CO/CP scrambles dont have to cause randomly distributed effects on the edges. the CO/CP scrambles have no intentional effect on the edges. that means that whatever tendency that the CO/CP scramble generator has on the edges (which i agree is certainly nontrivial) will be applied on the already randomly distributed edges.
that means that the distribution of the EO/EP in the EO/EP scramble will stay random after application of any move sequence that does not deliberately affect the EO/EP in a particular way. im certain of that
This is definitely, completely, 100% wrong. I once
made the same mistake. I was hoping to find a fix, but I don't think there is one.
If you randomize edges (ignoring corners), then the whatever you do to the corners
must preserve the random distribution of the edges.
If you use 4 stages, the fourth stage has to preserve the randomization of the first three.
To borrow Stefan's example, suppose you have two light switches set to "off", and you are trying to randomize them.
- Here's one way to randomize the left one: randomly either leave both switches alone, or flip both of them.
- Here's one way to randomize the right one: randomly either leave both switches alone, or flip both of them.
But if you use this to randomize the left one and then the right one, they will always stay in the same state!
In this case, it's obvious to see how to make the randomization independent. But the point still stands: it's not enough to randomize each part while *ignoring* the others. You have to take into account the parts you've already scrambled.
There are ways to modify any of these approaches so that they still give a random state. Your F premove example works. If you randomize edges ignoring corners, then randomize corners while
flipping every edge but keeping every edge in its place, that also works. But these are non-trivial mathematical facts, and the reasoning doesn't extend to other ideas.
To give an explicit 3x3x3 example, suppose you're randomizing edges (EO + EP) and corners (CO + CP) independently. Then there are 12! * 2^11 edge scrambles and 8! * 3^7 corner scrambles. Because of parity, there should be exactly two combinations of (edge scramble + corner scramble) that result in any given output position. Suppose:
- The edge scrambles include (do nothing) and U2, as well as U and U'. Each of these provides a different, valid permutation of edges.
- The corner scrambles include (do nothing) and U2, as well as U and U'. Each of these provides a different, valid permutation of corners.
However, there four different scrambles that can result in the same state:
- (do nothing) U2
- U U
- U2 (do nothing)
- U' U'
This is too many. It means that there is some other overall outcome that has *fewer* than 2 possible combinations (possibly 0), and is therefore less likely than it should be. The overall distribution of the outcome cannot be uniformly random-state.
I'm sorry if this is a bit disappointing, but that's how the math works out. :-(