InpHisto information

greenspun.com : LUSENET : MARP Editors : One Thread

OK. I originally sent this to BeeJay. He asked me for some more explanation on InpHisto, and I used an .inp he sent me as a basis for making my remarks. I think this might be useful for other Editors as well, especially future Editors. Below is the "analinp -i -S" output from a stinger .inp BeeJay sent me. Throughout this output, I have put my own remarks. The actual output is in fixed font, so it should be easy to distinguish between remarks and output.
stinger.inp inside bj_stinger_211810_m35tg3b.zip -Clean
---Output from Tool Analyse Inp---
Analinp Version 2o

      1 slow frame  (average speed:    0%)
      9 good frames (average speed:  100%)
     12 fast frames (average speed:  131%)
  55176 good frames (average speed:   99%)
     12 slow frames (average speed:   79%)
     72 good frames (average speed:   99%)
The above is the extra output you get when using "-S" instead of "-s". Nothing wrong here. If ever you see 12 slow frames with an average speed of 8% or so or lower, the game was paused.
--------  analinp Report  --------
p = 3  f = 4 
Bit#   frames:on/off Presses BPresses Bursts highVar LowVar Speed%
p = 10 f = 9 
Bit#   frames:on/off Presses BPresses Bursts highVar LowVar Speed%
 249   27937/27345      5116       26      2    0.23  0.290   1.6%

C:\UTIL\Tmp\stinger.inp
--------  End Of analinp Report  --------


Number of frames in this recording:   55282


--------  InpSpeed Report  --------
Good frames :     55257 (average speed:   99%)
Slow frames :        13 (average speed:   73%)
Fast frames :        12 (average speed:  131%)

Total frames:     55282 (average speed:   99%)
--------  End Of InpSpeed Report  --------
OK. The InpHisto part starts now. Originally, InpHisto had only one column with numbers and percentages, the other two were added later. So I'll first explain the first column. Suppose someone starts a game, and after 200 frames, presses the firebutton, holds it down for 4 frames, then releases it again. For the bit in the .inp that represents the firebutton. Unfortunately, the bit is different for every game, so the MAME source code or some experimenting has to be used to find out what exactly each bit is per game. Having said that, some educated guesses can be made, as I'll show below. We are not really interested in someone not pressing a button for a long time, or keeping it down for a long time, so everything of length 11 and more is treated the same. InpHisto makes a histograms of the numbers of presses and releases for each length (duration). Lengths are counted in number of frames. Note that this first column counts BOTH presses AND releases. In our example (200 frames released, 4 frames pressed), this would mean that the bit for this button now has a count of 1 for length 11+ (the 200 frames released) and a count of 1 for length 4 (4 frames pressed). Now suppose that the player leaves the button released for 4 frames, then presses it again for 3 frames, then never touches it again until the end of the recording (say 50000 frames later). We would now have: OK, this is not really part of the output, but just to format it, I'll use fixed font here too.
Length  3 :  1 (the one press that lasted 3 frames)
Length  4 :  2 (a 4-frame press and a 4-frame release)
Length 11+:  2 (the initial 200-frame release and the final 50000-frame release)
For these numbers, averages and percentages are calculated. In these calculations, lengths 11 and longer are ignored, since they will skew things. Someone could press like crazy for 1 minute, then not do anything for several minutes, then press again, etc. So in the above example, the percentages would be: OK, this is not really part of the output, but just to format it, I'll use fixed font here too.
Length  3 :  1 ( 33.33%)
Length  4 :  2 ( 66.67%)
And the average length would be (3*1 + 4*2) / 3 = 11/3 = 3.67. Since this is both presses and releases, and assuming a 60 fps game, this would indicate that this person fired at an average speed of 60 / (3.67 * 2) = 8.19 "fires" per second. If this had been a 40 fps game, the number would have been 40 / (3.67 * 2) = 5.46. By examining a lot of .inps made on shooters, we have observed that fast pressers usually average around 4 on the firebutton on 60 fps games, indicating an average speed of 60 / (4*2) = 7.5 fires per second. For 60 fps games, we use the rule that below 3.5 indicates either autofire or slowdown. The nice thing is that people are pretty consistent. It is very hard for someone to slow a game down to half speed and then press twice as slow to mask the slowdown. I have examined several of my own Scramble recordings. Some of those recordings were made more than a year apart. The numbers were still pretty much identical... There are a few exceptions to this 3.5 rule, though. First of all, there is Hisa-Chan. He really is a great player, but lots of people still have doubts about his firing speed. For now, we have accepted his 3.25 and such averages, but we are waiting for a way (MAMETE, for instance) to challenge his recordings. Another exception is games that require you to press in relative short bursts. Fast pressers can get significantly faster than 4 when they press like crazy for short periods of time (say a few seconds), then not touch the button for a while. The best examples of games like these are Track & Field and similar games. Also, there are panic pressers. I myself am a panic presser when trying to score on Goal! Goal! Goal! or when trying to hit an opponent in fighters. Most of the time, I press leisurely, and at key moments, I press in a fast burst of only a few seconds. Note that InpHisto shows ALL the bits that change during a game, so not just buttons, but also directions (left, right, up, down), coin inserts, player-1-start, ... Later on, two columns were added to the InpHisto output: The first of these counts the lengths when the bit in question had the value 0, the second when the bit was 1. In most games, bits are active low, meaning that when a button is pressed, the bit is 0, but, unfortunately, this does not hold for every game or for every input (button, direction, coin, etc.). Apart from, perhaps, helping in establishing some pattern for a given player on a given game, and apart from showing, for example, that a certain player's presses are shorter, on average, than the times in between presses, there is one more use for these columns, and I'll explain that further down. Even if the averages look acceptable, a high percentage of lengths 1 and 2 is suspicious. I'd say if 25% or more are length 1 or 2, then I get suspicious. This could either be autofire being turned on and off, or temporary slowdowns (either on purpose or because of CPU-intensive parts of the game), or (never forget this) that the game runs at less than 60 fps. Remember that a player with a 4 average on a 60 fps game, could get a 2.67 average on a 40 fps game. Also, some games are "strange". gaplus, for instance, puts a lot of lengths 1 even in perfectly legal recordings. A good rule of thumb, when statistics look suspicious is to compare the output to that of other people (preferably people you trust, and preferably people that are known to press fast).
--------  InpHisto Report  --------
Bit 234, length  1  :     29 (  2.41%)     28 (  3.56%)      1 (  0.24%)
Bit 234, length  2  :     50 (  4.16%)     40 (  5.09%)     10 (  2.40%)
Bit 234, length  3  :     78 (  6.49%)     60 (  7.63%)     18 (  4.33%)
Bit 234, length  4  :    125 ( 10.40%)     93 ( 11.83%)     32 (  7.69%)
Bit 234, length  5  :    151 ( 12.56%)    113 ( 14.38%)     38 (  9.13%)
Bit 234, length  6  :    155 ( 12.90%)    111 ( 14.12%)     44 ( 10.58%)
Bit 234, length  7  :    173 ( 14.39%)    104 ( 13.23%)     69 ( 16.59%)
Bit 234, length  8  :    187 ( 15.56%)    109 ( 13.87%)     78 ( 18.75%)
Bit 234, length  9  :    122 ( 10.15%)     66 (  8.40%)     56 ( 13.46%)
Bit 234, length 10  :    132 ( 10.98%)     62 (  7.89%)     70 ( 16.83%)
Bit 234, length 11+ :   1363              496              867
Bit 234, all lengths:   2565             1282             1283
Bit 234, average lengths:       6.38             5.99             7.13
I am going to start counting the different bits here... 1.
Bit 235, length  1  :     35 (  4.07%)      1 (  0.43%)     34 (  5.41%)
Bit 235, length  2  :     58 (  6.74%)      6 (  2.59%)     52 (  8.27%)
Bit 235, length  3  :     70 (  8.13%)      6 (  2.59%)     64 ( 10.17%)
Bit 235, length  4  :    117 ( 13.59%)     13 (  5.60%)    104 ( 16.53%)
Bit 235, length  5  :    112 ( 13.01%)     25 ( 10.78%)     87 ( 13.83%)
Bit 235, length  6  :     97 ( 11.27%)     25 ( 10.78%)     72 ( 11.45%)
Bit 235, length  7  :     99 ( 11.50%)     29 ( 12.50%)     70 ( 11.13%)
Bit 235, length  8  :     97 ( 11.27%)     37 ( 15.95%)     60 (  9.54%)
Bit 235, length  9  :     93 ( 10.80%)     47 ( 20.26%)     46 (  7.31%)
Bit 235, length 10  :     83 (  9.64%)     43 ( 18.53%)     40 (  6.36%)
Bit 235, length 11+ :   1352              875              477
Bit 235, all lengths:   2213             1107             1106
Bit 235, average lengths:       5.93             7.37             5.40
2nd bit in the input.
Bit 238, length  1  :     40 (  3.74%)      4 (  1.22%)     36 (  4.85%)
Bit 238, length  2  :     52 (  4.86%)     10 (  3.06%)     42 (  5.66%)
Bit 238, length  3  :     87 (  8.14%)     17 (  5.20%)     70 (  9.43%)
Bit 238, length  4  :    133 ( 12.44%)     30 (  9.17%)    103 ( 13.88%)
Bit 238, length  5  :    137 ( 12.82%)     24 (  7.34%)    113 ( 15.23%)
Bit 238, length  6  :    128 ( 11.97%)     30 (  9.17%)     98 ( 13.21%)
Bit 238, length  7  :    134 ( 12.54%)     51 ( 15.60%)     83 ( 11.19%)
Bit 238, length  8  :    153 ( 14.31%)     75 ( 22.94%)     78 ( 10.51%)
Bit 238, length  9  :    111 ( 10.38%)     51 ( 15.60%)     60 (  8.09%)
Bit 238, length 10  :     94 (  8.79%)     35 ( 10.70%)     59 (  7.95%)
Bit 238, length 11+ :   1186              801              385
Bit 238, all lengths:   2255             1128             1127
Bit 238, average lengths:       6.07             6.91             5.70
3rd bit.
Bit 239, length  1  :     51 (  5.35%)     50 (  7.66%)      1 (  0.33%)
Bit 239, length  2  :     68 (  7.14%)     58 (  8.88%)     10 (  3.33%)
Bit 239, length  3  :     93 (  9.76%)     79 ( 12.10%)     14 (  4.67%)
Bit 239, length  4  :    115 ( 12.07%)     92 ( 14.09%)     23 (  7.67%)
Bit 239, length  5  :    105 ( 11.02%)     75 ( 11.49%)     30 ( 10.00%)
Bit 239, length  6  :    133 ( 13.96%)     89 ( 13.63%)     44 ( 14.67%)
Bit 239, length  7  :    128 ( 13.43%)     73 ( 11.18%)     55 ( 18.33%)
Bit 239, length  8  :    107 ( 11.23%)     59 (  9.04%)     48 ( 16.00%)
Bit 239, length  9  :     88 (  9.23%)     45 (  6.89%)     43 ( 14.33%)
Bit 239, length 10  :     65 (  6.82%)     33 (  5.05%)     32 ( 10.67%)
Bit 239, length 11+ :   1068              357              711
Bit 239, all lengths:   2021             1010             1011
Bit 239, average lengths:       5.71             5.20             6.82
4th bit. OK. I have already looked ahead; 3 more bits follow. Looks like this is a game with four directions and one fire button. Based on the numbers for "all lengths", I'd say that the above four are the four directions.
Bit 249, length  1  :      1 (  0.01%)      1 (  0.02%)      0 (  0.00%)
Bit 249, length  2  :     25 (  0.25%)     22 (  0.43%)      3 (  0.06%)
Bit 249, length  3  :    293 (  2.88%)    236 (  4.66%)     57 (  1.12%)
Bit 249, length  4  :   2594 ( 25.51%)   2051 ( 40.52%)    543 ( 10.63%)
Bit 249, length  5  :   4461 ( 43.87%)   2337 ( 46.17%)   2124 ( 41.59%)
Bit 249, length  6  :   2281 ( 22.43%)    384 (  7.59%)   1897 ( 37.15%)
Bit 249, length  7  :    448 (  4.41%)     24 (  0.47%)    424 (  8.30%)
Bit 249, length  8  :     59 (  0.58%)      3 (  0.06%)     56 (  1.10%)
Bit 249, length  9  :      5 (  0.05%)      2 (  0.04%)      3 (  0.06%)
Bit 249, length 10  :      2 (  0.02%)      2 (  0.04%)      0 (  0.00%)
Bit 249, length 11+ :     64               55                9
Bit 249, all lengths:  10233             5117             5116
Bit 249, average lengths:       5.01             4.58             5.44
5th bit. And I'd say that this one (5) is the fire button. Not really fast. Either you are not a fast presser, or you press slightly slower on average, but with more precision. I have noticed, for instance, that several good Galaga players don't press as fast, but make every press count (high hit/miss-ratio). I, for one, am a fast presser, and that's probably why I can't score over 1M on regular Galaga. I miss too much. I might fire faster, but overall, I still have more "misses per second".
Bit 251, length  8  :      1 (100.00%)      0 (  0.00%)      1 (100.00%)
Bit 251, length 11+ :      2                2                0
Bit 251, all lengths:      3                2                1
Bit 251, average lengths:       8.00             0.00             8.00
6th bit. OK. "all lengths" is 3 here. Assuming you weren't holding down any buttons when the recording started, that would mean 1 release, 1 press, 1 release for the entire game. Obviously, this bit is either the "insert coin" or the "1 player start" bit. Also, the second column shows 2, and the third shows 1. Again assuming you didn't have anything pressed when the recording started, that would mean that the second column shows the releases for this bit (and so release = 0), and the third shows the presses (and so presses = 1). Realise, though, that that only holds for this bit, not necessarily for the other input bits.
Bit 255, length  7  :      1 (100.00%)      0 (  0.00%)      1 (100.00%)
Bit 255, length 11+ :      2                2                0
Bit 255, all lengths:      3                2                1
Bit 255, average lengths:       7.00             0.00             7.00
7th bit. If 6 was "insert coin", then this is "1 player start", and vice versa. Again, the bit seems to be 0 when the button is released. Let's go back to the other bits for a moment now. Assuming no buttons/directions were held when the recording started, nor when it ended, there will always be exactly one release more than press. Under this assumption, bits 234 and 239 show the releases in the third column (and so the bit is 1 when released), while all the other bits have the releases in the second column (and so the bit is 0 when released). Again, this is assuming no buttons were pressed when the recording started and ended.
--------  End Of InpHisto Report  --------
End of tutorial. :-) Cheers, Ben Jos.

-- Anonymous, April 24, 2001

Moderation questions? read the FAQ