2023-11-26 21:29:23 +01:00
2023-11-26 21:29:23 +01:00
2023-11-26 21:29:23 +01:00
2023-11-26 21:29:23 +01:00
2023-11-26 21:29:23 +01:00
2023-11-26 21:29:23 +01:00
2023-11-26 21:29:23 +01:00
2023-11-26 21:29:23 +01:00
2023-11-26 21:29:23 +01:00
2023-11-26 21:29:23 +01:00
2023-11-26 21:29:23 +01:00

Pyramix analysis

This is a small rust program that evaluates every possible shape of the Pyraminx in an attempt to solve it from scratch.

It requires around 250MB of memory to run successfully, and by default prints every possible position along with its solution.

Position naming

Every piece has a position and an orientation.

The four corners are in a fixed position. I've numbered them in the order top, back, right, left. Their orientations are named according to how many counterclockwise turns are necessary to bring them into the correct orientation.

The 6 edge pieces are named according to their correct positions. First, the bottom layer: left, right, front. Next, the upper layer: back, right, front.

The orientations are named somewhat arbitrarily in a way that makes computation easy. Specifically, each corner rotation has an associated edge position that flips as eges rotate through it: the top corner flips edge 4 (upper right), the back edge flips edge (lower left), and the other two flip edge (lower front). This appears to produce a consistent naming, but this has not yet been proven.

Given this, cube positions are printed as follows: [edges]/[corners] The edges are given names from a-f according to where they belong, and they are printed in order based on what piece is actually there. The letter is capitalized if it is "flipped". The corners are printed in order, as + if it is rotated clockwise from its correct position, - if rotated counterclockwise, and , if it is rotated correctly.

Interesting facts

There are a total of 933,120 legal positions for the cube. There are a total of 3,732,480 possible configurations total, meaning that there are two different types of single-bit parity violations: these can be summarized as an ordering violation within the face. (e.g., acbdef is invalid), or an odd number of edges are flipped (e.g., abCdef is invalid)

Description
No description provided
Readme 42 KiB
Languages
Rust 95.7%
Nix 4.3%