Simulation is not deterministic
The root of all evil is the std-lib "set" type, which is ordered at random (or depending on the memory address of the set items).
This leads to that a sensor with a RandomState that iterates randomly ordered GroundTruthState objects introducing the same sequence of noise, but not to the same sequence of platforms.
The bug is treacherous since the set order may not change between multiple program executions. One solution to fix this is to use ordered_set, but be aware that sorting a list created from a set using hash() will yield the same problem.
Simplest way to recreate this is to use one radar sensor on platform 1 that measure platform 2 and platform 3.
One option is to set PYTHONHASHSEED, which can also set to 0 to disable randomisation completely. (This has security implications, but probably not applicable in case of just running experiments)
Maybe we should consider using ordered sets consistently across all components as approach as well?
Disable hash seed may not be the best idea since we don't know how this library is used by others. A lot of times a regular list may be enough and ordered sets where its needed.
Disable hash seed may not be the best idea since we don't know how this library is used by others.
Agree, I meant this more as a suggestion that people could do when they need deterministic runs for comparisons, not as something we'd build into Stone Soup in general.