Add script for power spectral density analysis #5
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

This is a possible approach to use power spectral densities to get a replay's frequency signature. Roughly it's similar to your idea of using spikes per second except that it captures the global player's steering movement over the whole replay and computes the typical frequencies at which the steering was done.
As an example, here's an output plot that shows the spectral density of racehans versus riolu on C05 Endurance which show very different diagrams. You can see on riolu's replay (blue), the higher frequencies are much more pronounced. Only by resampling to simulate a 0.5x slowdown on riolu's replay (green) do we get similar behavior in terms of frequencies

The code includes an automatic sweep to try to match two replays by scanning slowdowns from 0.3x to 1x to try to find the optimal match. This by no means guarantees that a match with a slowdown factor of less than 1x is cheated as different players have different playstyles, short tracks will show more noise, the slowed down resampling will obviously not contain the same inputs as driving normally and this is an experimental script. However when the frequencies powers are so different, it certainly raises an eyebrow and it would be interesting if you could test it out on replays that you have created yourself by slowing down the game to see if you can retrieve the original slowdown factor with this tool.
Usage :
python match_two_replays_power_spectral_density.py folder_with_two_replays/or
python match_two_replays_power_spectral_density.py replay_1 replay_2Extra dependencies are matplotlib and scipy.
Thanks to @R00dRallec for the steering plotting that I based this on.