This is an optimization problem in Sudoku. I use a very fast brute force recursive fill-and-backtrack algorithm to count the number of solutions. This proceeds from the top-left to the bottom-right and the 9x9 grid can be put in an 81 character line in that order. But how the Sudoku is rotated gives very different computational time because if the clues are clustered in the bottom-right the back-tracker can take 1000x more calls to complete. It is much faster if there are more numbers (or less longer gaps) in the top-left. I need a quick and dirty way to assess which rotation (or orginal) is the best to use before running the solution count.
The actual numbers are irrelevent, so 1=a clue, dot is a gap. For example, this is a puzzle and its three 90 degree rotations. The function calls represent the cost.
.......1......1..1.1.1..1........1.1..1.111...11.11.....1...11111..1..1...1...... -> 1069004 calls
.1.1..1..1.....11...111.1...1..11.......11.1...1..........111.1..1..1.1........1. -> 6680 calls *BEST
......1...1..1..11111...1.....11.11...111.1..1.1........1..1.1.1..1......1....... -> 12169 calls
.1........1.1..1..1.111..........1...1.11.......11..1...1.111...11.....1..1..1.1. -> 1292473 calls
I've tried merely weighting (and summing) the gaps from very high (left side) to very low (right side) but not getting good results. The gains from a good assessor will be huge over large numbers of puzzles being processed.