1 / 18

3x3x3 Rubik’s Cube Solver

3x3x3 Rubik’s Cube Solver. Kevin Van Kammen Kyle Rupnow Jason Lavrenz. Complexity. 8 corners, 12 middle edges, 6 centers 2*(12!)*3*(8!)*(6!) combinations = 8.8343e^16 combinations Conversion of visual algorithms to computer algorithms User interface. Visual Example. User Interface.

thea
Download Presentation

3x3x3 Rubik’s Cube Solver

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 3x3x3 Rubik’s Cube Solver Kevin Van Kammen Kyle Rupnow Jason Lavrenz

  2. Complexity • 8 corners, 12 middle edges, 6 centers • 2*(12!)*3*(8!)*(6!) combinations = 8.8343e^16 combinations • Conversion of visual algorithms to computer algorithms • User interface

  3. Visual Example

  4. User Interface • Microsoft Foundation Class • Randomly create cube • Manually create cube • Solve cube, output step by step instructions • Potentially allow user to manually solve

  5. Creating 3D cube • Cube is drawn as 54 separate polygons, need coordinates for all polygon points. • Want to be able to easily modify size/appearance. • Set reference points and cube size. • All other points determined from reference points and cube size – only do this solving once and store them in an array. • Each polygon then corresponds to certain points, referenced when updating the color of that polygon.

  6. Yellow points – reference points Red points – can all be solved knowing yellow’s coordinates The three yellow points in back can be adjusted for better looking cube Y - coordinate X - coordinate

  7. Final appearance Face 2 is a copy of face 1, offset. Face 5 is a copy of face 3, offset. Face 6 is a copy of face 4, offset.

  8. Making Moves Graphically • After each move is determined, an array of 54 contains the color of each block. • This array is read in by GUI and all blocks are updated with new colors.

  9. Cube Creation • Random creation algorithm • Start with a solved cube. • Perform a random number of random moves on the cube. • Each move is done in a random direction. • (uses three random number generators)

  10. Data Structure • One array that stores the entire cube • Arrays storing the indices of the corners and edges. • Each element of the corner (edge) array contains 3 (2) elements. • Arrays that stores the correct color and orientation for each piece.

  11. Solver Algorithm • Step 1 – Solve one face • Step 2 – Position and orient four corner pieces of opposite face • Step 3 – Solve this face completely • Step 4 – Position and orient final four faces

  12. Solve One Face for each corner of the top face find position of desired piece determine orientation of piece execute correct move based on orientation for each edge piece find position of desired piece determine orientation of piece execute correct move based on orientation and position

  13. Result after Part 1: • Turn the top so that the colors match the centers of the sides

  14. Step 2 – Position and Orient Corners of Opposite Face • Note: Because the top four corners are in the correct position, at least two corners on the bottom must be in the correct position. • Use this fact to perform step two.

  15. Step 2: find the correct corners correctly position the remaining corners (based on the location of the correct corners) for each edge piece determine the location of the desired edge line up the keyhole on top and the side on bottom execute the correct move based on the orientation of the edge piece.

  16. Finish Step 2: Determine the orientation of the keyhole created in step 2. Execute the appropriate move to fill in the keyhole. Note: at this point two of the faces are completely solved.

  17. Step 4 – Position and Orient Final Four Faces determine the location of a correct piece (if any) Iteratively perform a move based on the location of the correct pieces until all of the four edges are in the correct location (but not necessarily correctly oriented)

  18. Finish Step 4: determine if any edge pieces are incorrectly oriented. for each pair of incorrectly oriented edges perform “Rubes” move to correctly orient the edges

More Related