{"id":17770094,"url":"https://github.com/j3rn/rubiks","last_synced_at":"2026-02-03T18:01:37.623Z","repository":{"id":152156802,"uuid":"522979749","full_name":"J3RN/rubiks","owner":"J3RN","description":"J3RN's Rubik's Cube Solvers","archived":false,"fork":false,"pushed_at":"2025-02-21T18:43:53.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-01T14:26:02.093Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Prolog","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/J3RN.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,"zenodo":null}},"created_at":"2022-08-09T14:17:07.000Z","updated_at":"2025-02-21T18:43:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"bb0de881-be2c-44c4-8604-da508a5b70ef","html_url":"https://github.com/J3RN/rubiks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/J3RN/rubiks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J3RN%2Frubiks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J3RN%2Frubiks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J3RN%2Frubiks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J3RN%2Frubiks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/J3RN","download_url":"https://codeload.github.com/J3RN/rubiks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/J3RN%2Frubiks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262678940,"owners_count":23347455,"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":[],"created_at":"2024-10-26T21:20:31.495Z","updated_at":"2026-02-03T18:01:32.582Z","avatar_url":"https://github.com/J3RN.png","language":"Prolog","funding_links":[],"categories":[],"sub_categories":[],"readme":"J3RN's Rubik's Cube Solvers\n===========================\n\nRight now there's only a 2x2 solver, and it finds solutions in ~45s on my machine with SWI-Prolog.  I intend to add a 3x3 solver eventually, but feel that I should probably find a way to optimize my general algorithm such that it will finish before the heat death of the universe.\n\n### Mapping from Cube to Prolog\n\nUse this image as a general guide:\n\n![A 2x2 Rubik's cube. The top face is labeled \"A\", left face is labeled \"B\", and the right face is labeled \"C\". One each side, the four tiles are labeled 1-4 clockwise from the top-left.](rubiks_labeled.jpg)\n\nThe top face is \"A\", left face is \"B\", and the right face is \"C\". One each side, the four tiles are labeled 1-4 clockwise from the top-left.  Not shown in the image, but the face opposite of \"A\" is \"F\", the face opposite of \"B\" is \"D\", and the face opposite of \"C\" is \"F\".\n\n### Using the Program\n\nAfter loading the program `[two_by_two].`, you will use the `newsolve/2` clause to solve your cube like so:\n```\nnewsolve(Moves, Matrix).\n```\n\nThe `Matrix` variable should be a description of the cube; faces should be entered in letter order (A, then B, then C, ...) and tiles in number order (1, then 2, then 3, ...).  Each tile's color is represented by a one-letter atom; `y` for yellow, `o` for orange, etc.\n\nFor instance, if your cube looks like this:\n\n![](example.png)\n\nThen you would write:\n```\nnewsolve(Moves, [[y, o, b, y], [b, w, b, b], [r, y, r, y], ..., ..., ...]).\n```\n\nThe `...` for the last three lists are because the other three faces aren't visible and I haven't determined yet what they are.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj3rn%2Frubiks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj3rn%2Frubiks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj3rn%2Frubiks/lists"}