Skip to content

KaushikBh/rubiksCube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Rubik's Cube Solver

Kaushik Bhattacharjee | Colorado State University - CS 440 - Artificial Intelligence Project

Problem

Given any Rubik's Cube state, return a list of moves to solve the Rubik's RubikCube using Korf's IDEA* Algorithm.

Solution Steps

  • Represent a 3D rubikCube in a 2D state
  • Generate 3 pattern databases: corner cubies, edge cubies set 1, edge cubies set 2
  • Perform Iterative Deepening astar (IDA*) search on the possible moves using the 3 above pattern databases as the heuristic look up
  • Return an optimal solution in the form of the face to turn and how many clockwise turns to make

Relaxed Constraints

  • Handled only clockwise turns of a face

Running the Solver

Compile the Java source files in src directory:

  • cd src
  • javac *.java

To generate the heuristic lookup tables, run below commands in src directory

  • chmod 755 createHeuristics.sh
  • ./createHeuristics.sh

To solve a rubikCube from a file run following command:

  • java -Xmx2g RubikCube "input file path"

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published