-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/kryzet/project_3x3_rubik_so…
- Loading branch information
Showing
1 changed file
with
9 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,23 @@ | ||
= A Message to Prof. @umaradeel | ||
= A Message to Prof. https://github.com/umaradeel[Umar Adeel] | ||
Hassan Khalloof <2024006840@aurak.ac.ae> | ||
|
||
Dear Professor Adeel, | ||
|
||
As freshmen in their first semester, we failed to come up with an algorithm for solving the 3x3x3 Rubik's cube, understand and implement an existing one, or implement a physical method such as CFOP. Here are the reasons why it was not possible in the given timeframe: | ||
|
||
NOTE: I have only found the reference in the first footnote more than one day ago. Every other reference was found more recently than that, and that can be attributed to the fact that neither @22003 (Hasnain Fayaz) nor I had prior experience to support us. | ||
NOTE: I have only found the reference in the first footnote more than one day ago. Every other reference was found more recently than that, and that can be attributed to the fact that neither https://github.com/22003[Hasnain Fayaz], my colleague who worked with me on this project, nor I, had prior experience to support us. | ||
|
||
. Solving a Rubik's cube randomly is infeasible, as the 3x3x3 Rubik's cube has ~10^20^ possible states, and so random moves, theoretically, would only get a scrambled cube to the solved state in extremely few cases. Therefore, an algorithm that prioritizes certain achievements along the path of solving the cube and ignoring the rest of the pieces is needed, and as freshmen who have not played with the Rubik's cube for long enough before starting work on this project, we do not know how to devise such a method or what it would look like, https://youtu.be/_Zv3YcQeNVI?si=SChQUb4ncx41fF0H&t=255[if experience would have been of any help]. We only know at most one physical method that we learned for the competition you required our participate in as part of this project, and implementing that in code is quite difficult without machine learning or using https://kociemba.org/cube.htm[specialized software] to generate billions of possible cube states and optimal solutions for them, and then applying statistical methods, human intuition, an expert system, or more advanced AI to extract patterns, and since we cannot use the last two methods effectively, if at all, it is unknown how long such a process would take, especially if we develop the software ourselves due to lack of awareness about existing solutions (and understandably so because, again, we are freshmen who never played with the Rubik's cube before). | ||
. The existing programmatic methods of solving the 3x3x3 Rubik's cube require an understanding of group theoryfootnote:[Two such algorithms are https://www.jaapsch.net/puzzles/thistle.htm[Thistlethwaite's Algorithm] and https://kociemba.org/math/twophase.htm[Kociemba's Two-Phase Algorithm]] or graph theoryfootnote:polylog-algorithm[https://youtu.be/wL3uWO-KLUE?si=qtheTDomo_TZ0VYU[The method presented by Polylog] in a YouTube video on their channel that models all the possible states of a 3x3x3 Rubik's cube on a graph using some fundamental truths about it.], and neither @22003, my colleague who worked with me on this project, nor I, had more than a superficial understanding of these algorithms or the underlying math before this project, or the methods were unfeasible to demonstrate given the available resources. | ||
. Solving a Rubik's cube randomly is infeasible, as the 3x3x3 Rubik's cube has ~10^20^ possible states, and so random moves, theoretically, would only get a scrambled cube to the solved state in extremely few cases. Therefore, an algorithm that prioritizes certain achievements along the path of solving the cube and ignoring the rest of the pieces is needed, and as freshmen who have not played with the Rubik's cube for long enough before starting work on this project, we do not know how to devise such a method or what it would look like, https://youtu.be/_Zv3YcQeNVI?si=SChQUb4ncx41fF0H&t=255[if experience would have been of any help]. We only know at most one physical method that we learned for the competition you required our participate in as part of this project, and implementing that in code is quite difficult without machine learning. Another way to devise our own algorithm could have been using https://kociemba.org/cube.htm[specialized software] to generate billions of possible cube states and optimal solutions for them, and then applying statistical methods, human intuition, an expert system, or more advanced AI to extract patterns, and since we cannot use the last two methods effectively, if at all, it is unknown how long such a process would take, especially if the generation software was developed by us due to lack of awareness about existing solutions (and understandably so because, again, we are freshmen who never played with the Rubik's cube before). | ||
. The existing programmatic methods of solving the 3x3x3 Rubik's cube require an understanding of group theoryfootnote:[Two such algorithms are https://www.jaapsch.net/puzzles/thistle.htm[Thistlethwaite's Algorithm] and https://kociemba.org/math/twophase.htm[Kociemba's Two-Phase Algorithm]] or graph theoryfootnote:polylog-algorithm[https://youtu.be/wL3uWO-KLUE?si=qtheTDomo_TZ0VYU[The method presented by Polylog] in a YouTube video on their channel that models all the possible states of a 3x3x3 Rubik's cube on a graph using some fundamental truths about it.], and neither Hasnain nor I had more than a superficial understanding of these algorithms or the underlying math before this project. | ||
. Implementing a physical solving method such as CFOP, Roux, or ZZ is difficult, as even CFOP requires some degree of human intuition to be involved in a solve. Having only learned how to solve a 3x3x3 Rubik's cube as part of this project and never being exposed to it before, we are only able to solve it using that intuition. | ||
|
||
Given a semester's worth of time for doing any of the above using only the concepts taught in the course, none is possible without dedicating too much time to it, something that I have done at some point and that caused collateral damage to other courses. I was able, only today, to arrive at two ways a 3x3x3 Rubik's cube might be solvable, one that could take too long to executefootnote:[https://bruce.cubing.net/index.html[A Hamiltonian circuit for the 3x3 Rubik's cube], which is a sequence of quarter-turn (90° turns) moves that, if executed on a cube, will put it through all of its possible states without repeating any of them (at least according to the author). It is unknown how long that might take, but the shortest possible time for the worst case scenario might be achieveable by running a computer program on a computer with a very fast CPU clock and enough main memory.], and a simple explanation of how graph theory applies to the 3x3x3 Rubik's cube problem, which I mentioned earlierfootnote:polylog-algorithm[]. | ||
Given a semester's worth of time for doing any of the above using only the concepts taught in the course, none is possible without dedicating too much time to it, something that I have done at some point and that caused collateral damage to other courses. I was able, only today, to arrive at two ways a 3x3x3 Rubik's cube might be solvable, one that could take too long to executefootnote:[https://bruce.cubing.net/index.html[A Hamiltonian circuit for the 3x3 Rubik's cube], which is a sequence of quarter-turn (90° turns) moves that, if executed on a cube, will put it through all of its possible states without repeating any of them (at least according to the author). It is unknown how long that might take, but the compute power required to reach the solved state quickly enough might be equivalent to the graph-based method, and possibly produce a solution with far too many moves. On the other hand, the graph method will produce a solution that is https://cube20.org[at most 20 moves long]], and a simple explanation of how graph theory applies to the 3x3x3 Rubik's cube problem, which I mentioned earlierfootnote:polylog-algorithm[]. However, executing a program utilizing the graph-based method requires computing resources which we do not know how to obtain, rendering the method infeasible. | ||
|
||
There is a method I devised with the assistance of ChatGPT that I have not, to the moment of this writing, started implementing, and you can see why in the commit history of this repository. It is inspired by the graph-based method mentioned earlierfootnote:polylog-algorithm[] and a search through Perplexity AIfootnote:[https://www.perplexity.ai/search/give-me-every-heuristic-algori-46yCoUWZQECUkM_lbq6_ng[Heuristic algorithms for A*-like graph pathfinding algorithms]] that revealed a technique for reducing the problem space, which is defining specific nodes on the graph (i.e. states) that have desirable positions relative to the other nodes on the graph. Such relative positions would result in evenly or near-evenly sized subgraphs with much fewer nodes, which would allow for multiple graph searches to finish much faster than one massive search of the complete graph. This way, by applying the graph-based algorithmfootnote:polylog-algorithm[] to each subgraph, we may be able to construct a path consisting of all paths found in each subgraph that leads from the given scramble to the solved state. If this program is implemented, https://github.com/heronyang/libcube[LibCube] should be made use of in order to simplify implementation. If the state space is divided enough (and therefore the resulting subgraphs are small enough), the subgraphs should be used to precompute lookup tables, which would result in much shorter runtimes for pathfinding than graph pathfinding algorithms. You can find my discussion with the LLM https://chatgpt.com/share/674b375e-f4a4-800a-bb2e-48cc44103988[here]. | ||
There is a method I devised with the assistance of ChatGPT that I have not, to the moment of this writing, started implementing, and you can see why in the commit history of this repository. It is inspired by the graph-based method mentionedfootnote:polylog-algorithm[] and a search through Perplexity AIfootnote:[https://www.perplexity.ai/search/give-me-every-heuristic-algori-46yCoUWZQECUkM_lbq6_ng[Heuristic algorithms for A*-like graph pathfinding algorithms]] that revealed a technique for reducing the problem space, which is defining specific nodes (called checkpoints from here onwards) on the graph (i.e. states) that have desirable positions relative to the other nodes on the graph. Splitting the graph into subgraphs, with said nodes being the center of each of them, would ideally result in evenly or near-evenly sized subgraphs with much fewer nodes, which would allow for multiple graph searches to finish much faster than one massive search of the complete graph. This way, by applying the graph-based algorithmfootnote:polylog-algorithm[] to each subgraph, we may be able to construct a path consisting of all paths found in each subgraph that leads from the given scramble to the solved state. If this program is implemented, https://github.com/heronyang/libcube[LibCube] should used in order to simplify implementation. If there are enough ideal checkpoints (i.e. state space is divided such that the resulting subgraphs are small enough), the subgraphs should be used to precompute lookup tables, which would result in much shorter runtimes for pathfinding than graph pathfinding algorithms. | ||
|
||
_You can find my discussion with the LLM https://chatgpt.com/share/674b375e-f4a4-800a-bb2e-48cc44103988[here]._ | ||
|
||
Given all this information, dear professor, please consider giving both of us the full grade for this project. If you're wondering what Hasnain has contributed to this project, you can see the commit history to this repository. | ||
|
||
Sincerely yours, | ||
Sincerely yours, + | ||
Hassan Khalloof |