Skip to content

Commit

Permalink
Merge branch 'main' into trie
Browse files Browse the repository at this point in the history
  • Loading branch information
calebeby committed May 7, 2023
2 parents fd511a9 + c8422de commit 6344b3e
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,19 @@
- https://dino-starminx--twisty-puzzles.netlify.app/
- https://compy-cube--twisty-puzzles.netlify.app/
- https://starminx--twisty-puzzles.netlify.app/

Ideas going forward:

- Phased solving (by piece type)
- Evaluation of "distance from solved"

Currently:

- Number of piece faces that are correct
- Number of pieces that are correct

Future:

- Minimum number of turns for each piece to be in the correct position and oriented correctly

- Continue to integrate trie for most-similar move set to minimize metamove effects and see how it works
3 changes: 3 additions & 0 deletions rust/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,6 @@ features = [

[profile.test]
opt-level = 3

[profile.release]
lto = true
25 changes: 25 additions & 0 deletions rust/src/puzzles.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,31 @@ pub fn rubiks_cube_3x3() -> TwistyPuzzle {
)
}

#[allow(dead_code)]
pub fn rubiks_cube_4x4() -> TwistyPuzzle {
let cube = cube();
TwistyPuzzle::new(
&cube,
&cube
.faces
.iter()
.enumerate()
.map(|(i, face)| {
CutDefinition::new(
RUBIKS_CUBE_CUT_NAMES[i],
face.plane().offset(-0.25),
TAU / 4.0,
)
})
.chain(
cube.faces[0..=2].iter().map(|face| {
CutDefinition::new_infer_name(face.plane().offset(-0.5), TAU / 4.0)
}),
)
.collect::<Vec<_>>(),
)
}

#[allow(dead_code)]
pub fn rubiks_cube_2x2() -> TwistyPuzzle {
let cube = cube();
Expand Down

0 comments on commit 6344b3e

Please sign in to comment.