A commit for debugging purposes.
Changing formula for when I'm stuck at a certain weight.

I still think this will be problematic.  I should start thinking on a
real algorithm for this.