Skip to content

Pri0r/cube-solver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rubik's Cube Solver

A Prolog-based Rubik's cube solver that utilizes Iterative Deepening Depth-First Search (IDDFS) to find the shortest sequence of moves to solve a given cube state.

Build

make

Usage

./flp24-log < input_file

Move Sets

The allowed moves can be configured in moves.pl by modifying the allowedMoves/1 predicate:

Mode Description Allowed Moves
'basic' Standard moves 18 basic moves (U, Rp, F...)
'more' Basic moves + Double turns 18 basic moves + 9 double turns (U2, R2...)
'all' Full move set + Rotations All of the above + 9 rotations (x, y, z...)

Running Tests

Test cases can be run and verified with diff:

./flp24-log < tests/test1.in > out
diff tests/test1.out out

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors