**Summary of current knowledge (2020-05-07):**

STM:

4×4: ≤22 (by coolcomputery); ≥18

5×5: ≤53 (by coolcomputery)

6×6: ≤103 (by coolcomputery)

m×n: \( O(N\log^2N) \) where \( N=mn \); ≥\( \lfloor m/2\rfloor n+m\lfloor n/2\rfloor \) (from considering Manhattan distance)

2×n: \( \le n(\log_2n+20) \)

MTM:

4×4: ≤21

m×n: Θ(mn) (from counting arguments)

---

Loopover = this game; STM = single-tile metric (the one Loopover implementations use to count moves); MTM = multi-tile metric (a seemingly more sensible choice of metric).

STM bound of 26 moves is one move less than the best I could find (27 according to this spreadsheet); MTM bound has not been previously calculated before, as far as I can tell, although chances are that I'm just not aware of it. This puzzle has "only" 21 trillion states and we can get 128-fold symmetry+antisymmetry reduction, so in theory it shouldn't be too hard to BFS the whole thing. (I did also recently get a new 4 TB hard drive…) The solving procedure is essentially: solve a bunch of pieces optimally, then solve the remaining pieces

*also optimally*. The second part is something that earlier work did not do, which is why we can get an immediate one-move improvement.

(I might bother to do a more sophisticated analysis later on; there's still a lot of low-hanging fruit left to pick.)

Solving the top two rows optimally takes at most 10 MTM, 13 STM.

(0, 1)

(1, 18)

(2, 255)

(3, 3648)

(4, 48787)

(5, 605886)

(6, 6632955)

(7, 56497090)

(8, 253413670)

(9, 199503998)

(10, 2212092)

(nice formatting wew)

(1, 18)

(2, 255)

(3, 3648)

(4, 48787)

(5, 605886)

(6, 6632955)

(7, 56497090)

(8, 253413670)

(9, 199503998)

(10, 2212092)

(nice formatting wew)

total states: 518918400

distance 0: 1 nodes

distance 1: 12 nodes

distance 2: 114 nodes

distance 3: 1084 nodes

distance 4: 9931 nodes

distance 5: 86036 nodes

distance 6: 703024 nodes

distance 7: 5240586 nodes

distance 8: 32884017 nodes

distance 9: 142199734 nodes

distance 10: 258379100 nodes

distance 11: 78645932 nodes

distance 12: 768545 nodes

distance 13: 284 nodes

average distance: 9.717073

distance 0: 1 nodes

distance 1: 12 nodes

distance 2: 114 nodes

distance 3: 1084 nodes

distance 4: 9931 nodes

distance 5: 86036 nodes

distance 6: 703024 nodes

distance 7: 5240586 nodes

distance 8: 32884017 nodes

distance 9: 142199734 nodes

distance 10: 258379100 nodes

distance 11: 78645932 nodes

distance 12: 768545 nodes

distance 13: 284 nodes

average distance: 9.717073

Solving the bottom two rows optimally once the top two rows are solved takes at most 11 MTM, 13 STM. Note that almost all of the optimal solutions here temporarily destroy the initially solved rows before finally restoring them (because there are no free columns at all), with the only exceptions being the solutions for the sixteen states that can be solved by moving just the two free rows.

Code:

```
move count stats:
0: 1
1: 6
2: 9
3: 24
4: 288
5: 1132
6: 1340
7: 8936
8: 16721
9: 8992
10: 2703
11: 168
```

Code:

```
0: 1
1: 4
2: 6
3: 20
4: 137
5: 428
6: 934
7: 3172
8: 8410
9: 11024
10: 9792
11: 5276
12: 880
13: 236
```

From these, we conclude an upper bound of 21 MTM and 26 STM.

Alternatively (for STM), following earlier work, it is known that solving a 3×3 block takes at most 13 STM; running the optimal solver on the 7! = 5040 possible permutations of the last side last layer leads to a maximum of 13 STM as well, so we have a total of 26 STM.

Code:

```
move count stats:
0: 1
1: 4
2: 10
3: 24
4: 58
5: 140
6: 334
7: 726
8: 1258
9: 1442
10: 829
11: 176
12: 30
13: 8
```

Similarly, solving a 3×2 block takes at most 11 STM; running the optimal solver on the 10! = 3628800 permutations of the last ten pieces leads to a maximum of 15 STM, again a total of 26 STM.

Code:

```
move count stats:
0: 1
1: 6
2: 23
3: 96
4: 451
5: 1996
6: 8370
7: 33748
8: 125081
9: 397755
10: 927554
11: 1230082
12: 748542
13: 150702
14: 4378
15: 15
```

The solver I coded for this doesn't "truly" exploit much of the inherent symmetry of the puzzle. The puzzle state is stored as a 64-bit integer with four bits for each cell, rather than as a permutation coordinate; this allows for switching the top and bottom halves of the puzzle just by doing a bit rotation and xor-ing by a constant. Only one pruning table is used (solving the top eight pieces); this pruning table is stored very inefficiently by using a 32-bit index, but that's fine, because I have 2 GB RAM to spare and it's only one pruning table. This pruning table is applied to the puzzle state itself, a shifted version of the puzzle state (solving the bottom two rows instead of the top two rows, effectively), as well as doing those two things to the

When solving the last two rows in MTM, this managed to do about 3500 solves per second, with all 8! = 40320 cases being solved in 11.65 seconds.

The solver has not been thoroughly tested for correctness (I literally just wrote it yesterday and haven't reviewed it), but there

I tried doing the thing where the solver switches to the inverse scramble opportunistically (like this) but it ended up being 40% slower than just doing regular IDA* (because of branch mispredicts?). Maybe I just didn't implement it right, idk.

*inverse*state as well to increase average pruning depth.When solving the last two rows in MTM, this managed to do about 3500 solves per second, with all 8! = 40320 cases being solved in 11.65 seconds.

The solver has not been thoroughly tested for correctness (I literally just wrote it yesterday and haven't reviewed it), but there

*is*a failsafe check to ensure that the generated solutions really do solve the input puzzle state. In other words, if there's a bug, at worst it just means that the solutions are not optimal, as opposed to being completely wrong. Thus this will not affect the correctness of the upper bounds in the rest of this post. (Unless there's a bug in the checking code…)I tried doing the thing where the solver switches to the inverse scramble opportunistically (like this) but it ended up being 40% slower than just doing regular IDA* (because of branch mispredicts?). Maybe I just didn't implement it right, idk.

========

Update (2019-09-10): STM bound has been reduced to

**25 STM**.

Each of the 284 eight-piece cosets that are 13 moves away from solved have the eight pieces ABCDEFGH in the opposite half of the board, e.g.

Code:

```
P O M N
K L J I
G H E F
C D B A
```

Code:

```
X X X X
X X X X
O O O O
O O O O
X X X X
O O O O
O O O O
X X X X
X X O O
X X O O
X X O O
X X O O
X O O X
X O O X
X O O X
X O O X
```

Code:

```
K L I J
O P M N
C D A B
G H E F
```

*specific*block may sometimes take 13 moves). This leads to a total upper bound of 12 + 13 = 25 STM.

========

TL note: "future" probably means like in the rest of the week, depending.

Consider the asymptotic behaviour of GN in the single-tile and multi-tile metrics. In the latter, a counting argument shows that it is bounded below by Ω(n^2) and a 3-cycle method shows that it is bounded above by O(n^2), so god's number in MTM is necessarily Θ(n^2). The former seems to be a lot more complicated. Again, a counting argument gives a lower bound of Ω(n^2), but the 3-cycle method gives an upper bound of O(n^3). I think I have a way of bringing the upper bound down to something like O(n^2 (log n)^4) but I haven't worked out the details (so the exponent of the log factor is probably wrong); I'm

As for a lower bound, there are two basic approaches to consider. As mentioned above, we have a counting argument leading to a lower bound of cn^2 + o(n^2) for some constant c ≥ 2, but for small sizes we can also consider a bound given by Manhattan distance. As the sides wrap around (or should I say, they

In particular, this gives a lower bound of 36 for 6×6, which is better than the counting bound of 31, at least according to the formula in the Loopover Research spreadsheet. (I haven't verified it, but it seems roughly correct.)

Consider the asymptotic behaviour of GN in the single-tile and multi-tile metrics. In the latter, a counting argument shows that it is bounded below by Ω(n^2) and a 3-cycle method shows that it is bounded above by O(n^2), so god's number in MTM is necessarily Θ(n^2). The former seems to be a lot more complicated. Again, a counting argument gives a lower bound of Ω(n^2), but the 3-cycle method gives an upper bound of O(n^3). I think I have a way of bringing the upper bound down to something like O(n^2 (log n)^4) but I haven't worked out the details (so the exponent of the log factor is probably wrong); I'm

*pretty sure*the actual asymptotic behaviour is Θ(n^2), but I can't figure out how to prove that.As for a lower bound, there are two basic approaches to consider. As mentioned above, we have a counting argument leading to a lower bound of cn^2 + o(n^2) for some constant c ≥ 2, but for small sizes we can also consider a bound given by Manhattan distance. As the sides wrap around (or should I say, they

*loop over*), the maximum possible distance in either axis is ⌊n/2⌋, so the maximum possible Manhattan distance for each piece is 2⌊n/2⌋. Each move affects n pieces, the Manhattan distances of which change by at most ±1; hence the maximum possible change in the sum of Manhattan distances is ±n. The sum of Manhattan distances for a whole board is bounded by 2⌊n/2⌋ × n^2, so this gives a GN lower bound of 2⌊n/2⌋ × n. One example of a board hitting this bound is by shifting all of the rows by half of the board size, then shifting all of the columns by half of the board size. (If n is odd, it doesn't matter whether we round down or round up.)In particular, this gives a lower bound of 36 for 6×6, which is better than the counting bound of 31, at least according to the formula in the Loopover Research spreadsheet. (I haven't verified it, but it seems roughly correct.)

Last edited: Wednesday at 6:39 AM