The game (I built it, and it is currently live on mobile) involves solving a pascal's triangle like grid of numbers with operators between the numbers - an example with 3 rows is:
n1
n2 o1 n3
n4 o2 n5 o3 n6
The goal of the game is simple: Each number in all the rows except the bottom row should be the result of the binary expression right below it. So, in the above example, the solution is achieved if n1 = n2 o1 n3; n2 = n4 o2 n5; and n3 = n5 o3 n6.
In the problem grid, numbers are swapped with each other and operators are swapped with each other till the solution is reached. In each problem, 0 or more items (numbers and operators) are fixed.
The actual game has 3 to 5 rows (since <3 is too easy, and >5 doesn't fit easily on a mobile device) of two digit numbers, and the only operators are +, -, * and ÷. A problem is described by an array of numbers, an array of operators and the indices of fixed items in each array.
Given a game (a shuffled grid with hints) as described above, how do I grade it based on complexity?
A detailed description of the game, with screenshots, etc. (on Android and iOS - called Sumurai) is provided at http://qr.ae/NLrtk
Your second approach is good. The minimum number of swaps is a measure of complexity in the symmetric group that is frequently used, and correlates directly with gameplay length.