Can you remake the stacked graphs with the variable of interest at the bottom? Its hard to see the percentage of Rust when it's all the way at the top with a lot of noise on the lower layers
I didn't get to simplify the code further unfortunately. I could have, but I was running very tight on time with other things. In fact the running-in-production-version is even worse than what I've posted, I just went with what worked fast on the first try and moved on to something else immediately. But it can absolutely be improved further!
I came across this store the other day while browsing LinkedIn. It's actually by the same guy who made the EspoTek Labrador electronics board (disclaimer: I contributed to the Labrador repo back in 2019)
Yes, you can solve a cube by this simple algorithm
i = 0
while not solved
apply move(i)
Interestingly, there is no constant function `move(i) = x` that makes this algorithm correct.
If there was, there would be a single element x of the rubik's cube group that generates the entire group (every element could be written as x^n)
This would imply that the group is commutative (x^n * x^m = x^(n+m) = x^(m+n) = x^m * x^n), which every cuber knows is false from experience (permuting moves does not lead to the same final configuration)
An interesting question would then be: whats the simplest piecewise-constant function that makes this algorithm work?
I.e. is it possible to use move x1 for the first n1 steps, then x2 for the second n2, then x3 for the next n3, ..., then xk for the next nk? And if so, what is the smallest k that makes it so?
The whole point is that in a way, there is that constant function that you say doesn't exist.
Or more specifically, there is a fixed sequence of moves that will traverse through every possible configuration of a Rubik's cube then take you back to whereveryou started. One of those states is the solved state. Meaning whenever you complete this sequence you will have done a full loop of all possible cube states.
The interesting thing is that it doesn't matter where you start, you can follow this same sequence. So you can be blindfolded, never see the cube, perform the sequence and one of those states will be a solved Rubik's cube.
Yeah I got that, but it's really not as interesting as it seems. Let me explain why.
Say we have an array p[1], p[2], ..., p[n] with all possible rubiks cube configurations
Then this function will solve the cube:
move(1) = p[1]^(-1)
move(i) = p[i]^(-1) * p[i-1]
In laymans terms, the resulting algorithm is: assume the initial configuration is p[1], then solve it. If it wasn't, undo those moves then solve as if the initial position was p[2], etc...
So, yeah. Those fixed solving sequences / hamiltonian paths are actually very common. We can make one for any permutation of the group elements.
So I posed a more interesting question: what is the simplest sequence of moves that has this property?
I can try to find it if you want