--- id: magiccube version: "1.2.0" license: BSD-3-Clause license_treatment: permissive maintenance: aging --- # magiccube — NxNxN Rubik Cube implementation License: permissive · Maintenance: aging · Downloads: 485.9K/mo ## What it is and what it does MagicCube is a Python library for creating and manipulating Rubik cubes of any size from 2x2x2 up to 100x100x100. It provides fast rotation operations using numpy, making it suitable for cube simulations and algorithm testing. The library supports standard cube notation (L, R, U, D, F, B moves and their variants) plus advanced extensions like wide rotations and layer-specific moves. The package includes a BasicSolver that can solve 3x3x3 cubes using the beginner method, and a move optimizer that simplifies move sequences by eliminating redundant rotations, converting triple moves to inverses, and removing unnecessary cube rotations. It's designed for developers building cube solvers, simulations, or educational tools. Use it for: - Build a Rubik cube solver or algorithm tester by creating cubes and applying move sequences. - Simulate cube scrambles and track state changes for educational or competitive analysis. - Optimize move sequences for cube-solving algorithms to reduce the number of rotations needed. - Generate and validate cube states in Kociemba order for advanced solving techniques. - Create visualizations or games that require fast cube state manipulation and rotation. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. MagicCube implements NxNxN Rubik cubes with fast rotations and includes a solver for 3x3x3 cubes and a move optimizer. Yes, if you need a fast, permissively licensed Rubik cube library. The low install friction, Production/Stable status, and recent updates make it reliable for simulations and solver development. The aging maintenance signal (474 days since last release) is a minor concern for long-term support, but no known vulnerabilities and active repository history suggest stability. Not necessary if you only need basic cube representation without solving or optimization. ## Install pip install magiccube uv add magiccube poetry add magiccube ## Installing magiccube Before you install: Low install friction with a pure-wheel distribution and a single runtime dependency on numpy. The package is marked Production/Stable and has received updates as recently as April 2025, though the last commit was September 2025 and the project shows aging maintenance signals. License in practice: BSD-3-Clause is a permissive license that allows commercial and private use with minimal restrictions, requiring only attribution and inclusion of the license text. Quickstart: pip install magiccube import magiccube cube = magiccube.Cube(3, "YYYYYYYYYRRRRRRRRRGGGGGGGGGOOOOOOOOOBBBBBBBBBWWWWWWWWW") cube.rotate("R' L2 U D' F B'2 R' L") from magiccube import BasicSolver solver = BasicSolver(cube) solver.solve() Requires Python 3.9 or later. Verify before relying: - Whether the BasicSolver works reliably for all 3x3x3 configurations or only specific starting states. - Performance characteristics and whether the package is suitable for large-scale simulations beyond basic use. - Whether the move optimizer handles all edge cases or has known limitations in notation parsing. ## Package facts - License: BSD-3-Clause (permissive) - Python support: supports_current - Install friction: low - Maintenance: aging - Downloads: 485.9K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags rubik cube solver python, nxnxn cube implementation, cube rotation simulation, rubik cube simulator, cube move optimizer, rubik cube library, cube state manipulation, simulation, puzzle-solver, algorithm-development [View on SkillFed](https://skillfed.io/packages/magiccube) · [View on PyPI](https://pypi.org/project/magiccube/)