Solving the rubik's cube with a genetic algorithm
Rubik's cube genetic solver : version 1.0
Okay ... Here is version 1.0 of the genetic solver. Main charactersitics are listed below :
- I only automatised the 2x2x3 search over the 12 possible locations
- Scramble types : random or used-defined
- Scramble length : user-defined
- Fitness function : 10 x Np-Nm, where Np is the number of correct pairs (either Center-Edge or Corner-Edge) at the 2x2x3 location and Nm the number of moves. Programs indicates the value of the fitness function, the number of moves, and Np, at the end of each location simulation. Np = 16 means the 2x2x3 is solved.
- The solver turns the cube (actually in a weird way for some locations ...) after scramble to place the 2x2x3 to solve in BD. Do not forget to add the indicated cube rotations (y's and/or xy's) at the beginning of the given solution !
- Notation for scramble : please use only FRUBDL, F'R' ... L', F2R2 ... L2.
- For a real random scramble (say at least 25 moves), the solver may find some solutions with 10'000 generations/location, and should find sub-20 moves for nearly each location with 50'000 generations. Remember however that it's only a "1.0" version !
Features to come with next versions include of course completely automatised cube solving, nicer user-defined scramble possibilities, error messages when error occurs and a lot of more things I have to fix ;-) Please don't blame me for all infinite loops you'll meet when making errors while entering the scrambles ! of comments, many thanks to all of you ! It seems that many of us have such a secret dream to become a new













