SECS++ Cube Solver SECS++ is an intelligent, hybrid Rubik's Cube solver that combines a custom heuristic-driven A* search with a guaranteed optimal solver.
This package provides a robust and easy-to-use tool to find solutions for any valid 3x3 Rubik's Cube scramble. It first attempts to solve the cube using the innovative SECS++ algorithm. If the scramble proves too complex for the heuristic search, it seamlessly falls back to the powerful Kociemba algorithm to guarantee a correct and optimal solution.
Key Features Hybrid Solving Strategy: Prioritizes the custom A* search and uses Kociemba's algorithm as a robust failover, offering the best of both worlds.
Unique cubeeval Heuristic: Employs a novel heuristic that evaluates cube states based on both sticker misalignment and color entropy.
Simple API: A single function call to solve any scramble.
Phase-Based Logic: Breaks the problem down into logical stages (Cross, F2L, Last Layer) for its primary search.
Guaranteed Solutions: Never fails to solve a valid scramble.
Installation You can install the SECS++ Cube Solver directly from PyPI:
pip install secs-cube-solver
This package requires the kociemba-python library, which will be installed automatically as a dependency.
Quick Start & Usage Using the solver is straightforward. Import the main solve function from the package, provide a scramble string, and get the solution.
Here is a complete usage example:
Import the main solver function
from secs import solve
Define a scramble string (standard cube notation)
scramble = "R U R' U R U2 R' U"
print(f"Solving scramble: {scramble}")
Call the solver
The function returns the solution moves and the solver that found it
solution_moves, solver_type = solve(scramble)
Print the result
print(f"\nSolution found by: {solver_type}") print(f"Solved in {len(solution_moves)} moves:") print(' '.join(solution_moves))
Example Output:
Solving scramble: R U R' U R U2 R' U
Solution found by: SECS++ (A* with cubeeval heuristic) Solved in 8 moves: U' R U2 R' U' R U' R'
The SECS++ Algorithm The primary solver uses a phased A* search algorithm. The intelligence of this search is guided by a custom heuristic function, cubeeval(n), which evaluates the "cost" of any given cube state n.
The A* formula is: f(n)=g(n)+ textcubeeval(n)
Where:
g(n) is the number of moves already taken.
cubeeval(n) is our unique heuristic: a cdotH_diff(n)+b cdotE(n)
H_diff(n) measures sticker misalignment.
E(n) is a novel metric for color entropy (disorder) on each face.
If the A* search cannot find a solution within its configured limits, the package automatically calls Kociemba's algorithm to ensure a correct and optimal solution is always returned.
Author P. Jeba Selvan Andrew
GitHub Profile
License This project is licensed under the MIT License. See the LICENSE file for details.
Metadata
Release files for secspp 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| secspp-0.1.2.tar.gz | 13.7 kB | Without provenance | Details for secspp-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| secspp-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for secspp-0.1.2-py3-none-any.whl |
Total release size: 27.6 kB
Release files / secspp-0.1.2.tar.gz
| Download URL | secspp-0.1.2.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cef4214c22696584735a548daeb0725bdbf5dfb6d6a1606da8f125ff8a50c773
|
|
BLAKE2b-256 checksum How to use checksums |
5cc5945f46de049120ad752f8d865d0cf7bf6e863ec309eb2d88599434768f88
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Release files / secspp-0.1.2-py3-none-any.whl
| Download URL | secspp-0.1.2-py3-none-any.whl |
|---|---|
| Size | 14.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
28c5252ac66f4309b87492bd31d08467239eda3800b2f52d3d060c24ee6b9e7a
|
|
BLAKE2b-256 checksum How to use checksums |
64938dc7d0479ef14cb59184b93e49a2b929531fb213c8213bd9ea064be19d12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.0
|
Security for secspp 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.