Skip to content

Instantly share code, notes, and snippets.

@insertinterestingnamehere
Last active March 12, 2022 17:36
Show Gist options
  • Save insertinterestingnamehere/a149f8a1cf4c600936052cd632c1708a to your computer and use it in GitHub Desktop.
Save insertinterestingnamehere/a149f8a1cf4c600936052cd632c1708a to your computer and use it in GitHub Desktop.
Different Possible Configurations of the MF8 Crazy Doderhombus
143 configurations other than all ones
Numbers correspond to the faces in this order:
white, pink, yellow, tan, green, light blue, light green, blue, orange, purple, gray, red
default: (1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1)
(0, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 0)
(0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1)
(0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0)
(0, 0, 0, 1, 0, 1, 1, 0, 1, 1, 0, 1)
(0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
(0, 0, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1)
(0, 0, 0, 0, 0, 1, 0, 1, 0, 1, 1, 0)
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)
(0, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1)
(0, 0, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0)
(0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 1, 1)
(0, 0, 0, 1, 0, 1, 0, 1, 0, 1, 1, 1)
(0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1)
(0, 0, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0)
(0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 0)
(0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 0)
(0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 1, 1)
(0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0)
(0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 0, 1)
(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 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, 1, 1, 1, 1)
(0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1)
(0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0)
(0, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1)
(0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 1)
(0, 0, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1)
(0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 1, 1)
(0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
(0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0)
(0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1)
(0, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1)
(0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0)
import itertools
# Here's the color scheme on my puzzle:
# Facing a 4-sided corner, starting with a side up, going clockwise
# white, pink, yellow, tan,
# Then going clockwise around the middle layer,
# dark green is next to white and pink, then light blue, light green, dark blue,
# then going around the back clockwise (without reorienting),
# orange is next to dark blue and dark green, then purple, gray, and red.
# Number them like this:
# 0: white
# 1: pink
# 2: yellow
# 3: tan
# 4: green
# 5: light blue
# 6: light green
# 7: blue
# 8: orange
# 9: purple
# 10: gray
# 11: red
names = ['white', 'pink', 'yellow', 'tan', 'green', 'light blue',
'light green', 'blue', 'orange', 'purple', 'gray', 'red']
reflection = [0, 3, 2, 1, 7, 6, 5, 4, 8, 11, 10, 9]
rot0 = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]
rot1 = [1, 2, 3, 0, 5, 6, 7, 4, 9, 10, 11, 8]
rot2 = [2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9]
rot3 = [3, 0, 1, 2, 7, 4, 5, 6, 11, 8, 9, 10]
rot4 = [4, 9, 5, 1, 8, 10, 2, 0, 7, 11, 6, 3]
rot5 = [5, 10, 6, 2, 9, 11, 3, 1, 4, 8, 7, 0]
rot6 = [6, 11, 7, 3, 10, 8, 0, 2, 5, 9, 4, 1]
rot7 = [7, 8, 4, 0, 11, 9, 1, 3, 6, 10, 5, 2]
rot8 = [8, 11, 10, 9, 7, 6, 5, 4, 0, 3, 2, 1]
rot9 = [9, 8, 11, 10, 4, 7, 6, 5, 1, 0, 3, 2]
rot10 = [10, 9, 8, 11, 5, 4, 7, 6, 2, 1, 0, 3]
rot11 = [11, 10, 9, 8, 6, 5, 4, 7, 3, 2, 1, 0]
rotations = [rot0, rot1, rot2, rot3, rot4, rot5,
rot6, rot7, rot8, rot9, rot10, rot11]
def compose_permutations(p1, p2):
assert len(set(p1)) == len(p1)
assert len(set(p2)) == len(p2)
return [p2[ix] for ix in p1]
# Add in rotating the face in position 0 180 degrees.
rot_face = [0, 7, 8, 4, 3, 11, 9, 1, 2, 6, 10, 5]
rotations = rotations + [compose_permutations(rot_face, rot) for rot in rotations]
reflected_rotations = [compose_permutations(rot, reflection) for rot in rotations]
equivalences = rotations + reflected_rotations
# Now get the puzzle variants that aren't equivalent
# under rotation/reflection
# Make sure the default is in the list and not its mirror image.
default = (1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1)
configurations = {default}
for config in itertools.product([0, 1], repeat=12):
equivalent_configs = [tuple([config[ix] for ix in equiv]) for equiv in equivalences]
for equiv in equivalent_configs:
if equiv in configurations:
break
else:
configurations.add(tuple(config))
# Remove the all ones configuration since
# that's equivalent to a standard doderhombus.
configurations.remove((1,) * 12)
print(len(configurations), "configurations other than all ones")
print("Numbers correspond to the faces in this order:")
print("white, pink, yellow, tan, green, light blue, light green, blue, orange, purple, gray, red")
print("default:", default)
for config in configurations:
if config != default:
print(config)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment