torjusti / cube-solver

A collection of Rubiks cube solvers implemented in JavaScript
MIT License
22 stars 4 forks source link

Add option to prioritize moves randomly during search #72

Open torjusti opened 1 year ago

torjusti commented 1 year ago

The current Kociemba solver is fully deterministic - given the same scramble, it'll always provide the same solution.

My main use for this solver has been to create algorithm training apps, where this is problematic: after a while, I'm actually able to recognize the algorithm from the scamble instead of by looking at the cube.

I think it would be a good idea if the solver could optionally pick a random next move instead of checking them sequentially. In other words, changing this part of Search.js to go through the moves in a random order:

for (let i = 0; i < this.moves.length; i += 1) {