Color Wheel combinatorics
Over the weekend I was introduced to a Looney Labs pyramid game called “Color Wheel.” This is a solitaire (or purely cooperative) game similar to peg solitaire. It’s played on a decagonal 40-space board, with three trios of pyramids in each of seven colors: 63 pieces total.
After populating the board with 40 random pyramids from the stash such that no two adjacent pyramids share a color, your goal is to use the fewest moves to finish the game — where a “move” swaps two pyramids of the same color and/or size, and the game is “finished” when each color occupies its own contiguous region of the board.
The official rules encourage you to finish the game within 27 moves, mainly because the Pyramid Arcade box happens to contain 27 more pyramids, and you use those to keep score. If the game had said “within 23 moves,” then you could have used the 23 leftover colored pyramids to keep score instead.
How many possible Color Wheel setups are there in total?
A quick Monte Carlo experiment suggests that there are just slightly fewer than \(10^{83}\) distinct Color Wheel setups, up to rotation and reflection. There are about 1000 times that many distinct midgame positions (i.e. positions flouting setup’s no-color-adjacency criterion). Both kinds of positions have an average branching factor of roughly 327 (standard deviation about 5).
What fraction of Color Wheel setups are solvable within 27 moves? Within 23?
I have no idea. Pretty trivially we can observe that every Color Wheel game must take at least six moves to complete: Each move can at best reduce 8 connected components to 2 (a decrease of 6); 5 moves can reduce the initial 40 components only to 10, while no solution has more than 7 components. It’s easy to construct a valid setup that’s solvable in seven moves. I doubt that any valid setup is actually solvable in just six.

How about the number of moves that suffices to solve any setup — what’s God’s Number for Color Wheel? I’ve got only another trivial observation: the 40 pyramids on the board can be selection-sorted into any configuration at all using no more than 39 unconstrained swaps, and any unconstrained swap can be simulated by at most 5 valid moves. (If the pieces match in size, swap them in one move; otherwise, if any of the six pieces that share color with one and size with the other is on the board, use three swaps; otherwise, find \(p_1, p_2\) of the same size, \(p_1\) sharing color with one and \(p_2\) sharing color with the other, and use five swaps.) That gives us a comically loose upper bound — 195 moves certainly suffice.
Challenge: Write a Color Wheel solver.
Here’s a vibe-coded Color Wheel solver that can do the average board in about 33.8 moves (standard deviation about 4.5); the worst case I’ve seen so far took 50 moves. This is dramatically worse than the rules’ suggestion of 27 moves! Is that more readily explained by the badness of this solver’s heuristics, or by the conjecture that most Color Wheel boards are not solvable in 27 moves?

The Python code that generated that plot was:
import matplotlib.pyplot as plt
plt.hist(values, bins=[x-0.5 for x in range(20, 52)], edgecolor="white", color="#4f81bd")
plt.xticks(range(20, 51, 2))
plt.xlabel("Number of moves taken by the heuristic solver")
plt.show()
