Skip to content

Edd12321/cubeterm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

           __       __              
 ______ __/ /  ___ / /____ ______ _ 
/ __/ // / _ \/ -_) __/ -_) __/  ' \
\__/\_,_/_.__/\__/\__/\__/_/ /_/_/_/
- The simple 3x3x3 solver, Mk. I -
====================================
This is a program that uses popular speedsolving methods such as ZZ or Roux to solve the 3x3x3 ("Rubik's") cube. It cannot solve a cube using a computer-specific algorithm such as Korf, Kociemba, or Thistlethwaite.
The software is implemented in less than 1K SLOC of C++, and it uses simple techniques such as IDDFS to reliably solve a cube in a reasonable time (the process might take anywhere from 10 seconds to 2 minutes depending on the scramble), using the aforementioned human methods' step restrictions as heuristics. This is not professional solving software, given that it was only implemented for fun as a personal challenge, and as an exercise in minimalism.

Installation instructions:
--------------------------
```
$ cd cubeterm
$ make
$ bin/cubeterm [args...]
```
You may now copy the compiled executable into your $PATH, if you wish.

WebUI
-----
Cubeterm has a WebUI implemented in PHP. The default password is `password`. If you wish to change it, edit the `password.md5` file, and replace the hash with something else.

Average solving time/movecount per method:
------------------------------------------
 - CFOP    (Cross, F2L, OLL, PLL)              ~0.5-10    (~59ETM)
 - ZZ:     (EOLine, LB, RB, ZBLL)              ~7-23s     (~42ETM)
 - Petrus: (2x2x2, 2x2x3, EO, F2L, COLL, EPLL) ~6-10s     (~49ETM)
 - Roux:   (FB, SB, CMLL, LSE)                 ~10-40s    (~35ETM)
 - 2GR:    (EOPair, CPLine, Block, F2L, 2GLL)  ~10-30s    (~45ETM)

Command-line arguments:
-----------------------
To pass a scramble to the program, use the `-s` flag, followed by another argument which contains the moves in standard 3x3x3 notation.

You may also use the `-r` CLI flag, followed by a number `n`. The program will attempt to generate a scramble using a random `n` move-long sequence.

If no method is provided, ZZ will be used as the default.

To use a different solving method, use the `-m` flag, followed by said method's name.

To run an interactive cube simulator, use `-v`.

If invalid arguments are provided, a help message will be displayed.

Algorithm scraping:
-------------------
To find nicer algs, you can attempt scraping them from SpeedCubeDB, if the website's users ever find better ones.
```
$ cd cubeterm
$ cd algs; ./scraper.zrc
$ cd ..; make
```

Cube preview:
-------------
Cubeterm provides a small TUI-style representation of the scrambled puzzle, alongside the scramble notation, and the solution steps.

Modularity:
-----------
The software is easy to modify and add new methods to. You typically only want to modify `src/main.cpp` or `src/alg.cpp`. To change the algs, you only have to modify the text files containing them, then recompile the program (please note that using the scraper will always reset all changes made to these files).

Have fun!

About

Reasonably fast twisty puzzle solver

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published