I'm seeking a talented developer with proficient skills in JavaScript and a solid understanding of game algorithms. Though I forgot to specify in my earlier questionnaire, I'm interested in developing a Rubik's Cube game with interactive features such as allowing user input, tracking and displaying statistics, and even a function to solve the cube automatically.
Key Responsibilities:
- Code implementation utilizing JavaScript
- Use of game algorithms for cube-solving functionality
Ideal Candidate:
- In-depth expertise in JavaScript coding
- Comprehensive understanding of game algorithms
Please include your experience related to the above-mentioned areas in your proposal. Let's build an entertaining and interactive Rubik's Cube game together.
Here is the specific instructions:
4. Solving a Hungarian cube (small) -
Can be solved without a code (30 points) or as a code problem (up to 60 points - allows a total score of 130 in the exercise).
See instructions at the end of the exercise.
The Hungarian cube (in English Rubik's cube) is a three-dimensional unit problem invented by Erno Rubik in 1974. The original cube consists of six pieces, each with the size of a 3x3 square. The squares are in six different colors. Each piece can be rotated 90 degrees, when the goal is to produce
A sequence of moves that will result in six uniform colored wigs.
The space of states in this problem is huge: 1019 x 4.3
In this question we will refer to a simpler problem - a three-dimensional cube with six faces, where the size of each face is 22 squares. In total, the number of different situations in this problem is 3,674,160
State representation: To solve the problem, we describe a state as follows:
WW
"WWWW RRRR GGGG YYYY 0000 BBBB" :) We will describe this array as a string (each letter indicates a color when the index of each value in the string is according to the position of the slots, numbered as follows:
And
solution:
The solution is any configuration where the squares in each wig are of (somewhat) uniform color.
Possible moves:
In fact, each action has 12 possible moves: you can rotate each of the wigs 90 degrees Front, Right, Up, Back, Left, clockwise or counterclockwise. We will mark the wigs as follows and Down. The wig is the one facing us (located in the center of the drawing), 8 is the opposite wig, etc.
d
We will mark the possible moves with the letters FR, U, B, L, and D, where each letter indicates a 90 degree clockwise rotation of the selected wig. Or, each wig can be rotated 90 degrees
F, R, U, B, L, and D': in the opposite direction, when we indicate it with a comma
A simulator of each move is available here:
[login to view URL]
Note that each of the actions results in a permanent change of the colors of the squares according to the way of movement. For example, when performing operation T, the positions of the squares in this wig will change (clockwise rotation), and there will also be a rotation of the adjacent wigs in the cubes that have moved as follows. (For example, squares 17-18 are on the same die as square 2, and therefore rotate together with it.)
10,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22.23) (2.0.3 1,20,21,6,7,4,5,10,11,12,13,14, 15,8,9,18,19,18,17,22,231
"WWWW RRRR GGGG YYYY OOOO BBBB": Correspondingly, the color positions can be updated from
"WWWW BBRR RRGG YYYY GGOO OOBB" :
The change in the positions of the squares following each action is detailed here:
[login to view URL]~popyack/Courses/AI/Fa21/assignments/HW3/Rubik/Rub
ik 2x2x2 base.ру
Please note, from this point on - new instructions, with the possibility of a partial solution: a. (30 points) A class must be implemented to represent the state, a function of isGoalStates and a function of
B. (15 pts) You must write a code, which will receive as a call a string of the positions of the colors according to the agreed format (for example, "WWWW BBRR RRGG YYYY GGOO OOBB" will describe the cube on the upper right side.).
and will find a solution using dfs (with a check of the states in the route to prevent loops).
third. (15 points) A solution must be allowed using the algorithms Uniform cost search and ". In the case of
The order of operations according to
Tie, candidate states must be prioritized in alphabetical order (also possible: by
The order listed from left to right - first and last. Indicate if you chose this priority.)
detail
Which heuristic did you choose (a simple heuristic is possible, but not zero) for the algorithm, there is no reason.
A partial score will also be given for the implementation of UCS, i.e. "with heuristic 0.
In order to run the code uniformly, the central program [login to view URL] must be called, receiving as the first input (argument) the string describing the given cube (with the names of the colors in capital letters and without spaces) while the second input is the name of the requested search algorithm (DFS/UCS/ ASTAR)
The output of the run will be a list of the steps to the solution, and an indication of the number of nodes the algorithm visited until the solution.
Successfully!