Giter Site home page Giter Site logo

rubiks-cube-solver-robot's Introduction

Rubik's Cube Solver Robot

Background

My friends and I decided to make a Rubik's cube mosaic for our AP Physics C semester final project. To create this mosaic, we realized it would be fun to make a Rubik's cube solver robot, feed it a bunch of cubes, and have it solve them to make a mosaic. We hope this repository documents, at least the software portion, of our project's progress. For more information about our development process and how robot works, please watch the YouTube video we created.

Acknowledgements

Huge thanks to Ansh Gandhi, Mukunth Nagarajan, Jonathan Ma, and Athul Krishnan for working on this project. Also many thanks to Mrs. Kumar for assigning this project and giving us the opportunity to explore our common interest in robotics for a school assignment.

How the Code Works

Here's a high level description of what happens:

  1. The user specifies the initial cube state.
    1. The default form of input is through computer vision. Our vision code is basically copied, with some tweaks, from my original Rubik's cube solver project (which you can check out here). The color detection is tuned for a Gan 354 but also works with the Gan 11 Pro. I'm sure it works well with other cubes, although those haven't been extensively tested.
    2. The other form of input is through a cube string. This contains capital letters representing the different colors on the Rubik's cube. For example, WWWWWWWWWRRRRRRRRRGGGGGGGGGYYYYYYYYYOOOOOOOOOBBBBBBBBB represents a solved cube, and WYWYWYWYWRORORORORGBGBGBGBGYWYWYWYWYOROROROROBGBGBGBGB represents a checkerboard pattern.
  2. The user specifies the final cube state.
    1. The default final state is a solved cube.
    2. The final state can also be defined using a cube string (as explained above).
  3. The user specifies the desired solving algorithm.
    1. The default algorithm is the Old Pochmann algorithm (typically used for blindfolded solves). We wrote this from scratch (hence all the Python files with op in their name).
    2. The other algorithm is the Kociemba algorithm. This is imported through the kociemba Python library. While it's computationally heavier than Old Pochmann, it's orders of magnitude more efficient in terms of move count. While Old Pochmann may generate a ~400 move solution, Kociemba can do it in around 20.
  4. The cube solution is printed in standard cubing notation.

rubiks-cube-solver-robot's People

Contributors

anshgandhi4 avatar jonathanjma avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

simrit1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.