Rubik's Cubes and Genetic Algorithms in Swift
summary
A Swift Rubik's cube library and genetic algorithm implement mutable move-sequence genomes that evolve toward solved states, running for about 80,800 generations over ~15 hours and sampling close to 500 million move sequences. Fitness counts pieces in correct position and orientation; the best run reaches fitness 16 (four pieces misoriented) with a 220‑move solution, so it never fully solves the cube but converges very close; code and implementation details are on GitHub.
AI-written summary · about
