Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>NOTE! This answer was written before the rotation requirement. Proceed at your own caution :)</p> <p>Here's my initial look at the problem.</p> <p>The first thing to do is calculate the parity of the exterior - +1 if it would fit 'stripes in corners', -1 if it would fit 'solids in corners', +0 if it's the 8 ball. This gives us a range from +12 to -12, and we aim for the extreme we are closer to. (If +0, pick +12 or randomly)</p> <p>For example, this is +1 +1 +1 -1 -1 +1 -1 -1 -1 +1 +0 -1 and thus it's -1 leaning solids in corners:</p> <pre><code>x o x x o x o x o 8 x o o x o </code></pre> <p>The next thing to do is move the 8 ball into the center. <em>If you can do two adjacent swaps with it that moves two balls into position, rather than a single adjacent swap that moves just one ball into position (or a single non-adjacent if it's in a corner), do so.</em></p> <pre><code>x o x x o x 8 x o o x o o x o </code></pre> <p>After we move the 8 ball, all combinations of two adjacent swaps sharing a ball can be produced by a non adjacent swap identically, so we have to consider far less complexity at once.</p> <p>Order all remaining moves by this priority:</p> <p>-A swap between two adjacent balls on the outside is 'worth 4' (2 if it's our last)</p> <p>-A swap between two adjacent balls, one on the outside, is 'worth 2' (1 if it's our last)</p> <p>-A swap between two balls on the outside is 'worth 2'</p> <p>-A swap between two balls, one on the outside, is 'worth 1'</p> <p>And perform them from top to bottom.</p> <p>So we move the o on the top, left (4), the o on the right side in (2), the o on the bottom left in (2) and then swap the x top with the o in the middle (2). We ended up doing five swaps in a 2-2-1 series, so three moves.</p> <pre><code>o x o x o x 8 x x o o o x x o </code></pre> <p>(Notably, this one would have been solved just as fast if we aimed for stripes in corners.)</p> <pre><code>x x o o x o 8 o x o x o x o x </code></pre> <p>I think it's impossible to require 4 turns, but I haven't proven it to myself yet.</p> <p>Another worked example:</p> <p>This has a parity of +1 so we aim for stripes in corners:</p> <pre><code>8 o o o x o o o x o x x x x x </code></pre> <p>swap 8 ball with center x (1-)</p> <pre><code>x o o o x o o o x o 8 x x x x </code></pre> <p>swap two adjacent on outer, 4 points (1-1)</p> <pre><code>x o o o x o o o x x 8 x o x x </code></pre> <p>swap adjacent edge into center, 2 points (1-2-)</p> <pre><code>x o o o x o o x o x 8 x o x x </code></pre> <p>swap edge to edge, 2 points (1-2-1-)</p> <pre><code>x o x o x o o x o x 8 x o o x </code></pre> <p>3 moves.</p> <p>EDIT: This works quite well for the example in the opening post, solving it in two moves:</p> <p>This has a parity of +1 so we aim for stripes in corners:</p> <pre><code>x x o o x o o x o o o 8 x x x </code></pre> <p>Swap 8 with x on edge then with o in center (solving two edges) (2-)</p> <pre><code>x x o o x o o x o o 8 x x o x </code></pre> <p>swap adjacent o and x on top and bottom left (solving four edges) (2-2-)</p> <pre><code>x o x o x o o x o x 8 x o o x </code></pre> <p>2 moves.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload