Switched to slower but more robust planning

Switched to slower but more robust planning algorithm, modified the grid
quality calculator to give better incentives
Merge remote-tracking branch 'origin/master' into gh-pages