First we represent the piece's move as an (x,y) co-ordinate pair.
For example, the Knight could be (1,2) or (2,1); it doesn't matter for this simplified case. This is really a shorthand for the 8 different displacements from the original square that the Knight can make: (-1, -2), (-1, 2), (1, -2), (1, 2), (-2, -1), and so on.
The board's width and height are separately represented as "w" and "h" even though they are the same value in this simplification.
"N" is the number of directions. If x is equal to y, or if either x or y are equal to zero, N is 4; otherwise, N is 8.
The formula for Empty-Board Average Random Mobility is
E = ((w-x)*(h-y)/(w*h))*N
However, I think it's important not to get too deeply into these calculations without first understanding their limitations.
On the other hand, random is meaningful. Often when you optimize the placement of one piece, you block or impede another piece. (You will most likely optimize your strongest pieces, therefore random is more important for weaker pieces.)
This is an important calculation, and contains a lot of truth; however, the other factors that contribute to a piece's value are important enough that you cannot simply run this number and get the value of a piece. The answer you get might be wrong by as much as one-third of the value of the piece in question.
An important step is picking the base probability value, that is, the likelihood that any given square will be empty. Earlier, I suggested that one could arbitrarily choose 0.69 in order to make the values seem to come out right, but also pointed out that this would just be lying with numbers.
I have often run this calculation using 0.7, just to get a rough idea, and I have usually found that the values of Rooks were underestimated. "Random" is not Chess. I don't know what the "correct" value ought to be.
When the powers of movement and capture are very different, this factor might have strange values...
But does it? Or is the value really just an average of the move-power and capture-power? You see, you really need the ability to move without capturing in order to aim your piece at different targets; but the more capture-power it has, the less you need to move it in order to hit something. I tried a piece that moves a Ferz but captures as Rook, and its value was close to the Knight; in this case, the average of the two values was close to the real value.
On the other hand, a Bishop or a Knight are each stronger than either a piece that moves as Knight but captures as Bishop, or one that moves as Bishop and captures as Knight. (As far as I can tell, anyway.)
Somebody brave should try playing some games with a piece that moves as Queen but captures a Ferz (mQcF), or a piece that moves as Ferz but captures as Q (mFcQ). Perhaps these pieces are equal in value, and both are generally equal to a Rook.
The forward move of the Rook or Wazir or Dabaaba is worth about as much as both its sideways moves; the forward move is worth three or four times as much as its retreating move, but perhaps in the endgame the retreating move is more valuable than that.
The two forward moves of the Bishop are worth two or three times as much as its two retreats. Again, in the endgame retreats may be more nearly equal to advances.
The four forward moves of the Knight, about like the Bishop; but the two forwardmost (from e4 to d6 or f6) are worth a bunch more than the two slightly forward ones (c5 or f5).
Of course, a piece that has no way to retreat is an exception to the rules of piece value.
Grasshopper capture and movement, which are similar to cannon capture and movement, have often been used in problems. It's a pretty weak power, as it requires the screening piece to be adjacent to the destination: to move a Grasshopper Rook from a1 to a8, there must be a piece on a7, and none on a2,a3,...,a6.
Many other powers are susceptible to calculation, and the results of the calculations are likely to provide reasonable estimates of the worth of those powers. The probability that a square is empty is the key to it all.