{"id":28089254,"url":"https://github.com/prakharsinghongit/rubix-cube-solver-visualizer","last_synced_at":"2025-05-13T12:55:38.398Z","repository":{"id":281523354,"uuid":"945502864","full_name":"PrakharSinghOnGit/Rubix-Cube-Solver-Visualizer","owner":"PrakharSinghOnGit","description":"A Rubix Cube Solver And Visuilizer Web App","archived":false,"fork":false,"pushed_at":"2025-04-22T04:06:07.000Z","size":3417,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T06:15:57.863Z","etag":null,"topics":["algorithm","daa","dsa","react","rubix-cube","wasm"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PrakharSinghOnGit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-09T15:23:19.000Z","updated_at":"2025-04-22T04:06:11.000Z","dependencies_parsed_at":"2025-03-09T17:42:32.236Z","dependency_job_id":null,"html_url":"https://github.com/PrakharSinghOnGit/Rubix-Cube-Solver-Visualizer","commit_stats":null,"previous_names":["prakharsinghongit/rubix-cube-algorithm-compare-and-visualize","prakharsinghongit/rubix-cube-solver-visualizer"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharSinghOnGit%2FRubix-Cube-Solver-Visualizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharSinghOnGit%2FRubix-Cube-Solver-Visualizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharSinghOnGit%2FRubix-Cube-Solver-Visualizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PrakharSinghOnGit%2FRubix-Cube-Solver-Visualizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PrakharSinghOnGit","download_url":"https://codeload.github.com/PrakharSinghOnGit/Rubix-Cube-Solver-Visualizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253948333,"owners_count":21988953,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithm","daa","dsa","react","rubix-cube","wasm"],"created_at":"2025-05-13T12:55:37.680Z","updated_at":"2025-05-13T12:55:38.383Z","avatar_url":"https://github.com/PrakharSinghOnGit.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rubik's Cube Solver\n\nA comprehensive project for solving NxN Rubik's Cubes using various algorithmic techniques. This application provides a 3D visualization of the cube, implements multiple solving algorithms, and includes a benchmarking system to compare their performance.\n\n## Features\n\n- **Interactive 3D Visualization**: Manipulate and view the Rubik's Cube from any angle using Three.js\n- **Multiple Solving Algorithms**:\n  - Brute Force (for 2x2 cubes only)\n  - Layer-by-Layer (LBL) Method\n  - Kociemba's Two-Phase Algorithm\n  - Thistlethwaite's Algorithm\n  - Neural Network Approach (simulated)\n- **Benchmarking System**: Compare the performance of different algorithms in terms of time, moves, and success rate\n- **Step-by-Step Solution Playback**: View the solution steps and play them back at different speeds\n- **Support for Different Cube Sizes**: 2x2, 3x3, 4x4, and 5x5 cubes\n\n## Technologies Used\n\n- **JavaScript**: Core programming language\n- **Three.js**: 3D visualization library\n- **Chart.js**: Data visualization for benchmarking results\n- **Webpack**: Module bundling\n- **Babel**: JavaScript transpiling\n\n## Getting Started\n\n### Prerequisites\n\n- Node.js (v14 or higher)\n- npm (v6 or higher)\n\n### Installation\n\n1. Clone the repository:\n\n   ```\n   git clone https://github.com/yourusername/rubiks-cube-solver.git\n   cd rubiks-cube-solver\n   ```\n\n2. Install dependencies:\n\n   ```\n   npm install\n   ```\n\n3. Start the development server:\n\n   ```\n   npm start\n   ```\n\n4. Open your browser and navigate to `http://localhost:8080`\n\n### Building for Production\n\nTo build the application for production:\n\n```\nnpm run build\n```\n\nThe built files will be in the `dist` directory.\n\n## Project Structure\n\n```\nrubiks-cube-solver/\n├── src/\n│   ├── components/\n│   │   ├── CubeView3d/            # 3D cube visualization\n│   │   ├── CubeView2d/           # 2D net view of cube\n│   │   ├── SettingsPanel/        # Cube controls and settings\n│   │   ├── SolverPanel/          # Algorithm selection\n│   │   ├── StatsPanel/           # Performance metrics display\n│   │   ├── LogsPanel/            # Move history and notation\n│   │   ├── Header/               # Application header\n│   │   └── ui/                   # Reusable UI components\n│   │       ├── Button/\n│   │       ├── PanelLabel/\n│   │       ├── ResizeHandle/\n│   │       └── MoveTable/\n│   ├── core/\n│   │   ├── cube.ts               # Cube state and logic\n│   │   ├── IDDFS.ts              # IDDFS solver implementation\n│   │   ├── IDAStar.ts            # IDA* solver implementation\n│   │   ├── CFOP.ts               # CFOP solver implementation\n│   │   └── Worker.ts             # Web Worker for background solving\n│   ├── types/                    # TypeScript type definitions\n│   ├── App.tsx                   # Main application component\n│   └── App.module.css            # Global styles\n├── public/                       # Static assets\n├── package.json                  # Project dependencies\n├── tsconfig.json                 # TypeScript configuration\n└── README.md\n\n```\n\n## UI Overview\n\n### Main Interface\n\n![UI](./src/assets/UI.png)\n\n### The interface consists of three main panels:\n\n1.**Control Panel** (Left):\n\n- Cube size selection\n- Scramble functionality\n- Manual move controls\n- Algorithm selection\n-\n- 2.**Visualization Panel** (Center):\n- 3D cube renderer with orbit controls\n- 2D net view of the cube\n- Resizable panels for optimal viewing\n\n  3.**Information Panel** (Right):\n\n- Algorithm statistics (move count, time taken)\n- Move history log\n- Solution steps\n\n### Solving Process\n\nWhen solving:\n\n1. Select an algorithm from the Solver panel\n2. Watch the step-by-step solution\n3. View performance metrics in real-time\n4. Replay or reverse any part of the solution\n\n## Algorithms\n\n### Brute Force\n\nThe brute force approach tries all possible move sequences until a solution is found. Due to the enormous search space (approximately 43 quintillion positions for a 3x3 cube), this approach is only feasible for 2x2 cubes or for finding optimal solutions for specific cases.\n\n### Layer-by-Layer (LBL)\n\nThe Layer-by-Layer method solves the cube one layer at a time, typically starting with the bottom layer, then the middle layer, and finally the top layer. This method is intuitive and commonly used by human solvers.\n\n### Kociemba's Two-Phase Algorithm\n\nKociemba's algorithm divides the solution into two phases:\n\n1. Reduce the cube to a subgroup where only specific moves are needed\n2. Solve within that subgroup\n\nThis algorithm can find near-optimal solutions for 3x3 cubes.\n\n### Thistlethwaite's Algorithm\n\nThistlethwaite's algorithm breaks down the solution into four stages, each reducing the cube to a smaller subgroup:\n\n1. G0 -\u003e G1: Orient all edges\n2. G1 -\u003e G2: Place M-slice edges in M-slice, orient all corners\n3. G2 -\u003e G3: Place E-slice edges in E-slice, U corners in U face, D corners in D face\n4. G3 -\u003e G4: Solve the cube\n\nThis approach significantly reduces the search space and can find solutions with a reasonable number of moves.\n\n### Neural Network Approach\n\nThis approach uses machine learning techniques to learn solving strategies. While still experimental, neural networks show promise in developing efficient solving strategies.\n\n## Real-World Applications\n\nThe algorithms used to solve Rubik's Cubes have applications beyond the puzzle itself:\n\n- **AI and Search Algorithms**: The techniques used to navigate the vast state space of a Rubik's Cube are applicable to other complex search problems.\n- **Robotics**: The manipulation sequences and pattern recognition used in cube solving inform robotic movement planning and object manipulation.\n- **Logistics and Optimization**: The group theory and state-space reduction techniques have applications in scheduling, routing, and other optimization problems.\n- **Parallel Computing**: Distributing the search for Rubik's Cube solutions demonstrates principles of parallel algorithm design that apply to other computationally intensive tasks.\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Acknowledgments\n\n- Ernő Rubik for inventing the Rubik's Cube\n- Herbert Kociemba for the Two-Phase Algorithm\n- Morwen Thistlethwaite for Thistlethwaite's Algorithm\n- The Three.js team for the amazing 3D library\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprakharsinghongit%2Frubix-cube-solver-visualizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprakharsinghongit%2Frubix-cube-solver-visualizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprakharsinghongit%2Frubix-cube-solver-visualizer/lists"}