/cubecalc

Simple C program which calculates all Rubik's cube positions using threads and low memory data structures

Primary LanguageCApache License 2.0Apache-2.0

Cubecalc

The idea

At our company me and mine collagues share the passion for Rubik’s cube, personally I developed many programs trying to solve the Rubik’s cube when finally an idea! Why not to use the knowledge that our company gave us and develop a software that can easilly solve ANY Rubik’s cube? Well, this repository isn’t about solving Rubik’s cube but actually the opposite calculate all the positions ans save the result in a file for database import, and here will come a future software for import and solve the cube but you’ll see as times goes on ;-)

Actual implementation

Warning
This project is at ALPHA and EXPERIMENTAL level and is not suitable for any kind of production environments (even if the license lets you use it as you prefer).

The software will handle:

  • Fast storage of cube status using a known storage structure based on two arrays monitoring position and orientation of each cubie.

  • Concurrent processing of the positions (at least 18 threads will run simultaneously).

  • Storage management from dedicated thread so each "calculator thread" can focus exclusively on calculating positions.

  • Small solutions file size (10 bytes for each cube should be enough)

This piece of code will be developed with the suggestions (and maybe the help) of my dear friend kevinpirola. This project is available in Java implementation (slower…​ sigh) on his github here