Coding Challenge: 2x2 Rubik's Cube Depth?

preview_player
Показать описание
This video is long. Skip to 14:35 if you only care about the solution.

Breakdown:
0:00 - Intro
1:15 - Problem Explanation
5:02 - Solution Explanation
7:58 - Code Walkthrough
14:25 - Program Execution

For those interested in the code, here is the repository link:

Information about the 3x3 depth solution:

Verify my results from the table on the wiki page!

If I am missing any information or you have any further questions, feel free to leave a comment.

Videos like this take a decent amount of work. If you enjoyed it, don't forget to like, share, and subscribe!
Рекомендации по теме
Комментарии
Автор

This is actually a really good video. I've been trying to search for so long on how these worked and now I finally learned. You are my saving grace.

jubooty
Автор

Lol I come from both, cubing and coding.

zenthaa
Автор

That's cool i wrote mine like this years back using IDDFS but initially I started it using this method. IDDFS is what I use with my other solvers. It's much less resource heavy and quicker than what I first tried. Awesome work!

CScuber
Автор

Very good video, i used this kind of search algorithm to generate lookup tables for my implementation of the thistlethwaite algorithm for the 3x3

jdcun
Автор

Thank you for this video. I have a question. I have checked your repository and you imply that the solved position begins with "WWWW", meaning white on top. But what if you flip the cube so there is another color on top but the cube is still solved? How do you cover this situation?

Giannis_Krimitzas
Автор

Hello reader
I just made a list for each side and made a sprite/object for each piece. Visually. No rotation. Stationary. No animation. Just swapping colors for moves (R, U' etc...)
So thats how I did it. Just wanted to share

leobozkir
Автор

Nice video. Really interesting. Without having it tested myself, i think the first condition *sub_pos not in dist[-1]* in line 18 is not necessary because it is a set. Does it improve speed?

Pssbbby
Автор

Hi there. I was using lists instead of using set to do the whole same thing but it was taking me forever to get the depth and I couldn't get any answer after Level 9 as the program kept on running. Could you care to clarify why is that so?

saurabhjaiswal
Автор

I still don't know anything about programming, but nonetheless I watched the whole video just cuz I want to learn random stuff haha. Nice video to start off the channel!

franciscohamlin
Автор

i can solve but i can't code that's why i watch

samuFring