Optimization in Games
Improve multiStepMove algorithm to make better use of available piles.
The previous implementation was explicitly optimised to use the minimum
number of piles possible. This made it usable in every situation, but
also meant that many moves were taking more steps than was actually
necessary. This was most noticeable when a lot of time was spent
unstacking and restacking cards on a couple of piles while there were
other piles going completely unused.
After some experimentation, the new algorithm uses up to 40% fewer moves
than the previous one.