{"id":20304379,"url":"https://github.com/dev-michael-schmidt/ai-rubik-cube","last_synced_at":"2026-06-06T12:31:08.311Z","repository":{"id":106652796,"uuid":"165581297","full_name":"dev-michael-schmidt/ai-rubik-cube","owner":"dev-michael-schmidt","description":"Sovle a rubik's cube using an A* algorithm","archived":false,"fork":false,"pushed_at":"2019-02-24T18:43:29.000Z","size":38,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-04T07:13:55.187Z","etag":null,"topics":["a-star","python3","rubiks-cube-scrambler","rubiks-cube-solver"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dev-michael-schmidt.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2019-01-14T02:21:00.000Z","updated_at":"2020-12-19T04:34:23.000Z","dependencies_parsed_at":null,"dependency_job_id":"0df8b295-e6e9-4bb0-881d-a17fb117312e","html_url":"https://github.com/dev-michael-schmidt/ai-rubik-cube","commit_stats":null,"previous_names":["dev-michael-schmidt/ai-rubik-cube"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/dev-michael-schmidt/ai-rubik-cube","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-michael-schmidt%2Fai-rubik-cube","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-michael-schmidt%2Fai-rubik-cube/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-michael-schmidt%2Fai-rubik-cube/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-michael-schmidt%2Fai-rubik-cube/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dev-michael-schmidt","download_url":"https://codeload.github.com/dev-michael-schmidt/ai-rubik-cube/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dev-michael-schmidt%2Fai-rubik-cube/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33983046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-06T02:00:07.033Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["a-star","python3","rubiks-cube-scrambler","rubiks-cube-solver"],"created_at":"2024-11-14T16:44:02.084Z","updated_at":"2026-06-06T12:31:08.286Z","avatar_url":"https://github.com/dev-michael-schmidt.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ai-rubik-cube\nSovle a rubik's cube using the A* algorithm.\n\n### Requirements\nYou can create a virtualenv and use `pip install -r requirements.txt`, but at the moment the only dependency is numpy.\n\n## `class RubikCube` methods\n\nThe internal representation of the rubik cube is a `numpy.ndarray()` with a `(9, 12)` shape.\n\n- `RubikCube.__init__(self)` Create a new instance of a RubikCube()\n- `RubikCube.__str__(self)` Return a string of the internal representation.\n\n```\n\u003e\u003e\u003e rc = RubikCube()\n\u003e\u003e\u003e print(rc)\n      W W W\n      W W W\n      W W W\nG G G R R R B B B O O O\nG G G R R R B B B O O O\nG G G R R R B B B O O O\n      Y Y Y\n      Y Y Y\n      Y Y Y\n\u003e\u003e\u003e\n```\n- `RubikCube.scramble(self, moves=5000)` Scramble the rubik cube.\n- `RubikCube.x_rotate(self, slot, direction)` perform a single rotation on the x axis.\n\n```\n\u003e\u003e\u003e rc.x_rotate('top', 'left')\n\u003e\u003e\u003e rc.x_rotate('bottom', 'right')\n\u003e\u003e\u003e print(rc)\n      W W W\n      W W W\n      W W W\nY Y Y G G G O O O B B B\nB B B Y Y Y G G G O O O\nO O O B B B Y Y Y G G G\n      R R R\n      R R R\n      R R R\n\u003e\u003e\u003e\n\n```\n- `RubikCube.y_rotate(self, slot, direction)` perform a single rotation on the y axis.\n\n```\n\u003e\u003e\u003e rc.y_rotate('left', 'up')\n\u003e\u003e\u003e rc.y_rotate('right', 'down')\n\u003e\u003e\u003e print(rc)\n      Y W O\n      Y W O\n      Y W O\nB B B R Y W G G G R O W\nB B B R Y W G G G R O W\nB B B R Y W G G G R O W\n      O R Y\n      O R Y\n      O R Y\n\u003e\u003e\u003e\n```\n\n- `RubikCube.z_rotate(self, slot, direction)` perform a single rotation on the z axis.\n\n```\n\u003e\u003e\u003e rc.z_rotate('front', 'clockwise')\n\u003e\u003e\u003e rc.z_rotate('back', 'anti-clockwise')\n\u003e\u003e\u003e print(rc)\n      B B B\n      W W W\n      G G G\nW G Y R R R W B Y O O O\nW G Y R R R W B Y O O O\nW G Y R R R W B Y O O O\n      B B B\n      Y Y Y\n      G G G\n\u003e\u003e\u003e\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-michael-schmidt%2Fai-rubik-cube","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdev-michael-schmidt%2Fai-rubik-cube","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdev-michael-schmidt%2Fai-rubik-cube/lists"}