Inverted usage can be applied when you want to emphasize the less frequently used functions and behaviors in the game. This creates a usage model that might reflect how the game would be used by people trying to find ways to exploit or intentionally crash the game for their own benefit. It also helps draw out defects that escaped earlier detection because of the very fact that the game is rarely, if ever, expected to be used in this way.
Inverted usage is calculated using a three-step process.
Calculate the reciprocal of each usage probability for a test parameter (combinatorial) or for all paths exiting a state (TFDs).
Sum the reciprocals.
Divide each reciprocal from step 1 by the sum of the reciprocals calculated in step 2. The result is the inverted probability for each individual usage value.
For example, say there are three values A, B, and C with the usage 10%, 50%, and 40%, respectively. Apply step 1 of the inversion process to get reciprocal values of 10.0 for A (1/0.10), 2.00 for B (1/0.5), and 2.50 (1/0.40) for C. Add these reciprocals to get a sum of 14.5. The reciprocals are divided by this sum to get the inverted values of 69.0% (10/14.5) for A, 13.8% (2/14.5) for B, and 17.2% (2.5/14.5) for C. The can be rounded to 69%, 14%, and 17% for test generation purposes.
One characteristic of this process is that it inverts the proportions between each probability as compared to its companions for a given set of usage values. In the preceding example, B is used five times more frequently than A (50/10) and 1.25 times more frequently than C (50/40). The relationship between inverted A and inverted B is 69%/13.8%, which is 5.00. Likewise, the relationship between inverted C and inverted B is 1.25 (17.2%/13.8%).
For any case where there are only two usage values to invert, you can skip the math and simply reverse the usage of the two values in question. You will get the same result if you apply the full process, but why bother when you could use that time to do more testing?
Note ‚ | If an item has a 0% usage, then the first step in the inversion process will cause a divide by zero situation. Keep that from happening by adding 0.01% to each value before doing the three-step inversion calculation. This will keep the results accurate to one decimal place of precision in the results and maintain the relative proportions of usages in the same set. |
Figure 12.3 showed a set of usage probabilities for the HALO Look Sensitivity test values of 1, 3, and 10. Construct a table of inverted values starting with the Casual player profile. The three usage probabilities in that column are 10, 85, and 5. These are percentages, so the numerical values of these probabilities are 0.10, 0.85, and 0.05. Apply step 1 and calculate 1/0.10 = 10. Do the same for 1/0.85, which is 1.18, and 1/0.05, which equals 20.
Add these numbers according to step 2. 10 + 1.176 + 20 = 31.176. Finish with step 3. Dividing 10, which is the reciprocal of the usage probability for Look Sensitivity = 1, by 31.18, which is the sum of all three reciprocals, gives an inverted probability of 0.321. Since the numbers in the table are percentages, this gets entered as 32.1. Likewise, divide 1.18 by 31.18 to get the second inverted usage result 0.038, or 3.8%. Complete this column by dividing 20 by 31.18 to get 0.641 and enter 64.1 as the inverted usage for Look Sensitivity = 10.
Comparing the inverted usage values to the original ones confirms that the relative proportions of each usage value have also been inverted. Originally, the usage for Look Sensitivity = 1 was 10% versus 5% for Look Sensitivity = 10: a 2 to 1 ratio. In the inverted table, the Look Sensitivity = 10 value is 64.2 ‚ twice that of the 32.1% usage for Look Sensitivity = 1. You can examine the values for each parameter to confirm that this holds true for the other values within each column.
The complete inverted Look Sensitivity usage table for all player profiles is provided in Figure 12.21.
Note ‚ | The "normal" and inverted usage tables for all of the HALO Advanced Controls parameters are provided in an Excel spreadsheet file on the book's CD-ROM. There are separate worksheets for the Normal and Inverted usages. You can change the values on the Normal Usage sheet and the values on the Inverted Usage sheet will be calculated for you. |